help-make
[Top][All Lists]
Advanced

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

Re: use of wildcard function recursively


From: Jason Lunz
Subject: Re: use of wildcard function recursively
Date: Thu, 16 Mar 2006 15:59:31 +0000 (UTC)
User-agent: slrn/0.9.8.1 (Debian)

address@hidden said:
> Or, you may be thinking of the maximum size of the environment
> (env. vars + command line etc.)  This is only relevant when actually
> invoking a new process, and it's a kernel-level limit (that means it
> doesn't matter what your program is: shell, make, whatever: the limit is
> the same for everything).

speaking of which, what do you do when you hit this limit? I have a
makefile that builds a huge list of filenames, then selects subsets of
this list for various purposes, ie:

ALLFILES:=$(shell find -type f)
CFILES:=$(filter %.c, $(ALLFILES))
JAVAFILES:=$(filter %.java, $(ALLFILES))

I've found this to be faster than running multiple find commands.

However, on this project, ALLFILES has grown to the point where it no
longer fits on a single command line. I can't do this, for example:

allfiles.list: $(ALLFILES)
        echo $(ALLFILES) | tr ' ' '\n' > $@

because that command is just too big.

What's the best workaround for this in GNU make?

Jason





reply via email to

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