I understand that by using pattern rules multiple targets can be built by running a rule just once, but I don't see a good way to express this particular command as a pattern rule.
My current makefile fragment looks like:
- package.h package.c foo.h bar.h: foo.idl bar.idl package.dsc
- idl package.dsc
- idl package.dsc
This fails when --jobs is set to anything greater than 1 because make sees that foo.h and bar.h are required (by other parts of the build) and concurrently runs the idl command.
I tried converting this to a pattern rule as follows:
- %.h %.c foo.h bar.h: foo.idl bar.idl %.dsc
- idl package.dsc
- idl package.dsc
- makefile: *** mixed implicit and normal rules. Stop.
- %.h %.c: foo.idl bar.idl %.dsc
- idl package.dsc
- foo.h bar.h: package.h
- idl package.dsc
Is there any other way to tell make to not build specified targets in parallel? It sure would be nice if there was some syntax that would allow one to group targets as being generated from a single rule (other than via pattern rules).
Any help would be appreciated.
