help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Invoking Make recursively with different targets


From: Prasad Venkata Boddupalli
Subject: Invoking Make recursively with different targets
Date: Thu, 11 Aug 2005 17:21:03 -0700 (MST)

Hi,

The recursive invocation of make need to be controlled using different
targets. For instance,

make build

should invoke make recursively using the target build. I thought that the
following solution would solve the problem.

>build-subdirs=kernel lib drivers net fs apps
>clean-subdirs=$(build-subdirs)

>.PHONY: all clean build $(build-subdirs) $(clean-subdirs)

>all: clean build

>build: $(build-subdirs)

>clean: $(clean-subdirs)

>$(build-subdirs):
>    $(MAKE) -C $@ all install

>$(clean-subdirs):
>    $(MAKE) -C $@ clean

But make complains

warning: overriding commands for target `xxx''
warning: ignoring old commands for target `xxx''

I guess there is nothing I can do as those errors are bound to show up. Is
there any way I can communicate the target to execute to sub-makefiles ?

thanks,
Prasad.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]