"Page, Bill" <[EMAIL PROTECTED]> 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
_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer