help-make
[Top][All Lists]
Advanced

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

RE: more general question on parallelization and checkpoints


From: Robert P. J. Day
Subject: RE: more general question on parallelization and checkpoints
Date: Wed, 9 Mar 2005 12:29:45 -0500 (EST)

On Wed, 9 Mar 2005, Ian Dunbar wrote:

> If I understood what you are asking you can do it with something like this:
>
> # dependencies for "clean" (this is surely marco-izable somehow?)
> all_clean= clean.pre clean.post clean.do
> .PHONY: ${all_clean}
> clean: ${all_clean}
> clean.pre:
> clean.do: ${SUBDIRS} | clean.pre
> clean.post: | clean.do
>
> # repeat above for build config install, etc...
>
> # general subdirs rule
> ${SUBDIRS}:
>       @echo $@ ${MAKECMDGOALS}
>
>
> # target specific pre and post rules
> install.pre:
>       @echo $@
>
> clean.post:
>       @echo $@
>
>
> If you do something like "make clean install" it messes it up a bit, so you
> have to limit yourself to one target per make invocation.

exactly, which is not something you might be able to do if you have
several developers using the same build structure who don't feel like
following the rules.  i already ran into *precisely* that limitation.

what i'm thinking about is fairly easy to imagine, but not so easy to
implement.  if you consider a fairly standard structure -- several
subdirectories, each of which is designed to handle a fairly standard
set of targets like "clean", "build", "install" -- then if you have
the ability to run parallel makes, it's easy to see that a lot of
stuff can be done in parallel.  for example, each subdirectory should
*certainly* be able to do a "clean" independent of the others.  that
part's not a problem.

but it's not hard to envision a situation like i described -- no
subdirectory can run the "install" step until an install
"pre-processing" stage is done.  and perhaps a post-processing stage
afterwards.

and perhaps i can't start *any* build step until *all* configure steps
are done (yes, that's a ridiculous analogy, but i'm just being silly).
i'm just imagining what kinds of very general dependencies can be
defined across parallelizable directories.

i think i just need to do more reading.

rday




reply via email to

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