[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multidirectory libraries make
From: |
icegood |
Subject: |
Re: Multidirectory libraries make |
Date: |
Wed, 20 Jun 2012 10:26:57 -0700 (PDT) |
Paul Smith-20 wrote:
>
> I don't understand why you have $(sublibraries) as targets. Just make
> the rule to build the actual library invoke the sub-make:
>
> all: $(currlib)
> $(real_sublibraries) :
> $(MAKE) "--directory=$(dir $@)" -f makefile.mak
> $(currlib) : $(obj) $(real_sublibraries)
> ar -cqs $@ $(obj) 2>/dev/null
>
> Untested obviously.
>
>
It tested and tested for a couple of years :) With targeting of
real_sublibraries you'll obtain make that will build not all time namely
when bar depends on obj in F(bar) directory - foo doesn't know about such
change. It's just compares date of libbar.a with own one and decides do
nothing! While dependance on $(sublibraries) works well.
The key is $(sublibraries) is .PHONY depended.
On other hand if i simply would do $(real_sublibraries) to be .PHONY
depended then foo will rebuild always.
--
View this message in context:
http://old.nabble.com/Multidirectory-libraries-make-tp34041256p34044382.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.