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 <[email protected]> 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 _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
