Date: Tue, 24 Jun 1997 09:40:38 +0300 (IDT) From: Eli Zaretskii To: Hans-Bernhard Broeker cc: djgpp-workers AT delorie DOT com Subject: Re: Library rebuilds In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 23 Jun 1997, Hans-Bernhard Broeker wrote: > > How about using `find'? Something like so (untested!): > > > > all: force > > find . -type d -depth -prune -exec make_in {} ';' > > Of course, that's exactly what the script implementation of rmake does, in > a nutshell (and DJ's (?) make.sh as well). But that means I have to assume > the user of my Makefiles has find installed, which, so far, I hesitated to > do, on the same grounds I didn't use Bash. `find' is standard on Unix, and I think the options I used above are supported by all versions of it (though I didn't look further than the man page on the nearest Unix box). DJGPP's port of `find' is a veteran that can be treated as stable enough, I think. Btw, a slightly better way of doing the above is like so: all: force find . -type d -depth -prune -exec $(MAKE) $(MAKEFLAGS) dir={} sub ';' sub: force cd $(dir) ; $(MAKE) $(MAKEFLAGS) all This tosses the shell script in the previous example, so is independent of the shell that's installed. Note that the `sub:' rule will work with both Unix-like and stock DOS shells because the DJGPP ports of Make 3.75 and later (3.76 is on alpha.gnu) calls `system' to run the commands, and `system' in 2.01 emulates the `cd' command and supports multiple commands separated by `;'. (When presented with a Unixy shell such as Bash, Make just calls it to do everything, so the above also works; and of course it works on Unix.) > Make, Bash, Find, Sed, Fileutils, Textutils (for cat) > > This list already quite long, and we're not finished yet. I am still not sure you need Bash. But even if you do, most people who build packages for themselves already have most of these installed (Bash might be the only exception). You could try asking people here to tell you how many don't have these, if you care to know.