1 | #+ |
---|
2 | # |
---|
3 | # module |
---|
4 | # ====== |
---|
5 | # |
---|
6 | # generation of documentations from XML files in HTML and wiki forms |
---|
7 | # |
---|
8 | # FILES |
---|
9 | # ===== |
---|
10 | # |
---|
11 | # original location |
---|
12 | # ~~~~~~~~~~~~~~~~~ |
---|
13 | # |
---|
14 | # /usr/home/fplod/incas/ircaam/ircaam_ws/adm/guides/makefile sur aedon.locean-ipsl.upmc.fr |
---|
15 | # |
---|
16 | # EVOLUTIONS |
---|
17 | # ========== |
---|
18 | # |
---|
19 | # $Id$ |
---|
20 | # |
---|
21 | # - fplod 2008-12-03T18:05:28Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
22 | # |
---|
23 | # * creation |
---|
24 | # |
---|
25 | #- |
---|
26 | PRODUCT = \ |
---|
27 | ircaam |
---|
28 | |
---|
29 | DIRSRC = \ |
---|
30 | ./ |
---|
31 | |
---|
32 | DIRTMP = \ |
---|
33 | ./ |
---|
34 | |
---|
35 | DIRWWW = \ |
---|
36 | ../../doc/guides/ |
---|
37 | |
---|
38 | DIRWIKI = \ |
---|
39 | $(DIRWWW)/wiki/ |
---|
40 | |
---|
41 | LIST_XML = \ |
---|
42 | LIST_XML_en \ |
---|
43 | LIST_XML_fr |
---|
44 | |
---|
45 | LIST_XML_en = \ |
---|
46 | $(DIRSRC)/svnbasiccommands.xml |
---|
47 | |
---|
48 | LIST_XML_fr = \ |
---|
49 | $(DIRSRC)/web.xml |
---|
50 | |
---|
51 | .PHONY : \ |
---|
52 | all \ |
---|
53 | clean \ |
---|
54 | before \ |
---|
55 | dbkcheck \ |
---|
56 | spellcheck \ |
---|
57 | help \ |
---|
58 | html \ |
---|
59 | tracwiki |
---|
60 | |
---|
61 | help : |
---|
62 | @echo "\$$ make clean" |
---|
63 | @echo "\$$ make before" |
---|
64 | @echo "\$$ make all" |
---|
65 | @echo "\$$ make dbkcheck" |
---|
66 | @echo "++ check link" |
---|
67 | @echo "++ depot html et wiki" |
---|
68 | |
---|
69 | before : |
---|
70 | @mkdir -p ${DIRWWW}/html/ |
---|
71 | @cp -p $(DIRSRC)/style.css ${DIRWWW}/html/ |
---|
72 | @cp -p $(DIRSRC)/$(PRODUCT).css ${DIRWWW}/html/ |
---|
73 | @mkdir -p ${DIRWWW}/wiki |
---|
74 | |
---|
75 | clean : \ |
---|
76 | cleantmp |
---|
77 | -@rm -rf ${DIRWWW}/html/ |
---|
78 | -@rm -rf ${DIRWWW}/wiki/ |
---|
79 | |
---|
80 | cleantmp : |
---|
81 | -@rm -f $(DIRTMP)/*_full.xml |
---|
82 | -@rm -f $(DIRTMP)/err_xmlstarlet_xsd |
---|
83 | -@rm -f $(DIRTMP)/get_sed.xml |
---|
84 | -@rm -f $(DIRTMP)/firststeps_sed.xml |
---|
85 | |
---|
86 | spellcheck : |
---|
87 | @for file in $(LIST_XML_fr); do \ |
---|
88 | aspell --mode=sgml --master=french -c $${file}; done |
---|
89 | @for file in $(LIST_XML_en); do \ |
---|
90 | aspell --mode=sgml --master=english -c $${file}; done |
---|
91 | |
---|
92 | dbkcheck : |
---|
93 | @-rm $(DIRTMP)/err_xmlstarlet_xsd 2> /dev/null |
---|
94 | @for file in $(DIRTMP)/*_full.xml; do \ |
---|
95 | xml val --err \ |
---|
96 | --xsd http://www.docbook.org/xml/5.0/xsd/docbook.xsd \ |
---|
97 | $${file} 1>> $(DIRTMP)/err_xmlstarlet_xsd 2>&1; done |
---|
98 | @echo "check for valid diag for each file in $(DIRTMP)/err_xmlstarlet_xsd" |
---|
99 | |
---|
100 | all : \ |
---|
101 | html \ |
---|
102 | tracwiki |
---|
103 | |
---|
104 | html : \ |
---|
105 | $(DIRWWW)/html/index.html \ |
---|
106 | $(DIRWWW)/html/svnbasiccommands.html |
---|
107 | |
---|
108 | tracwiki : \ |
---|
109 | $(DIRWIKI)/WikiStart \ |
---|
110 | $(DIRWIKI)/SvnBasicCommands |
---|
111 | @echo "Do not forget to import wiki pages" |
---|
112 | @echo "\$$ ssh $(PRODUCT)@forge.ipsl.jussieu.fr mkdir -p /tmp/$(PRODUCT)/" |
---|
113 | @echo "\$$ rsync -av --exclude=".DS_Store" --exclude=".svn" $(DIRWIKI) $(PRODUCT)@forge.ipsl.jussieu.fr:/tmp/$(PRODUCT)/" |
---|
114 | @echo "\$$ ssh $(PRODUCT)@forge.ipsl.jussieu.fr trac-admin /ipsl/forge/projets/$(PRODUCT)/trac wiki load /tmp/$(PRODUCT)/" |
---|
115 | |
---|
116 | @echo "\$$ ssh $(PRODUCT)@forge.ipsl.jussieu.fr rmdir -f /tmp/$(PRODUCT)/" |
---|
117 | |
---|
118 | $(DIRWIKI)/WikiStart : \ |
---|
119 | $(DIRSRC)/tracwiki.xsl \ |
---|
120 | $(DIRTMP)/web_full.xml |
---|
121 | @xsltproc \ |
---|
122 | $(DIRSRC)/tracwiki.xsl \ |
---|
123 | $(DIRTMP)/web_full.xml | \ |
---|
124 | awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ |
---|
125 | sed -e "s+@star@+ *+" \ |
---|
126 | > $@ |
---|
127 | |
---|
128 | $(DIRWWW)/html/index.html : \ |
---|
129 | $(DIRTMP)/web_full.xml \ |
---|
130 | $(DIRSRC)/html.xsl \ |
---|
131 | $(DIRSRC)/style.css \ |
---|
132 | $(DIRSRC)/$(PRODUCT).css |
---|
133 | @xsltproc \ |
---|
134 | --param html.stylesheet "'style.css $(PRODUCT).css'" \ |
---|
135 | --param css.decoration 1 \ |
---|
136 | --param section.autolabel 1 \ |
---|
137 | --output $@ \ |
---|
138 | $(DIRSRC)/html.xsl \ |
---|
139 | $(DIRTMP)/web_full.xml |
---|
140 | |
---|
141 | $(DIRTMP)/web_full.xml : \ |
---|
142 | $(DIRSRC)/web.xml |
---|
143 | @xmllint \ |
---|
144 | --xinclude \ |
---|
145 | --encode utf-8 \ |
---|
146 | --noent \ |
---|
147 | --output $@ \ |
---|
148 | $(DIRSRC)/web.xml |
---|
149 | |
---|
150 | $(DIRWIKI)/SvnBasicCommands : \ |
---|
151 | $(DIRSRC)/tracwiki.xsl \ |
---|
152 | $(DIRTMP)/svnbasiccommands_full.xml |
---|
153 | @xsltproc \ |
---|
154 | $(DIRSRC)/tracwiki.xsl \ |
---|
155 | $(DIRTMP)/svnbasiccommands_full.xml | \ |
---|
156 | awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ |
---|
157 | sed -e "s+@star@+*+" \ |
---|
158 | > $@ |
---|
159 | |
---|
160 | $(DIRWWW)/html/svnbasiccommands.html : \ |
---|
161 | $(DIRTMP)/svnbasiccommands_full.xml \ |
---|
162 | $(DIRSRC)/html.xsl \ |
---|
163 | $(DIRSRC)/style.css \ |
---|
164 | $(DIRSRC)/$(PRODUCT).css |
---|
165 | @xsltproc \ |
---|
166 | --param html.stylesheet "'style.css $(PRODUCT).css'" \ |
---|
167 | --param css.decoration 1 \ |
---|
168 | --param section.autolabel 1 \ |
---|
169 | --output $@ \ |
---|
170 | $(DIRSRC)/html.xsl \ |
---|
171 | $(DIRTMP)/svnbasiccommands_full.xml |
---|
172 | |
---|
173 | $(DIRTMP)/svnbasiccommands_full.xml : \ |
---|
174 | $(DIRSRC)/svnbasiccommands.xml |
---|
175 | @xmllint \ |
---|
176 | --xinclude \ |
---|
177 | --encode utf-8 \ |
---|
178 | --noent \ |
---|
179 | --output $@ \ |
---|
180 | $(DIRSRC)/svnbasiccommands.xml |
---|
181 | |
---|
182 | $(DIRWIKI)/Faq : \ |
---|
183 | $(DIRSRC)/tracwiki.xsl \ |
---|
184 | $(DIRTMP)/faq_full.xml |
---|
185 | @xsltproc \ |
---|
186 | $(DIRSRC)/tracwiki.xsl \ |
---|
187 | $(DIRTMP)/faq_full.xml | \ |
---|
188 | awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ |
---|
189 | sed -e "s+@star@+*+" \ |
---|
190 | > $@ |
---|
191 | |
---|
192 | $(DIRWWW)/html/faq.html : \ |
---|
193 | $(DIRTMP)/faq_full.xml \ |
---|
194 | $(DIRSRC)/html.xsl \ |
---|
195 | $(DIRSRC)/style.css \ |
---|
196 | $(DIRSRC)/$(PRODUCT).css |
---|
197 | @xsltproc \ |
---|
198 | --param html.stylesheet "'style.css $(PRODUCT).css'" \ |
---|
199 | --param css.decoration 1 \ |
---|
200 | --param section.autolabel 1 \ |
---|
201 | --output $@ \ |
---|
202 | $(DIRSRC)/html.xsl \ |
---|
203 | $(DIRTMP)/faq_full.xml |
---|
204 | |
---|
205 | $(DIRTMP)/faq_full.xml : \ |
---|
206 | $(DIRSRC)/faq.xml |
---|
207 | @xmllint \ |
---|
208 | --xinclude \ |
---|
209 | --encode utf-8 \ |
---|
210 | --noent \ |
---|
211 | --output $@ \ |
---|
212 | $(DIRSRC)/faq.xml |
---|
213 | |
---|
214 | $(DIRWIKI)/Get : \ |
---|
215 | $(DIRSRC)/tracwiki.xsl \ |
---|
216 | $(DIRTMP)/get_full.xml |
---|
217 | @xsltproc \ |
---|
218 | $(DIRSRC)/tracwiki.xsl \ |
---|
219 | $(DIRTMP)/get_full.xml | \ |
---|
220 | awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ |
---|
221 | sed -e "s+@star@+*+" \ |
---|
222 | > $@ |
---|
223 | |
---|
224 | $(DIRWWW)/html/get.html : \ |
---|
225 | $(DIRTMP)/get_full.xml \ |
---|
226 | $(DIRSRC)/html.xsl \ |
---|
227 | $(DIRSRC)/style.css \ |
---|
228 | $(DIRSRC)/$(PRODUCT).css |
---|
229 | @xsltproc \ |
---|
230 | --param html.stylesheet "'style.css $(PRODUCT).css'" \ |
---|
231 | --param css.decoration 1 \ |
---|
232 | --param section.autolabel 1 \ |
---|
233 | --output $@ \ |
---|
234 | $(DIRSRC)/html.xsl \ |
---|
235 | $(DIRTMP)/get_full.xml |
---|
236 | |
---|
237 | $(DIRTMP)/get_full.xml : \ |
---|
238 | $(DIRSRC)/get.xml \ |
---|
239 | $(DIRSRC)/get_pre.sh |
---|
240 | @$(DIRSRC)/get_pre.sh |
---|
241 | @xmllint \ |
---|
242 | --xinclude \ |
---|
243 | --encode utf-8 \ |
---|
244 | --noent \ |
---|
245 | --output $@ \ |
---|
246 | $(DIRTMP)/get_sed.xml |
---|
247 | |
---|
248 | $(DIRWIKI)/FirstSteps : \ |
---|
249 | $(DIRSRC)/tracwiki.xsl \ |
---|
250 | $(DIRTMP)/firststeps_full.xml |
---|
251 | @xsltproc \ |
---|
252 | $(DIRSRC)/tracwiki.xsl \ |
---|
253 | $(DIRTMP)/firststeps_full.xml | \ |
---|
254 | awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ |
---|
255 | sed -e "s+@star@+*+" \ |
---|
256 | > $@ |
---|
257 | |
---|
258 | $(DIRWWW)/html/firststeps.html : \ |
---|
259 | $(DIRTMP)/firststeps_full.xml \ |
---|
260 | $(DIRSRC)/html.xsl \ |
---|
261 | $(DIRSRC)/style.css \ |
---|
262 | $(DIRSRC)/$(PRODUCT).css |
---|
263 | @xsltproc \ |
---|
264 | --param html.stylesheet "'style.css $(PRODUCT).css'" \ |
---|
265 | --param css.decoration 1 \ |
---|
266 | --param section.autolabel 1 \ |
---|
267 | --output $@ \ |
---|
268 | $(DIRSRC)/html.xsl \ |
---|
269 | $(DIRTMP)/firststeps_full.xml |
---|
270 | |
---|
271 | $(DIRTMP)/firststeps_full.xml : \ |
---|
272 | $(DIRSRC)/firststeps.xml |
---|
273 | @xmllint \ |
---|
274 | --xinclude \ |
---|
275 | --encode utf-8 \ |
---|
276 | --noent \ |
---|
277 | --output $@ \ |
---|
278 | $(DIRSRC)/firststeps.xml |
---|
279 | |
---|
280 | $(DIRWIKI)/Mailing : \ |
---|
281 | $(DIRSRC)/tracwiki.xsl \ |
---|
282 | $(DIRTMP)/mailing_full.xml |
---|
283 | @xsltproc \ |
---|
284 | $(DIRSRC)/tracwiki.xsl \ |
---|
285 | $(DIRTMP)/mailing_full.xml | \ |
---|
286 | awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ |
---|
287 | sed -e "s+@star@+*+" \ |
---|
288 | > $@ |
---|
289 | |
---|
290 | $(DIRWWW)/html/mailing.html : \ |
---|
291 | $(DIRTMP)/mailing_full.xml \ |
---|
292 | $(DIRSRC)/html.xsl \ |
---|
293 | $(DIRSRC)/style.css \ |
---|
294 | $(DIRSRC)/$(PRODUCT).css |
---|
295 | @xsltproc \ |
---|
296 | --param html.stylesheet "'style.css $(PRODUCT).css'" \ |
---|
297 | --param css.decoration 1 \ |
---|
298 | --param section.autolabel 1 \ |
---|
299 | --output $@ \ |
---|
300 | $(DIRSRC)/html.xsl \ |
---|
301 | $(DIRTMP)/mailing_full.xml |
---|
302 | |
---|
303 | $(DIRTMP)/mailing_full.xml : \ |
---|
304 | $(DIRSRC)/mailing.xml |
---|
305 | @xmllint \ |
---|
306 | --xinclude \ |
---|
307 | --encode utf-8 \ |
---|
308 | --noent \ |
---|
309 | --output $@ \ |
---|
310 | $(DIRSRC)/mailing.xml |
---|
311 | |
---|
312 | $(DIRWIKI)/TipLink : \ |
---|
313 | $(DIRSRC)/tracwiki.xsl \ |
---|
314 | $(DIRTMP)/tiplink_full.xml |
---|
315 | @xsltproc \ |
---|
316 | $(DIRSRC)/tracwiki.xsl \ |
---|
317 | $(DIRTMP)/tiplink_full.xml | \ |
---|
318 | awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ |
---|
319 | sed -e "s+@star@+*+" \ |
---|
320 | > $@ |
---|
321 | |
---|
322 | $(DIRWWW)/html/tiplink.html : \ |
---|
323 | $(DIRTMP)/tiplink_full.xml \ |
---|
324 | $(DIRSRC)/html.xsl \ |
---|
325 | $(DIRSRC)/style.css \ |
---|
326 | $(DIRSRC)/$(PRODUCT).css |
---|
327 | @xsltproc \ |
---|
328 | --param html.stylesheet "'style.css $(PRODUCT).css'" \ |
---|
329 | --param css.decoration 1 \ |
---|
330 | --param section.autolabel 1 \ |
---|
331 | --output $@ \ |
---|
332 | $(DIRSRC)/html.xsl \ |
---|
333 | $(DIRTMP)/tiplink_full.xml |
---|
334 | |
---|
335 | $(DIRTMP)/tiplink_full.xml : \ |
---|
336 | $(DIRSRC)/tiplink.xml |
---|
337 | @xmllint \ |
---|
338 | --xinclude \ |
---|
339 | --encode utf-8 \ |
---|
340 | --noent \ |
---|
341 | --output $@ \ |
---|
342 | $(DIRSRC)/tiplink.xml |
---|
343 | |
---|
344 | $(DIRWIKI)/Whatis : \ |
---|
345 | $(DIRSRC)/tracwiki.xsl \ |
---|
346 | $(DIRTMP)/whatis_full.xml |
---|
347 | @xsltproc \ |
---|
348 | $(DIRSRC)/tracwiki.xsl \ |
---|
349 | $(DIRTMP)/whatis_full.xml | \ |
---|
350 | awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ |
---|
351 | sed -e "s+@star@+*+" \ |
---|
352 | > $@ |
---|
353 | |
---|
354 | $(DIRWWW)/html/whatis.html : \ |
---|
355 | $(DIRTMP)/whatis_full.xml \ |
---|
356 | $(DIRSRC)/html.xsl \ |
---|
357 | $(DIRSRC)/style.css \ |
---|
358 | $(DIRSRC)/$(PRODUCT).css |
---|
359 | @xsltproc \ |
---|
360 | --param html.stylesheet "'style.css $(PRODUCT).css'" \ |
---|
361 | --param css.decoration 1 \ |
---|
362 | --param section.autolabel 1 \ |
---|
363 | --output $@ \ |
---|
364 | $(DIRSRC)/html.xsl \ |
---|
365 | $(DIRTMP)/whatis_full.xml |
---|
366 | |
---|
367 | $(DIRTMP)/whatis_full.xml : \ |
---|
368 | $(DIRSRC)/whatis.xml |
---|
369 | @xmllint \ |
---|
370 | --xinclude \ |
---|
371 | --encode utf-8 \ |
---|
372 | --noent \ |
---|
373 | --output $@ \ |
---|
374 | $(DIRSRC)/whatis.xml |
---|
375 | |
---|
376 | $(DIRWIKI)/WhatsNew : \ |
---|
377 | $(DIRSRC)/tracwiki.xsl \ |
---|
378 | $(DIRTMP)/whatsnew_full.xml |
---|
379 | @xsltproc \ |
---|
380 | $(DIRSRC)/tracwiki.xsl \ |
---|
381 | $(DIRTMP)/whatsnew_full.xml | \ |
---|
382 | awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ |
---|
383 | sed -e "s+@star@+*+" \ |
---|
384 | > $@ |
---|
385 | |
---|
386 | $(DIRWWW)/html/whatsnew.html : \ |
---|
387 | $(DIRTMP)/whatsnew_full.xml \ |
---|
388 | $(DIRSRC)/html.xsl \ |
---|
389 | $(DIRSRC)/style.css \ |
---|
390 | $(DIRSRC)/$(PRODUCT).css |
---|
391 | @xsltproc \ |
---|
392 | --param html.stylesheet "'style.css $(PRODUCT).css'" \ |
---|
393 | --param css.decoration 1 \ |
---|
394 | --param section.autolabel 1 \ |
---|
395 | --output $@ \ |
---|
396 | $(DIRSRC)/html.xsl \ |
---|
397 | $(DIRTMP)/whatsnew_full.xml |
---|
398 | |
---|
399 | $(DIRTMP)/whatsnew_full.xml : \ |
---|
400 | $(DIRSRC)/whatsnew.xml |
---|
401 | @xmllint \ |
---|
402 | --xinclude \ |
---|
403 | --encode utf-8 \ |
---|
404 | --noent \ |
---|
405 | --output $@ \ |
---|
406 | $(DIRSRC)/whatsnew.xml |
---|
407 | |
---|
408 | $(DIRWIKI)/Update : \ |
---|
409 | $(DIRSRC)/tracwiki.xsl \ |
---|
410 | $(DIRTMP)/update_full.xml |
---|
411 | @xsltproc \ |
---|
412 | $(DIRSRC)/tracwiki.xsl \ |
---|
413 | $(DIRTMP)/update_full.xml | \ |
---|
414 | awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ |
---|
415 | sed -e "s+@star@+*+" \ |
---|
416 | > $@ |
---|
417 | |
---|
418 | $(DIRWWW)/html/update.html : \ |
---|
419 | $(DIRTMP)/update_full.xml \ |
---|
420 | $(DIRSRC)/html.xsl \ |
---|
421 | $(DIRSRC)/style.css \ |
---|
422 | $(DIRSRC)/$(PRODUCT).css |
---|
423 | @xsltproc \ |
---|
424 | --param html.stylesheet "'style.css $(PRODUCT).css'" \ |
---|
425 | --param css.decoration 1 \ |
---|
426 | --param section.autolabel 1 \ |
---|
427 | --output $@ \ |
---|
428 | $(DIRSRC)/html.xsl \ |
---|
429 | $(DIRTMP)/update_full.xml |
---|
430 | |
---|
431 | $(DIRTMP)/update_full.xml : \ |
---|
432 | $(DIRSRC)/update.xml |
---|
433 | @xmllint \ |
---|
434 | --xinclude \ |
---|
435 | --encode utf-8 \ |
---|
436 | --noent \ |
---|
437 | --output $@ \ |
---|
438 | $(DIRSRC)/update.xml |
---|