|
From: | George Lefter |
Subject: | Re: Literate programming with noweb ... |
Date: | Wed, 12 Feb 2003 16:24:29 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210 |
Scott D. Brown wrote:
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.
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.
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"
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:
%.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.
[Prev in Thread] | Current Thread | [Next in Thread] |