axiom-developer
[Top][All Lists]
Advanced

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

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


From: Gabriel Dos Reis
Subject: Re: [Axiom-developer] build-improvements and latex
Date: 08 Nov 2006 03:23:11 +0100

"Page, Bill" <address@hidden> writes:

[...]

| > 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
| be:
| 
|      $(builddir)/%.c: $(srcdir)/%.pamphlet
|              $(axiom_build_document) --tangle=$@ --output=$@ $<
| 
| because by default the --tangle option in 'document' will
| extract the root chunk.

Yes; but the root chunk corresponds to the .c files.  Most of them
look like this:

    <<*>>=
    <<license>>
    <<titlebar.c>>
    @ 

I must confess that I did not invent anything there:  I just
abstracted over the repetitions.

However, for header files, the rules look like this:

   <<header files>>=
   .PRECIOUS: $(builddir)/%.h

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

| 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;
|     fi

this is when $chunk is specified.  That is doable.  We just have to
check when it is not specified and use the other rule.

-- Gaby




reply via email to

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