Reputation: 301
I am using autotools heavily in a project written in the SpecC language. I need to find a way to make all of the Makefile.ams in my build tree share the same build rule for .sc files, to use the 'scrc' compiler on them. I am having a heck of a time finding examples for this on Google or Stack Overflow, so I thought I'd ask myself her on SO.
Upvotes: 1
Views: 87
Reputation: 22519
There's no completely automatic way to share a rule like this. You do have some options, though.
One option is not to use a recursive build. That is, have a single Makefile.am
(perhaps using Automake's include
and %reldir%
features to allow simpler subdirectory maintenance), and put your rule there. This style of build is normally faster and parallelizes better, for added benefits.
Another option is to put your rule into a separate file, and then include
it from each Makefile.am
that needs it.
Upvotes: 4