[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: [CPROG] Andre problemer med make filer



jonasbn wrote:

> Hej,
>
> Jeg har problemer med noget makefil sammenhæng. Jeg har to uafhængige C
> programmer, og tre make filer:
>
>         ./Makefile
>         ./server/Makefile
>         ./client/Makefile

Er du i gang med tcPIP? -- jeg kan sikkert hjælpe!
sslug@sslug

> Hvordag får jeg på den smarteste måde lavet en afhængighed så når man
> kører top-level makefilen checker den, og evt. kører, de andre
> Makefiler automatisk?

Den *smarteste* måde skal jeg ikke gøre mig klog på -- heller ikke den
*nemmeste* -- men en nem og forholdsvis smart måde er at lade "sub"
makefiles være dependencies for target og at vidergive
kommandolinie-argumentet til disse:

.PHONY: default sub clean et_al

default:    sub
    $(local_global_default_targets)

clean:    sub
    $(RM) $(local_global_default_targets)

et_al:    sub
    $(ad_lib)

sub:
    $(MAKE) -C server $(MAKECMDGOALS)
    $(MAKE) -C client $(MAKECMDGOALS)
#    cd server && $(MAKE) $(MAKECMDGOALS) hhv.
#    cd client && $(MAKE) $(MAKECMDGOALS) har samme betydning

> Jeg har kigget i Gnu Make manualen, og der lader til at være mange
> uafhængigheder, så jeg har svært ved at vælge...

> Jonas

Hej fra Nils!




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 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] *