gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] Build System links/ recommendations


From: Jan Hudec
Subject: Re: [Gnu-arch-users] Build System links/ recommendations
Date: Fri, 3 Sep 2004 20:41:45 +0200
User-agent: Mutt/1.5.6+20040818i

On Fri, Sep 03, 2004 at 19:33:41 +0100, Andrew Suffield wrote:
> On Fri, Sep 03, 2004 at 08:25:45PM +0200, Jan Hudec wrote:
> > On Fri, Sep 03, 2004 at 16:37:47 +0100, Andrew Suffield wrote:
> > > On Fri, Sep 03, 2004 at 05:16:43PM +0200, Jan Hudec wrote:
> > > > $ cat ,test.mk 
> > > > @foo : | @bar
> > > >         touch @foo
> > > > 
> > > > @bar :
> > > >         test -f @bar || touch @bar
> > > > 
> > > > .PHONY: @bar
> > > > $ touch @foo
> > > > $ make -f ,test.mk @foo
> > > > test -f @bar || touch @bar
> > > > $
> > > > 
> > > > This does not count either.
> > > 
> > > Why not? That's exactly what you asked for: go recurse to the makefile
> > > that can make the test properly, but don't prejudice the rebuild
> > > because we recursed.
> > >
> > > Obviously it makes no sense if you're not recursing.
> > 
> > Obviously, because if it did count, it would have to read:
> > 
> > test -f @bar || touch @bar
> > touch @foo
> > 
> > Because I have *TOUCHED* @bar. And thus it *IS* newer than @foo and thus
> > @foo *MUST* be remade -- but isn't.
> 
> Oh, you'll need a regular dependency as well for that. Just don't
> supply a rule for it.

Ok. This seems to work:

@foo : | @bar
        touch @foo

@foo : @bar

@bar :
        test -f @bar || touch @bar

But well, now do you really consider this obvious? It takes a hell lot
of reading the manual or asking stupid questions to make this work. And
it should be quite common thing to do with recursive makefiles...

-------------------------------------------------------------------------------
                                                 Jan 'Bulb' Hudec 
<address@hidden>

Attachment: signature.asc
Description: Digital signature


reply via email to

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