Attached are three files:
1. automakefaq.def is a list of questions and answers. The list is
one question long. :-) It points into the automake documentation.
2. automakefaq.tpl facilitates pointing into the documentation by
adjusting symbolic names (e.g. "Program and Library Variables")
into a spot on a page
(e.g. "/manual/automake/html_node/automake_32.html#SEC32")
3. automakeweb.tlib a template library that might be useful for other
generated web pages.
If the automake manual is rebuilt and the section numbering changes,
then you must do this:
export AM_HTMLDOC_DIR=/path/to/manual/automake/html_node
autogen automakefaq.def
Oh, I added a fourth file: the generated html, too.
AutoGen Definitions automakefaq;
faq = {
name = compiles;
question = "Questions relating to compile options";
};
faq = {
name = multi_cflags;
question = "How can I set different compile flags for different compiles?";
answer = <<- END_OF_ANSWER
It depends. :-) If all the compilation units for a particular executable
take the same options, but the options for the different executables are
different, then you may set a per-binary CFLAGS macro. See <?
doc-ref sec-name = 'Program and Library Variables'
?>.
<p>On the other hand, if the compilation units for the same executable
must use different flags, or if the same source must be compiled with
different flags, then you must write special rules. See <?
doc-ref sec-name = 'Building etags and ctags'
?>.
END_OF_ANSWER;
};
<? AutoGen5 Template html=amfaq.html -*- Mode: HTML -*- ?>
<? INCLUDE "automakeweb.tlib" ?><?
INVOKE header title = "Frequently Asked Questions" ?>
<hr>
<table><?
(define idx 0) ?>
<tr><td>Ref.</td><td>Question</td></tr><?
FOR faq ?><?
IF (exist? "answer") ?>
<tr><td valign=top><a href="#<? name ?>"><? (set! idx (+ idx 1)) idx ?>.</td>
<td><? question ?></td></tr><?
ELSE answer ?>
<tr><td colspan="2"><p><center><? question ?></center></td></tr><?
ENDIF answer ?><?
ENDFOR faq ?>
</table><p><hr><table><?
(set! idx 0)
(define tmp-file "agfaqtmp.tpl") ?><?
FOR faq ?><?
IF (exist? "answer")
?>
<tr><td valign=top><a name="<? name ?>"><? (set! idx (+ idx 1)) idx ?>.</td>
<td><? question ?></td></tr>
<tr><td> </td><td>
<?
(out-push-new tmp-file)
?><<?#?>? AutoGen5 Template null ?<?#?>>
<?
(get "answer") ?><?
INCLUDE (out-pop) tmp-file ?></td><?
ENDIF answer ?><?
ENDFOR faq ?>
</table><? INVOKE trailer ?><?
(delete-file tmp-file) ?>
AutoGen5 Template null -*- Mode: html -*- ?>
DEFINE header
?> (dne " == " "
GNU Automake - title ?>ENDDEF ?> DEFINE trailer ?> Return to GNU's home page. Please send FSF & GNU inquiries & questions to [EMAIL PROTECTED]. there are also other ways to contact the FSF. Please send comments on these web pages to [EMAIL PROTECTED], send other questions to [EMAIL PROTECTED]. Copyright (C) 1997, 1998 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. Updated: $Date: `date`?> $ $Author: `id|sed 's,).*,,;s/^.*(//'` ?> $ ENDDEF ?> DEFINE doc-ref 9.4 Program and Library Variables ?>.*,,'" (raw-shell-str (get "sec-name")) ) ?>"> sec-name ?> ENDDEF ?> |
GNU Automake - Frequently Asked Questions
Return to GNU's home page. Please send FSF & GNU inquiries & questions to [EMAIL PROTECTED]. there are also other ways to contact the FSF. Please send comments on these web pages to [EMAIL PROTECTED], send other questions to [EMAIL PROTECTED]. Copyright (C) 1997, 1998 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. Updated: $Date: Sat Jul 13 13:17:14 PDT 2002 $ $Author: bkorb $ | ||||||||||
