help-make
[Top][All Lists]
Advanced

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

Re: order-only dependency and transitivity


From: Noel Yap
Subject: Re: order-only dependency and transitivity
Date: Wed, 09 Jun 2004 16:51:13 -0400
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

IIUC, the following is what's needed (other changes may be necessary to support 
parallel builds correctly):

x.cc m.touch: m.web
        @echo tangling web
        touch m.touch
        @echo x.cc rule
        touch x.cc

x.o: x.cc
        @echo compiling x
        touch x.o


I have a feeling the original didn't work as expected because the action that 
touched x.cc wasn't part of the x.cc rule.

Noel

Ross Boylan wrote:

On Wed, Jun 09, 2004 at 04:14:45PM -0400, Noel Yap wrote:

Can you copy and paste your command lines and output, please?

Thanks,
Noel

address@hidden:~/UCSF/peter/R/mspath/src/maketest$ touch x.cc
address@hidden:~/UCSF/peter/R/mspath/src/maketest$ touch x.o
address@hidden:~/UCSF/peter/R/mspath/src/maketest$ touch m.web
address@hidden:~/UCSF/peter/R/mspath/src/maketest$ make x.o
tangling web
touch x.cc
touch m.touch
address@hidden:~/UCSF/peter/R/mspath/src/maketest$ make x.o
compiling x
touch x.o
address@hidden:~/UCSF/peter/R/mspath/src/maketest$ cat Makefile
m.touch: m.web
        @echo tangling web
        touch x.cc
        touch m.touch

x.cc: | m.touch
        @echo x.cc rule

x.o: x.cc
        @echo compiling x
        touch x.o

# I changed the order of commands in m.touch (relative to my original
# post)for greater realism, but it made no difference.





reply via email to

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