[GRASS-dev] make on SMP [was: GRASS 6.3.0 release preparation]
glynn at gclements.plus.com
Thu Oct 18 12:41:40 CEST 2007
Glynn Clements wrote:
> Note to self (and anyone else who it concerns): a dependency such as
> "foo: bar" does *not* make "foo" into an alias for "bar". Sure, making
> foo will make bar, but if foo has other prerequisites, they will be
> made in parallel with bar, not before it.
> Ugh. I don't immediately know how to solve this, but I do at least
> know what's going on now. I'm fairly sure that that this is the cause
> of many of the outstanding problems with parallel builds.
One possibility is to avoid listing real files as prerequisites of
phony targets. E.g. instead of:
But that's going to significantly increase the number of recursive
make invocations, which can get quite ugly.
The other option is to avoid phony targets altogether and use
variables instead. I.e. change the Makefiles from e.g.:
where CMD would be defined in Module.make as:
CMD = $(BIN)/$(PGM)$(EXE)
But that means rewriting every single Makefile.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev