bug-make
[Top][All Lists]
Advanced

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

$(comment)


From: Dan Jacobson
Subject: $(comment)
Date: Thu, 16 Nov 2006 20:08:25 +0800

Gentlemen, I have discovered an excellent way to comment out parts of
lines in makefiles. Be sure you document it somewhere.

All one needs to do is wrap a $( ..... ) around the code to be commented:

gp:timez1
        echo 'set xdata time;set timefmt "%s";$(set format x "%m/%d";\
        set timefmt "%m/%d/%y %H:%M";)plot "$?" using 0:1;'|...

Imagine the pain of trying to comment out that section via other
means, or then even trying to uncomment it back.

Of course one day it will blow up depending on what comes right after
the $(, but then of course you hopefully will provide a way of
ensuring against this better than testing each time with a make -n,
i.e., some kind of comment command: $(comment bla bla bla), or
$(comment()) or whatever.




reply via email to

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