Skip to content

Fix block comment in Makefile#2305

Merged
jneen merged 1 commit into
rouge-ruby:mainfrom
tancnle:fix/make-comment-recipe
Jun 16, 2026
Merged

Fix block comment in Makefile#2305
jneen merged 1 commit into
rouge-ruby:mainfrom
tancnle:fix/make-comment-recipe

Conversation

@tancnle

@tancnle tancnle commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Closes #2301

@tancnle tancnle force-pushed the fix/make-comment-recipe branch from 7c1a780 to 9530720 Compare June 10, 2026 23:51
@jneen

jneen commented Jun 11, 2026

Copy link
Copy Markdown
Member

Is this supported? idk if i've ever seen it before, usually it's just indented with the block and it's a shell comment.

@tancnle

tancnle commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

@jneen It seems supported.

Tested with the following Makefile.test

$ cat /tmp/Makefile.test
on:
# Start environment
	# Start environment (indented)
	echo "on"

off:
# Stop environment
	# Stop environment (indented)
	echo "off"
$ make on -f /tmp/Makefile.test
# Start environment (indented)
echo "on"
on

Indented comment does not work. It is printed in shell comment in the output

@jneen

jneen commented Jun 12, 2026

Copy link
Copy Markdown
Member

Alright, I think the only other thing is /#.*\n?/ may be a better regex here. Greedy is generally okay in this case because . doesn't match newline without /m, and the comment may appear at EOF without a newline.

@tancnle tancnle force-pushed the fix/make-comment-recipe branch from 9530720 to b384171 Compare June 16, 2026 04:48
@tancnle

tancnle commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks, @jneen. That sounds good to me 👍🏼

@jneen jneen added this pull request to the merge queue Jun 16, 2026
Merged via the queue into rouge-ruby:main with commit 5d89a87 Jun 16, 2026
10 checks passed
@tancnle tancnle deleted the fix/make-comment-recipe branch June 16, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Makefile comment cause following lines to be treated as error

2 participants