[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recursive make
From: |
Robert P. J. Day |
Subject: |
Re: Recursive make |
Date: |
Wed, 30 Mar 2005 09:01:34 -0500 (EST) |
On Wed, 30 Mar 2005, Paul D. Smith wrote:
> In simple cases you can do something like this:
>
> SUBDIRS = (list of subdirectories)
> TARGETS = all default clobber clean debug
>
> .PHONY: $(TARGETS) $(SUBDIRS)
>
> $(TARGETS): $(SUBDIRS)
>
> $(SUBDIRS):
> $(MAKE) -C $@ $(MAKECMDGOALS)
>
my only pedantic contribution to that suggestion is to rename
"TARGETS" to something like "ACTIONS" since, technically, *all* of
those things (including "SUBDIRS") are targets, and the word "ACTIONS"
is a little more self-explanatory. but that's just me -- obviously,
it makes no functional difference.
rday