bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33247: makefile mode comment color


From: Stefan Monnier
Subject: bug#33247: makefile mode comment color
Date: Tue, 06 Nov 2018 08:25:39 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Why do we have this setting for makefiles at all?

That's to handle the /bin/sh comments on the command lines of rules,
where the code is run by /bin/sh and hence obeys the corresponding
rules.  E.g.

   foo.o: foo.c
        echo This is#not a comment
        $(CC) $(CFLAGS) -o $@ $<  #This is an sh comment

> Are there any such
> restrictions on comments in Makefiles?  Stefan?

Maybe we should conditionalize on the presence of a leading TAB at the
beginning of the line.

BTW, I recently saw that the above is wrong in cases like

   foo.o: foo.c
        @#An sh comment not recognized by current makefile mode
        $(CC) $(CFLAGS) -o $@ $<  #This is a comment

so if you can fix both of those while you're there, that'd be great!


-- Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]