Tom Browder wrote:
I know there are words in the Make manual warning about insidious
white space at the ends of strings, but is there any reason that Make
couldn't do trimming during parsing?
I have a Makefile that I've used for a while. Yesterday I added a
comment and the Makefile stopped working--all because I commented the
end of a definition line.
My first line looked like this (no space after 'gnu'):
COMPS := gnu
Make reports the value of $(COMPS) as 'gnu'.
Then I added a comment to the line:
COMPS := gnu # gfortran
Make reports the value of $(COMPS) as 'gnu ', not the same.
It took me a few minutes to figure out what was happening, and in my
stubbornness I added the $(strip) function later for a conditional to
enable me to leave the comment.
Is there any rationale for Make not trimming white space in that
situation? Or ever?
Tom -
I've run into that same problem with some of my Makefiles and put a big
comment
in them (for others who might work on the same files) to not put
comments on the
same line as a 'make directive' as it seems to mess things up.
HTH!
-- Rick
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make