On Fri, Apr 10, 2009 at 4:10 PM, Michael R. Head
<[email protected]> wrote:
...
> So this is a common pattern, but we all know that it leads to a lot of
> extra invocations of make and extra output when, most of the time,
> nothing needs to be done.
>
> I'm wondering if it's sensible to do something along these lines, which
> I haven't tried and may require a .SECONDEXPANSION:
>
> $(SUBDIRS): %: $(find % -type f)
>        $(MAKE) -C $@
>
> Is this crazy? It would probably be bad on NFS due to an large number of
> stats, but on a local filesystem it seems like it would be a win.

Since you don't describe the goal of that rule and it doesn't work as
is, I'm neither sure how to correct it nor what gain you think it
would provide.  It looks like you're trying to filter out SUBDIRS
entries that don't actually have files in them, but why would you have
added those to SUBDIRS to begin with?

(If you're really concerned about the overhead or extra output
generated by recursive make, then why not try the non-recursive
approach?)


Philip Guenther


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to