Documentation
git-svn-id: svn+ssh://svn.gna.org/svn/bsdmakepscripts/trunk@322 3103e521-a7b5-4707-98a8-f8ec597c7033
Michael Grünewald
12 years ago
17 | 17 | # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt |
18 | 18 | |
19 | 19 | |
20 | # SYNOPSIS | |
21 | # | |
20 | ### SYNOPSIS | |
21 | ||
22 | 22 | # NOTANGLE = code1.c |
23 | 23 | # NOTANGLE+= code1.h |
24 | 24 | # NOTANGLE+= code2.c |
31 | 31 | # |
32 | 32 | # .include "bps.noweb.mk" |
33 | 33 | |
34 | # DESCRIPTION | |
35 | # | |
36 | # Le module `bps.noweb.mk' fournit un service pour utiliser l'outil de | |
37 | # programmtion lettrée NOWEB dans un projet. Les fonctionnalités de ce module | |
38 | # sont de bas niveau et il peut-être utilisé à bon escient dans des modules | |
39 | # plus sophistiqués. | |
40 | ||
41 | # | |
42 | # Description des variables | |
34 | ### DESCRIPTION | |
35 | ||
36 | # Require the use of `noweb' to produce object files described by | |
37 | # input files enumerated in the NOWEB variable. | |
38 | # | |
39 | # The files enumerated by the NOTANGLE variable (program files) are | |
40 | # produced with a call to `notangle', this is called _tangling_. | |
41 | # | |
42 | # The documents enumerated by the NOWEAVE variable (documentation files) | |
43 | # are produced with a call to `noweave', this is called _weaving_. | |
44 | # | |
45 | # The variable NOWEAVE_DEVICE controls the output format of the | |
46 | # weaving procedure. If it is defined, the NOWEAVE_MASTER variable | |
47 | # contains the name of the master document that wishes to include | |
48 | # weaving output. | |
49 | ||
50 | ||
51 | # | |
52 | # General variables | |
43 | 53 | # |
44 | 54 | |
45 | 55 | # NOWEB |
46 | 56 | # |
47 | # Énumère les fichiers noweb. | |
48 | # | |
49 | # Cette liste des fichiers est utilisée comme argument aux programmes noweave | |
50 | # et notangle. Pour chacun de ces fichiers des paramètres individuels peuvent | |
51 | # être définis. | |
57 | # Enumerate `noweb' source files | |
58 | # | |
59 | # This list is passed to `noweave' for weaving and to `notangle' for | |
60 | # tangling. | |
61 | # | |
62 | # Each target in the NOWEAVE or NOTANGLE list can provide its own | |
63 | # specialised value for this variable. | |
52 | 64 | |
53 | 65 | # NOTANGLE |
54 | 66 | # |
55 | # Énumère la liste des fichiers devant être produits par notangle. | |
67 | # Enumerate tangling target files | |
68 | ||
69 | # NOWEAVE_DEVICE (latex html) | |
70 | # | |
71 | # Enumerate target devices for the documentation | |
72 | # | |
73 | # Possible values are sublists of: tex latex html troff text. | |
56 | 74 | |
57 | 75 | # NOWEAVE |
58 | 76 | # |
59 | # Fichier devant être produit par noweave. | |
77 | # Enumerate target documents | |
78 | ||
79 | ||
80 | # | |
81 | # Tangling | |
82 | # | |
83 | ||
60 | 84 | |
61 | 85 | # NOTANGLE_LINE_HINTS |
62 | 86 | # |
63 | # Format des indications de numéro de ligne par notangle. | |
87 | # Format to use for line hints generated by `noweave' | |
88 | # | |
89 | # This variable can be set to any value acceptable by `noweave's `-L' | |
90 | # flag. These values are described in `noweave(1)'. | |
64 | 91 | |
65 | 92 | # NOTANGLE_TABS |
66 | 93 | # |
67 | # Largeur d'une tabulation. | |
68 | # | |
69 | # Si cette variable est définie, notangle utilise des tabulations pour | |
70 | # présenter le code, et utilise la valeur de cette variable comme largeur | |
71 | # des tabulations. | |
94 | # Space between tab stops | |
95 | # | |
96 | # If this variable is set to "yes" or an integer T then tabs are copied | |
97 | # untouched in the output and sequences of spaces are converted into | |
98 | # tabs, combining 8 or T spaces into a tabulation character. | |
72 | 99 | |
73 | 100 | # NOTANGLE_FILTER |
74 | 101 | # |
75 | # Énumère la liste des filtres utilisés par notangle. | |
102 | # List of filters to be used by `notangle' | |
103 | # | |
104 | # See the `-filter' option in `notangle(1)'. | |
76 | 105 | |
77 | 106 | # NOTANGLE_MARKUP |
78 | 107 | # |
79 | # Analyseur syntaxique à utiliser sur les fichiers sources. | |
80 | # | |
81 | # Si cette variable est définie, sa valeur est un programme que notangle | |
82 | # utilise pour filtrer les sources avant de les traiter. | |
83 | ||
84 | # NOWEAVE_CHUNKS | |
85 | # | |
86 | # Format utilisé pour les bouts de documentation dans les fichiers noweb. | |
87 | # | |
88 | # Valeurs autorisées: tex, latex, troff, custom | |
89 | ||
90 | # NOWEAVE_DEVICE | |
91 | # | |
92 | # Énumère les formats des fichiers de documentation à produire. | |
93 | # | |
94 | # Cette énumération peut contenir les termes: | |
95 | # texte, tex, latex, troff, html. | |
108 | # Syntactic analyser to use on source files | |
109 | # | |
110 | # See the `-markup' option in `notangle(1)'. | |
111 | ||
112 | ||
113 | # | |
114 | # Weaving | |
115 | # | |
116 | ||
117 | ||
118 | # NOWEAVE_MASTER | |
119 | # | |
120 | # Master document for `noweave's output | |
121 | # | |
122 | # If this variable is set, it will prevent the generation of some | |
123 | # header and footer of the document by `noweave;. | |
124 | ||
125 | # NOWEAVE_CHUNKS (latex) | |
126 | # | |
127 | # Format used by documentation chunks | |
128 | # | |
129 | # This value controls the utilisation of filter converting from | |
130 | # documentation chunk format to output device format. | |
131 | # | |
132 | # Possible values are: tex, latex, troff, custom. | |
133 | ||
96 | 134 | |
97 | 135 | # NOWEAVE_FILTER |
98 | 136 | # |
99 | # Énumère les filtres que noweave doit utiliser. | |
137 | # List of filters that shall be used by `noweave' | |
138 | # | |
139 | # See the `-filter' option in `noweave(1)'. | |
140 | ||
100 | 141 | |
101 | 142 | # NOWEAVE_MARKUP |
102 | 143 | # |
103 | # Analyseur syntaxique utilisé dans le prétraitement des fichiers noweb. | |
144 | # Syntactic analyser to use on source files | |
145 | # | |
146 | # See the `-markup' option in `noweave(1)'. | |
104 | 147 | |
105 | 148 | # NOWEAVE_INDEX |
106 | 149 | # |
107 | # Drapeau contrôlant la production d'un index. | |
108 | # | |
109 | # Ce drapeau n'est pris en compte que pour la production de la documentation | |
110 | # au format HTML ou LaTeX. | |
150 | # Flag controlling the preparation of an index | |
151 | # | |
152 | # It is only taken into account for output devices html and latex. | |
111 | 153 | |
112 | 154 | # NOWEAVE_AUTODEFS |
113 | 155 | # |
114 | # Langage pour lequel les définitions doivent être devinées. | |
156 | # Language for which definitions should be guessed | |
115 | 157 | |
116 | 158 | # NOWEAVE_HTML_CSS |
117 | 159 | # |
118 | # Feuille de style CSS | |
119 | # | |
120 | # La valeur de cette variable est insérée dans le fichier | |
121 | # HTML. | |
160 | # Path to the CSS | |
161 | # | |
162 | # It is only taken into account for the html output device. | |
163 | ||
122 | 164 | |
123 | 165 | # NOWEAVE_LATEX_WRAPPER (yes) |
124 | 166 | # |
125 | # Drapeau contrôlant l'utilisation du `wrapper' noweave | |
126 | # | |
127 | # Si la valeur de cette variable est `yes', noweave ajoute lui-même un | |
128 | # préambule minimal à sa sortie. Si la valeur de cette variable est `delay' | |
129 | # alors noweave est appelé avec l'option `delay'. | |
130 | # | |
131 | # Les variables `NOWEAVE_LATEX_*' définies ci-dessous permettent de modifier | |
132 | # le document LaTeX dans de petites proportions. Pour toutes les situations | |
133 | # un tant soit peu complexes, et notamment la production d'une page HTML et | |
134 | # d'un document LaTeX à partir d'une même source, l'emploi de ces variables | |
135 | # sont à éviter, il faut lui préférer `NOWEAVE_LATEX_WRAPPER=delay'. | |
167 | # Flag controlling the emission of a document wrapper | |
168 | # | |
169 | # If the value of this variable is "yes", then `noweave' will wrap | |
170 | # its output into a header and footer. You can customize this header | |
171 | # and footer with some of the `NOWEAVE_LATEX_*' and `NOWEAVE_HTML_*' | |
172 | # variables described below. | |
173 | # | |
174 | # If you want to supply your own wrapper in your noweb sources, you | |
175 | # must set this variable to "delay". | |
176 | # | |
177 | # If this variable is set to another value, `noweave's output will be | |
178 | # suitable for inclusion in a larger document. | |
179 | # | |
180 | # This flag controls the `-n' and `-delay' options described in | |
181 | # `noweave(1)'. | |
136 | 182 | |
137 | 183 | # NOWEAVE_LATEX_DEFS |
138 | 184 | # |
139 | # Fichiers contenant des définitions l2h | |
140 | # | |
141 | # Les fichiers LaTeX dont les nom sont donnés par cette variable sont filtrés | |
142 | # pour retenir les définitions l2h qu'il contient et ajouté en tête de la | |
143 | # liste des fichiers traités par noweave. | |
144 | # | |
145 | # Le produit du fichier filtré est l2h.defs. | |
185 | # File containing `l2h' definitions | |
186 | # | |
187 | # LaTeX files whose names are enumerated by this variable are | |
188 | # filtered to extract `l2h' definitions helping the conversion from | |
189 | # your LaTeX document into HTML. | |
190 | # | |
191 | # The output file is `l2h.defs'. | |
192 | ||
146 | 193 | |
147 | 194 | # NOWEAVE_LATEX_OPTION |
148 | 195 | # |
328 | 375 | |
329 | 376 | |
330 | 377 | # Préparation des outils |
331 | ||
332 | 378 | .for file in ${NOWEAVE} |
333 | 379 | .for device in ${NOWEAVE_DEVICE} |
334 | 380 | _NOWEAVE_TOOL.${device}.${file:T}?= ${_NOWEAVE_TOOL.${file:T}} |
347 | 393 | |
348 | 394 | |
349 | 395 | # Préparation spécifique à LaTeX |
350 | ||
351 | 396 | .if !empty(NOWEAVE_DEVICE:Mlatex) |
352 | 397 | .if ${NOWEAVE_LATEX_WRAPPER} == yes |
353 | 398 | .if defined(NOWEAVE_LATEX_PREAMBLE)&&!empty(NOWEAVE_LATEX_PREAMBLE) |
377 | 422 | .endif #!empty(NOWEAVE_DEVICE:Mlatex) |
378 | 423 | |
379 | 424 | # Préparation spécifique à html |
380 | ||
381 | 425 | .if !empty(NOWEAVE_DEVICE:Mhtml) |
382 | 426 | .if defined(NOWEAVE_LATEX_DEFS)&&!empty(NOWEAVE_LATEX_DEFS) |
383 | 427 | CLEANFILES+= ${NOWEAVE_LATEX_DEFS_FILE} |
413 | 457 | .endfor |
414 | 458 | .endfor |
415 | 459 | |
460 | # | |
461 | # Production des documents | |
462 | # | |
416 | 463 | .for file in ${NOWEAVE} |
417 | 464 | .for device in ${NOWEAVE_DEVICE} |
418 | 465 | _NOWEAVE_CMD.${device}.${file} = ${_NOWEAVE_TOOL.${device}.${file:T}} |
419 | 466 | _NOWEAVE_CMD.${device}.${file}+= ${.ALLSRC} |
420 | # | |
421 | # Préparations spéciales pour HTML | |
422 | # | |
467 | ||
468 | # Productions spéciales pour HTML | |
423 | 469 | .if ${_NOWEAVE_DEVICES:M${device}} == html |
424 | 470 | _NOWEAVE_CMD.${device}.${file}+= | htmltoc |
425 | 471 | _NOWEAVE_SED.${device}.${file}+= -e 's%^<tableofcontents>$$%<div id="tableofcontents">%' |
428 | 474 | _NOWEAVE_SED.${device}.${file}+= -e '2s%</head>%<link rel="stylesheet" title="Classic" type="text/css" href="${NOWEAVE_HTML_CSS}" /></head>%' |
429 | 475 | .endif |
430 | 476 | .endif |
477 | ||
478 | # Filtre SED | |
431 | 479 | .if !empty(_NOWEAVE_SED.${device}.${file:T}) |
432 | 480 | _NOWEAVE_CMD.${device}.${file}+= | sed ${_NOWEAVE_SED.${device}.${file:T}} |
433 | 481 | .endif |
482 | ||
434 | 483 | _NOWEAVE_CMD.${device}.${file}+= | cpif ${.TARGET} |
435 | 484 | CLEANFILES+= ${file}${_NOWEAVE_DEVICE.suffix.${device}} |
436 | 485 | ${file}${_NOWEAVE_DEVICE.suffix.${device}}: ${NOWEB.${file:T}} |