[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



Hej,

On 14:47 Sat 31 May 2008, Kristian Nørgaard wrote:
> >---
> >all: libs mit_target
> >
> >libs:
> >	$(MAKE) -C ../lib1
> >	$(MAKE) -C ../lib2
> >
> >mit_target: $(OBJ)
> >	$(CC) $< -o $@
> >---
> 
> hmmm, jeg har været der.
> Men den løsning betyder at
> "make mit_target"
> så ikke kan bruges med sikkerhed for korrekt build.
> 
> og at forlade sig på default target ("all" ) er ikke fedt, ikke mindst 
> hvis makefilen håndterer flere targets og du ikke vil bygge alle.

Det target der står øverst i makefilen er default.  Du kunne også have:

---
flap: libs foo

libs:
	$(MAKE) -C ../lib1
	$(MAKE) -C ../lib2

foo:foo.c
	$(CC) $< -o $@
---

> 
> >Så vidt jeg husker er det vigtigt at man bruger $(MAKE) variablen til at
> >kalde make fra makefiler.
> 
> Du har ret, jeg har sjusket lidt.
> shame on me.
> 
> /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] *