On Mon, 2010-09-06 at 10:20 +0430, ali hagigat wrote:
> print: *.c
>       @echo "example"
> 
> Considering the above rule in a makefile, what strings will be
> replaced with *.c in the first phase and the second phase of make
> process?

This is equivalent to
print: $(wildcard *.c)
        @echo "example"

`*.c' will expand to a list of all files ending in `.c' in $(CURDIR).

> 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.

~ LukeShu


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to