[Top][All Lists]

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

RE: [Axiom-developer] build-improvements and latex

From: Page, Bill
Subject: RE: [Axiom-developer] build-improvements and latex
Date: Tue, 7 Nov 2006 18:53:31 -0500

On November 07, 2006 5:43 PM Ralf Hemmecke wrote:
> ... 
> One suggestion could be to have particular chunk names that 
> say what are the "top-level" chunks and which are the
> corresponding filenames for notangle.

Yes, I agree that the convention for notangle should interact
with chunk names. There is at least one system that uses noweb
format with the convention that all chunk names that "look like
file names" automatically imply extraction as a file name. E.g.

Or we could adopt something like you suggest, i.e. a special
"top-level" chunk that contains that names of chunks to create
as files. But I think that would also have the negative effect
of hiding implicit file names inside the pamphlet file. In a
make script I think it is better to make it obvious how the
dependency is satisfied e.g.

file.c: filename.pamphlet
        document --tangle='file.c' filename.pamphlet

would extract the chunk -R 'file.c' as a file named 'file.c'
from the file 'filename.pamphlet'. Or see Gaby's stanza
template rule and my proposed modification below.

>  (I explicitly say notangle, since I still want to see my
> suggestion of adding ".tex" to obtain ".pamphlet.tex" for
> noweave.)

It is possible to use srcltx even if we don't keep the
*.pamphlet.* part if we assume that all .dvi files are
derived from .pamphlet files. Right? I think this is a
reasonable assumption for Axiom given the policy on literate

On Tuesday, November 07, 2006 6:02 PM Gaby wrote:

> ...
> Bill Page wrote: 
> | Maybe it should be written:
> | 
> |   notangle file.pamphlet -R 'file.c' > file.c
> Yes, that is was it is written:
>     $(builddir)/%.c: $(srcdir)/%.pamphlet
>             $(axiom_build_document) --tangle --output=$@ $<

I think with the current 'document' script that would have to

     $(builddir)/%.c: $(srcdir)/%.pamphlet
             $(axiom_build_document) --tangle=$@ --output=$@ $<

because by default the --tangle option in 'document' will
extract the root chunk.

I would suggest allowing the --output option to default to the
chunk name instead of begin derived from the pamphlet name.  Then
one could wrote:

     $(builddir)/%.c: $(srcdir)/%.pamphlet
             $(axiom_build_document) --tangle=$@ $<

I.e. patch 'document' like this:

    if [ -z $output ]; then
-       output=`basename $file .pamphlet`;
+       output=$chunk;

Bill Page.

reply via email to

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