autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Literate programming with noweb ...


From: Scott D. Brown
Subject: Literate programming with noweb ...
Date: Wed, 12 Feb 2003 00:16:35 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202

I searched the archives and the manuals and have not found anything
related to this topic so I will throw it out to all of you folks.

Can you use autoconf/automake/libtool in conjunction with literate
programming tools such as noweb?  For those that are asking, "noweb"
is a tool that mingles the source and documentation in one file. You
use a set of processing programs to "extract" the source code (.cpp
and .h files for example) from the document file (.nw file).  It is
not like JavaDoc or the other documentation flavors that "hide" the
documentation in commented code -- the base file has both doc and
source in it and additional tools are *required* to extract and
utilize either.

I have not seen how I could override the rules to produce .cpp files
from the output of the noweb tools.  I have to think that in a world
with automated code generators (yacc(1), etc.) that this sort of thing
has been tried before, but I have struck out on finding it.  I am not
worried about detecting the presence of the noweb tools because that
part I understand (AC_CHECK_PROG).  What I don't understand is how to
teach the autoconfig system how to take a .nw file and make the .cpp
and .h files. The yacc/lex notes about automake state that it expects
the output files to have the default names which leads me to believe
that utilizing these types of programs is actually hard coded in some
what into automake. In the automake manual, section "3.3 Building true
and false" leads me to believe that I could hand code the dependencies
to produce the source code from the base files but that would require
a lot of effort and it would be a maintaince nightmare. The system is
supposed to help simplify and automate this process so I am hoping that
I am just missing something ... of course I presently need to do this
anyway.

I can always create all of the .cpp and .h files prior to distribution
but we would also like to use this semi-automated build environment for
day-to-day development.  And day-to-day we edit the .nw files and our
current "hand-crafted" Makefiles do all the rest.

I know that this is probabely an automake(1) question, but automake did
not appear to habe a mailing list ;)  I am new to using these tools and
any guidance is always apprechiated ...

scott

--
Scott D. Brown // Research Scientist // address@hidden
Digital Imaging and Remote Sensing Lab // Rochester Institute of Technology
54 Lomb Memorial Dr. Rochester, NY 14623 // VX:585.475.7194 // FX:585.475.5988





reply via email to

[Prev in Thread] Current Thread [Next in Thread]