[Top][All Lists]

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

Re: $(wildcard ..)

From: Paul D. Smith
Subject: Re: $(wildcard ..)
Date: Fri, 7 Oct 2005 09:21:56 -0400

%% Ben Elliston <address@hidden> writes:

  be> At present, GNU make version 3.80 permits the use of colons in
  be> filenames by escaping them:

  be>   foo\:bar.txt:
  be>   touch $@

  be> However, if I use $(wildcard ..) to select a number of files from the
  be> file system (one or more that include colons in their names), I get an
  be> error from make about multiple targets in the make rule due to the
  be> multiple colons.  Shouldn't $(wildcard ..) escape colons, too?

Functions can be used virtually anywhere in make syntax, and it is not
appropriate for backslashes to be inserted everywhere, so $(wildcard
...) can't do it automatically.

You can, of course, do it yourself:

  $(subst :,\:,$(wildcard *.txt)):
        touch $@

or whatever.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "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]