[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] [MAKE] undgå rebuild



Hvis jeg var dig ville jeg læse følgende artikkel.

"Recursive make considered harmful"

http://miller.emu.id.au/pmiller/books/rmch/

Den indeholder nogle rigtig gode pointer mht. make og hvordan man kan sikre sig at undgå at rebuilde med mindre det rent faktisk er nødvendigt.

Mvh

Lars

--
Please download my certificate and use it to send encrypted mail.
On http://www.certifikat.dk/ use "søg efter certifikat" and enter "sslug@sslug", click the download icon (A down arrow)


On May 31, 2008, at 11:10 AM, Kristian Nørgaard wrote:

Beklager den dårlige emnelinie, mit emne er ikke helt nemt at beskrive kort.

Make er noget rod, og nu har jeg efterhånden hacket frem og tilbage alt for længe. Der må være standard løsninger på mit problem:

Makefil eksempel:
---------
mit_target: $(OBJS) $(LIBS)
	buildkommando bla bla
---------

Jeg vil gerne bygge "mit_target" som er afhængigt af nogle libs der ligger i andre mapper. Jeg vil gerne sikre mig at alle $(LIBS) er up-to-date, men jeg vil jo helst lade det være op til Makefilerne i de andre mapper at bestemme hvorvidt af et lib er up-to-date.
Altså vil jeg gerne at
"make mit_target"
altid indebærer at der udføres kommandoer a la:

make -C folder1 lib1
make -C folder2 lib2

Det tænkte jeg kunne gøres med:
-----------
mit_target: $(OBJS) checklibs $(LIBS)
	buildkommando bla bla

checklibs:
	make -C folder1 lib1
	make -C folder2 lib2
----------

Men det får make til at bygge 'mit_target' hver eneste gang fordi 'checklibs' regnes for en afhængighed der er nyere end 'mit_target'.

Hvad er den gode løsning?
/ Kristian



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2008-07-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *