Hello,
In a Makefile I have a target defined as:
GENHDR := foo.h bar.h baz.h
Those header files are generated by a script and the rule looks like:
$(GENHDR): $(SCRIPT) $(GENDATA)
...commands...
The script actually generates all 3 header files at once when executed.
This works fine if I invoke make serially. However when trying to run
"make -j 5" the rule is invoked for all 3 header files in parallel, i.e.
each invokation of the script ruins the generated header files of the
other 2 running scripts.
How can I prevent this with make magic?
.NOTPARALLEL prevents parallelity for all following targets in the same
Makefile. I only want to prevent parallelity for those 3 targets.
Regards,
Udo.