[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
 

[MAKE] undgå rebuild



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-06-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] *