help-make
[Top][All Lists]
Advanced

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

Re: some questin about Makefile


From: CHEN Cheng
Subject: Re: some questin about Makefile
Date: Thu, 17 Sep 2009 12:49:35 +0800
User-agent: Mutt/1.5.17 (2007-11-01)

On Thu, Sep 17, 2009 at 11:13:50AM +0800, loody wrote:
[...]
> 1. in case a, since "all" depends on "OBJ" and "OBJ" find no match of
> the rule expand with "OBJ_C" so it use implicit rule as 10.2 Catalogue
> of Implicit Rules, ‘$(CC) -c
> $(CPPFLAGS) $(CFLAGS), to create *.o file.
> 
> 2. in case b, the content of "OBJ" is matching the rule expanded by
> "OBJ_C" so it runs
> misc.o : VPATH\misc.c
>         @echo OBJ_C=$(OBJ_C)
>         @echo preauire = $<
>         @echo target = $@
>         $(CC) $(CFLAGS1) -c $<
> 
> does my assumption correct?

IMHO, The static pattern rule conversion assumption is correct,
according to record_files:read.c from the 3.81 code.

Except that, the "VPATH\" shall not be prefixed, since the path of
misc.c is not determined until the goal updating phase. Please see
manual section 4.5.3 (How Directory Searches are Performed)


Best,
Cheng





reply via email to

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