Subject: "prepare" targets
To: None <>
From: J Chapman Flack <>
List: tech-pkg
Date: 03/05/2005 19:24:46
QCad has a bunch of subirectories, each containing a Makefile, and each
Makefile has a "prepare" and "all" target, where "all" depends on "prepare".

So far so good:  I can set BUILD_DIRS to the list of those directories,
and will visit each one in turn and do
<the whole long cd && make command> all
in each one, which causes each one to "prepare" and then "all".

Here's the problem: they *all* have to be at "prepare" state, before
any of them can advance to "all".  One approach I've thought of is a
pre-build target, where I duplicate everything from do-build in
only the target is  prepare  instead of ${BUILD_TARGET}.  But that requires
me to duplicate a long ugly line of code from the guts of, and
then it doesn't work anyway because it refers to som variables before they
are defined.

Is there a good concise way to do this?