Hi Bob, Brian, * Brian Dessent wrote on Sat, Apr 19, 2008 at 06:23:59AM CEST: > Method B, not GNU make specific, using a single witness stamp along the > lines of what is suggested in the manual: [...] > pyxml-stamp: $(PYXMLFILES) > @rm -f pyxml-tmp > @touch pyxml-tmp > (set -e; for F in $<; do \ > python $(abs_top_srcdir)/gen.py $$F; \ > done) > @mv -f pyxml-tmp $@ [...] > Notes: > - This should be parallel-make safe due to the single stamp file, > except for the contrived situation mentioned in the manual where one or > more generated file is removed without also removing the stamp. > - But also due to a single stamp file representing all .xml files, > parallel make won't be able to run multiple python invocations in > parallel, and if one .xml file is modified they will all be regenerated.
Well, this scheme can easily be generalized to one stamp file per set of output files, no? And then it parallelizes well, too. Cheers, Ralf
