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

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

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


From: Jan Hudec
Subject: Re: [Gnu-arch-users] Re: Build System links/ recommendations
Date: Sun, 5 Sep 2004 16:17:30 +0200
User-agent: Mutt/1.5.6+20040818i

On Sun, Sep 05, 2004 at 14:29:43 +0200, Robin Farine wrote:
> On Sunday 05 September 2004 09.23, Jan Hudec wrote:
> > On Sun, Sep 05, 2004 at 02:12:38 +0200, Robin Farine wrote:
> 
> > > This looks too simple so I must have missed something, but it
> > > looks like it is equivalent.
> 
> > So try it ;-). You'll find out it isn't. It checks the timestamp
> > on subdir/mylib too early and even if the subdir makefile does
> > something, myprog is not relinked.
> 
> :) OK, it _was_ too simple.
> 
> The introduction of an intermediate target that is not updated 
> unless it does not exist seems to solve (?) the problem.
> 
> * Makefile:
> 
> myprog: subdir-libs.dummy subdir/mylib
>       touch $@
> 
> subdir-libs.dummy: subdir-libs
>       @test -f $@ || touch $@
> 
> .PHONY: subdir-libs
> subdir-libs:
>       $(MAKE) -C subdir libs
> 
> 
> * subdir/Makefile:
> 
> .PHONY: libs
> libs: mylib
> 
> mylib: ronron
>       touch $@
> 
> ronron:
>       touch $@

No, it does not seem to work either. The binary is always relinked,
though the prerequisites did not change. Either the dependency has
non-empty command and the binary is always rebuilt, or it has an empty
command and the dependencies are checked in wrong order.

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

Attachment: signature.asc
Description: Digital signature


reply via email to

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