%% Darren Granger <[EMAIL PROTECTED]> writes:
dg> .PHONY: all $(DTV_MODULES)
dg> all: $(DTV_MODULES)
dg> st20libr $(LIBS) -o Libs\pace.lib
dg> .PHONY: depends $(DTV_MODULES)
dg> depends: $(DTV_MODULES)
dg> $(DTV_MODULES):
dg> $(MAKE) -C $@
The traditional method is to create new targets by combining the
directory name and the target name, like this:
.PHONY: all $(DTV_MODULES)
all: $(DTV_ALL)
st20libr $(LIBS) -o Libs\pace.lib
DTV_DEPENDS := $(addsuffix .depends,$(DTV_MODULES))
.PHONY: depends $(DTV_DEPENDS)
depends: $(DTV_DEPENDS)
$(DTV_DEPENDS) $(DTV_MODULES):
$(MAKE) -C $(basename $@) $(patsubst .%,%,$(suffix $@))
Note this can be problematic if your directory names contain "."'s, but
you can work around it using other make functions, etc.
Another way is to use the MAKECMDGOALS variable:
.PHONY: all depends $(DTV_MODULES)
all: $(DTV_MODULES)
st20libr $(LIBS) -o Libs\pace.lib
depends: $(DTV_MODULES)
$(DTV_MODULES):
$(MAKE) -C $@ $(MAKECMDGOALS)
This may or may not work as you wish.
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist