[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: order-only dependency and transitivity
From: |
Ross Boylan |
Subject: |
Re: order-only dependency and transitivity |
Date: |
Wed, 9 Jun 2004 14:09:02 -0700 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
On Wed, Jun 09, 2004 at 04:51:13PM -0400, Noel Yap wrote:
> 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
Unfortunately, solving the toy problem in this case doesn't help with
the real one. It would have a rule someting like this:
m.touch: m.web
ftangle -F m.web
touch m.touch
The product of ftangle is a lot of .cc and .h files, but because of
the -F option only some of them are updated. So in terms of the
example, it's as if the m.touch rule might or might not touch x.cc
My current solution is something like this
$(SOURCES): m.web
ftangle -F m.web
but this ends up running ftangle many times, once for each of the
$(SOURCES) that do not get updated.
I could let ftangle update everything by removing -F (or,
equivalently, adding a touch command) but that would result in many
unnecessary recompiles.
>
> 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.
> >
- order-only dependency and transitivity, Ross Boylan, 2004/06/09
- Re: order-only dependency and transitivity, Noel Yap, 2004/06/09
- Re: order-only dependency and transitivity, Ross Boylan, 2004/06/09
- Re: order-only dependency and transitivity, Noel Yap, 2004/06/09
- Re: order-only dependency and transitivity,
Ross Boylan <=
- Re: order-only dependency and transitivity, Paul D. Smith, 2004/06/09
- Re: order-only dependency and transitivity, Ross Boylan, 2004/06/09
- Re: order-only dependency and transitivity, Paul D. Smith, 2004/06/10
- Re: order-only dependency and transitivity, Boris Kolpackov, 2004/06/10
- Re: order-only dependency and transitivity, Ross Boylan, 2004/06/11
- Re: order-only dependency and transitivity, Paul D. Smith, 2004/06/10