Scott D. Brown wrote:
Anything you write in a Makefile.am that does not look like rules for automake gets passed along into Makefile.in and finally to Makefile.So the two fundemental questions are: 1. Can I introduce a "rule" into my Makefile.am (just like a normal Makefile) that would define how to produce a .o file from the .nw file.
Not at all. make has builtin suffix rules for usual extensions, but you can override them and/or add your own. You can write smth like this:2. Assuming I can do that then I can also create the header files from the noweb files too. How do I teach automake that when foo.cpp needs foo.h that it can be generated from foo.nw using the provided rule. It seems to me that this mechanism does not really exist since these tools are designed for "I have all my source files (.cpp and .h) and what I need is a system to help compile them on any machine"
%.h: %.nw
rule to obtail .h from .nw
%.cpp: %.nw
rule to obtail .cpp from .nw
You should declare .nw files as sources for automake.
What i'm not sure is whether the .h files will be built before trying to conpile the cpp files that depend on them. If not, maybe you should specify the dependencies for object files.
