[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wildcard character in target
From: |
Paul Smith |
Subject: |
Re: wildcard character in target |
Date: |
Tue, 07 Sep 2010 07:59:51 -0400 |
On Mon, 2010-09-06 at 12:04 -0400, Luke Shumaker wrote:
> > How about the following rule?
> > *.c : *.o ;
>
> Both expansions will take place. Since `*' only matches existing files,
> this rule is useful only for updating files, not creating them. If no
> files ending in `.c' currently exist, `*.c' will expand to an empty
> string.
Not so, actually; as with the shell if the wildcard does not match
anything then the wildcard string itself is left alone.
In the above rule, if there are no files that match the wildcard *.c
then the target will be the literal string '*.c'. Ditto for '*.o'.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist