[Top][All Lists]

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

Re: Quoted file names matching a pattern?

From: Paul D. Smith
Subject: Re: Quoted file names matching a pattern?
Date: Thu, 30 Jun 2005 14:38:07 -0400

%% Ken Smith <address@hidden> writes:

  ks> The above method is the one I apply to strings in general when I
  ks> must preserve whitespace which includes but isn't exclusive to
  ks> filenames.  I think I understand what you mean about timestamps
  ks> but could you elaborate?

I just mean that if you write this:

    foobar.o:  foo__whitespace__bar.c

then make will fail if the file "foo__whitespace__bar.c" does not exist.
Make will also only rebuild "foobar.o" if "foo__whitespace__bar.c" is
newer.  It won't notice, or care, that a file named "foo bar.c" exists
or has been updated, because that file is not listed as a prerequisite.

Ditto for any header files that contain whitespace, etc. etc.

  ks> Do you see the problem you mention in the example I sent?

As long as you're careful to convert back to a whitespace (or escaped
whitespace) form at the right times, it will work.  One of those times
is obviously in command scripts, but you also have to do it in
prerequisite lists.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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