delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/18/02:27:15

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Authentication-Warning: smtp1.cern.ch: Host IDENT:root AT pb-d-137-138-206-44 DOT cern DOT ch [137.138.206.44] claimed to be skywalker
Message-ID: <399CD720.E37F673B@cern.ch>
Date: Fri, 18 Aug 2000 08:26:40 +0200
From: "Lassi A. Tuura" <lassi DOT tuura AT cern DOT ch>
Organization: Northeastern University, Boston, USA
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Brian Pollard <b_pollard AT trillium DOT com>
CC: "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: problem with make
References: <0E7AA454E229D411A1CB0090274661FF550316 AT gaea DOT trillium DOT com>

> It preserves the trailing spaces when the quotes are not used and I believe
> it shouldn't.  I wrote the email with quotes to emphasize the trailing
> zeros.

(Spaces, not zeros.)  Actually I answered wrong earlier, the fact that
you get spaces has nothing to do with the comment at the end of the
line.  GNU make simply preserves trailing white-space in a variable
value.  In the manual at "Using Variables" -> "Flavors", you'll find:

>>  You can also use [simply expanded variables] to introduce
>>  controlled leading whitespace into variable values.  Leading
>>  whitespace characters are discarded from your input before
>>  substitution of variable references and function calls; this
>>  means you can include leading spaces in a variable value by
>>  protecting them with variable references, like this:
>>
>>     nullstring :=
>>     space := $(nullstring) # end of the line
>>
>>  Here the value of the variable `space' is precisely one
>>  space.  The comment `# end of the line' is included here
>>  just for clarity.  Since trailing space characters are *not*
>>  stripped from variable values, just a space at the end of
>>  the line would have the same effect (but be rather hard to
>>  read).  If you put whitespace at the end of a variable
>>  value, it is a good idea to put a comment like that at the
>>  end of the line to make your intent clear.  Conversely, if
>>  you do *not* want any whitespace characters at the end of
>>  your variable value, you must remember not to put a random
>>  comment on the end of the line after some whitespace, such
>>  as this:
>>
>>     dir := /foo/bar    # directory to put the frobs in
>>
>>  Here the value of the variable `dir' is `/foo/bar    ' (with
>>  four trailing spaces), which was probably not the intention.
>>  (Imagine something like `$(dir)/file' with this definition!)

Live and learn.  Hope that clarifies the issue.  If you have further
questions on this, it would be better to continue the discussion on the
GNU make lists (help-make AT gnu DOT org or bug-make AT gnu DOT org), not here.

Cheers,
//lat
-- 
I am ready to meet my Maker.  Whether my Maker is prepared for the
great ordeal of meeting me is another matter.  --Winston Churchill

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019