[Top][All Lists]

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

White Space Problems--Again

From: Tom Browder
Subject: White Space Problems--Again
Date: Sat, 28 Mar 2009 07:36:07 -0500

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 Browder
Niceville, Florida

reply via email to

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