source: trunk/SRC/Documentation/xmldoc/makefile @ 347

Last change on this file since 347 was 347, checked in by pinsard, 16 years ago

add wiki production tools and outputs

  • Property svn:keywords set to Id
File size: 14.2 KB
Line 
1#
2# module :
3# generation of documentations from XML files (and some IDL files) in HTML and
4# wiki forms
5#
6# original location :
7# /Users/fplod/SAXO_DIR_ws/SRC/Documentation/xmldoc/makefile sur aedon.locean-ipsl.upmc.fr
8#
9# update :
10# ++ wiki production not ready
11# $Id$
12# fplod 2008-04-16T10:06:39Z aedon.locean-ipsl.upmc.fr (Darwin)
13# working on wiki production using
14# http://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html
15# fplod 2008-04-15T15:37:59Z aedon.locean-ipsl.upmc.fr (Darwin)
16# java is not ok now :
17# http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl; Ligne #53; Colonne #35; XSLT Error (javax.xml.transform.TransformerConfigurationException): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Had IO Exception with stylesheet file: keywords.xsl
18# replaced by xsltproc which is now ok for callouts
19# fplod 2008-04-15T08:10:09Z aedon.locean-ipsl.upmc.fr (Darwin)
20# add xml validation using xmlstarlet
21# fplod 2007-06-27T10:07:59Z aedon.locean-ipsl.upmc.fr (Darwin)
22# creation in order to replace makehtml.sh
23#
24PRODUCT = \
25saxo
26
27DIRBASE = \
28./
29
30DIRSRC = \
31$(DIRBASE)
32
33DIRTMP = \
34./
35
36DIRWWW = \
37./
38
39DIRWIKI = \
40./wiki/
41
42help :
43        @echo "\$$ make clean"
44        @echo "\$$ make all"
45        @echo "\$$ make dbkcheck"
46        @echo "++ check link"
47        @echo "++ depot html et wiki"
48
49clean :
50        -@rm -f $(DIRTMP)/*_full.xml
51        -@rm -f $(DIRTMP)/err_xmlstarlet_xsd
52        -@rm -f $(DIRTMP)/rowscm.xml
53        -@rm -f $(DIRTMP)/rowskwd.xml
54        -@rm -f $(DIRTMP)/all_plots.xml
55
56dbkcheck :
57        @-rm $(DIRTMP)/err_xmlstarlet_xsd 2> /dev/null
58        @for file in $(DIRTMP)/*_full.xml $(DIRTMP)/all_plots.xml; do \
59        xml val --err \
60        --xsd http://www.docbook.org/xml/5.0/xsd/docbook.xsd \
61        $${file} 1>> $(DIRTMP)/err_xmlstarlet_xsd 2>&1; done
62        @echo "check for valid diag for each file in $(DIRTMP)/err_xmlstarlet_xsd"
63
64all : \
65html \
66tracwiki
67
68html : \
69$(DIRWWW)/getsaxo.html \
70$(DIRWWW)/websaxo.html \
71$(DIRWWW)/whatsnew.html \
72$(DIRWWW)/updatesaxo.html \
73$(DIRWWW)/whatissaxo.html \
74$(DIRWWW)/faqsaxo.html \
75$(DIRWWW)/infoupdatekwd.html \
76$(DIRWWW)/infoupdatecm.html \
77$(DIRWWW)/mailing.html \
78$(DIRWWW)/tiplink.html \
79$(DIRWWW)/mini_notice.html \
80$(DIRWWW)/firststeps.html \
81$(DIRWWW)/all_plots.html
82
83tracwiki : \
84$(DIRWIKI)/AllPlots \
85$(DIRWIKI)/GetSaxo \
86$(DIRWIKI)/WebSaxo \
87$(DIRWIKI)/FaqSaxo \
88$(DIRWIKI)/FirstSteps \
89$(DIRWIKI)/InfoUpdateKwd \
90$(DIRWIKI)/InfoUpdateCm \
91$(DIRWIKI)/Mailing \
92$(DIRWIKI)/MiniNotice \
93$(DIRWIKI)/TipLink \
94$(DIRWIKI)/WhatisSaxo \
95$(DIRWIKI)/UpdateSaxo \
96$(DIRWIKI)/WhatsNew
97        @echo "Do not forget to import wiki pages"
98        @echo "\$$ ssh $(PRODUCT)@forge.ipsl.jussieu.fr mkdir -p /tmp/wiki/$(PRODUCT)/"
99        @echo "\$$ scp $(DIRWIKI) $(PRODUCT)@forge.ipsl.jussieu.fr:/tmp/wiki/$(PRODUCT)/"
100        @echo "\$$ ssh $(PRODUCT)@forge.ipsl.jussieu.fr trac-admin /ipsl/forge/projets/$(PRODUCT)/trac wiki load /tmp/wiki/$(PRODUCT)/"
101
102        @echo "\$$ ssh $(PRODUCT)@forge.ipsl.jussieu.fr rmdir -f /tmp/wiki/$(PRODUCT)/"
103
104$(DIRWIKI)/WebSaxo: \
105$(DIRWWW)/websaxo.html
106        @echo "{{{" > $@
107        @echo "#!html" >> $@
108        @xml sel -N x="http://www.w3.org/1999/xhtml" \
109        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/websaxo.html \
110        >> $@
111        @echo "}}}" >> $@
112
113$(DIRWWW)/websaxo.html : \
114$(DIRTMP)/websaxo_full.xml \
115$(DIRSRC)/saxo_html.xsl \
116$(DIRSRC)/style.css \
117$(DIRSRC)/$(PRODUCT).css
118        @xsltproc \
119        --param html.stylesheet "'style.css $(PRODUCT).css'" \
120        --param css.decoration 1 \
121        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
122        --param section.autolabel 1 \
123        --output $@ \
124        $(DIRSRC)/saxo_html.xsl \
125        $(DIRTMP)/websaxo_full.xml
126
127$(DIRTMP)/websaxo_full.xml : \
128$(DIRSRC)/websaxo.xml
129        @xmllint \
130        --xinclude \
131        --encode utf-8 \
132        --noent \
133        --output $@ \
134        $(DIRSRC)/websaxo.xml
135
136$(DIRWIKI)/FaqSaxo: \
137$(DIRWWW)/faqsaxo.html
138        @echo "{{{" > $@
139        @echo "#!html" >> $@
140        @xml sel -N x="http://www.w3.org/1999/xhtml" \
141        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/faqsaxo.html \
142        >> $@
143        @echo "}}}" >> $@
144
145$(DIRWWW)/faqsaxo.html : \
146$(DIRTMP)/faqsaxo_full.xml \
147$(DIRSRC)/saxo_html.xsl \
148$(DIRSRC)/style.css \
149$(DIRSRC)/$(PRODUCT).css
150        @xsltproc \
151        --param html.stylesheet "'style.css $(PRODUCT).css'" \
152        --param css.decoration 1 \
153        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
154        --param section.autolabel 1 \
155        --output $@ \
156        $(DIRSRC)/saxo_html.xsl \
157        $(DIRTMP)/faqsaxo_full.xml
158
159$(DIRTMP)/faqsaxo_full.xml : \
160$(DIRSRC)/faqsaxo.xml
161        @xmllint \
162        --xinclude \
163        --encode utf-8 \
164        --noent \
165        --output $@ \
166        $(DIRSRC)/faqsaxo.xml
167
168$(DIRWIKI)/GetSaxo : \
169$(DIRWWW)/getsaxo.html
170        @echo "{{{" > $@
171        @echo "#!html" >> $@
172        @xml sel -N x="http://www.w3.org/1999/xhtml" \
173        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/getsaxo.html \
174        >> $@
175        @echo "}}}" >> $@
176
177$(DIRWWW)/getsaxo.html : \
178$(DIRTMP)/getsaxo_full.xml \
179$(DIRSRC)/saxo_html.xsl \
180$(DIRSRC)/style.css \
181$(DIRSRC)/$(PRODUCT).css
182        @xsltproc \
183        --param html.stylesheet "'style.css $(PRODUCT).css'" \
184        --param css.decoration 1 \
185        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
186        --param section.autolabel 1 \
187        --output $@ \
188        $(DIRSRC)/saxo_html.xsl \
189        $(DIRTMP)/getsaxo_full.xml
190
191$(DIRTMP)/getsaxo_full.xml : \
192$(DIRSRC)/getsaxo.xml \
193$(DIRSRC)/getsaxo_pre.sh
194        @$(DIRSRC)/getsaxo_pre.sh
195        @xmllint \
196        --xinclude \
197        --encode utf-8 \
198        --noent \
199        --output $@ \
200        $(DIRTMP)/getsaxo_sed.xml
201
202$(DIRWIKI)/FirstSteps : \
203$(DIRWWW)/firststeps.html
204        @echo "{{{" > $@
205        @echo "#!html" >> $@
206        @xml sel -N x="http://www.w3.org/1999/xhtml" \
207        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/firststeps.html \
208        >> $@
209        @echo "}}}" >> $@
210
211$(DIRWWW)/firststeps.html : \
212$(DIRTMP)/firststeps_full.xml \
213$(DIRSRC)/saxo_html.xsl \
214$(DIRSRC)/style.css \
215$(DIRSRC)/$(PRODUCT).css
216        @xsltproc \
217        --param html.stylesheet "'style.css $(PRODUCT).css'" \
218        --param css.decoration 1 \
219        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
220        --param section.autolabel 1 \
221        --output $@ \
222        $(DIRSRC)/saxo_html.xsl \
223        $(DIRTMP)/firststeps_full.xml
224
225$(DIRWIKI)/AllPlots : \
226$(DIRWWW)/all_plots.html
227        @echo "{{{" > $@
228        @echo "#!html" >> $@
229        @xml sel -N x="http://www.w3.org/1999/xhtml" \
230        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/all_plots.html \
231        >> $@
232        @echo "}}}" >> $@
233
234$(DIRWWW)/all_plots.html : \
235$(DIRTMP)/all_plots.xml \
236$(DIRSRC)/saxo_html.xsl \
237$(DIRSRC)/style.css \
238$(DIRSRC)/$(PRODUCT).css
239        @xsltproc \
240        --param html.stylesheet "'style.css $(PRODUCT).css'" \
241        --param css.decoration 1 \
242        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
243        --param section.autolabel 1 \
244        --output $@ \
245        $(DIRSRC)/saxo_html.xsl \
246        $(DIRTMP)/all_plots.xml
247
248
249$(DIRTMP)/all_plots.xml : \
250$(DIRSRC)/all_plots_docbook.xsl \
251$(DIRTMP)/firststeps_full.xml
252        @xsltproc \
253        --output $@ \
254        $(DIRSRC)/all_plots_docbook.xsl \
255        $(DIRTMP)/firststeps_full.xml
256
257$(DIRTMP)/firststeps_full.xml : \
258$(DIRSRC)/firststeps.xml \
259$(DIRSRC)/firststeps_pre.sh
260        @$(DIRSRC)/firststeps_pre.sh
261        @xmllint \
262        --xinclude \
263        --encode utf-8 \
264        --noent \
265        --output $@ \
266        $(DIRTMP)/firststeps_sed.xml
267        @rm $(DIRTMP)/firststeps_sed.xml 2> /dev/null
268
269$(DIRWIKI)/Mailing : \
270$(DIRWWW)/mailing.html
271        @echo "{{{" > $@
272        @echo "#!html" >> $@
273        @xml sel -N x="http://www.w3.org/1999/xhtml" \
274        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/mailing.html \
275        >> $@
276        @echo "}}}" >> $@
277
278$(DIRWWW)/mailing.html : \
279$(DIRTMP)/mailing_full.xml \
280$(DIRSRC)/saxo_html.xsl \
281$(DIRSRC)/style.css \
282$(DIRSRC)/$(PRODUCT).css
283        @xsltproc \
284        --param html.stylesheet "'style.css $(PRODUCT).css'" \
285        --param css.decoration 1 \
286        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
287        --param section.autolabel 1 \
288        --output $@ \
289        $(DIRSRC)/saxo_html.xsl \
290        $(DIRTMP)/mailing_full.xml
291
292$(DIRTMP)/mailing_full.xml : \
293$(DIRSRC)/mailing.xml
294        @xmllint \
295        --xinclude \
296        --encode utf-8 \
297        --noent \
298        --output $@ \
299        $(DIRSRC)/mailing.xml
300
301$(DIRWIKI)/MiniNotice : \
302$(DIRWWW)/mini_notice.html
303        @echo "{{{" > $@
304        @echo "#!html" >> $@
305        @xml sel -N x="http://www.w3.org/1999/xhtml" \
306        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/mini_notice.html \
307        >> $@
308        @echo "}}}" >> $@
309
310$(DIRWWW)/mini_notice.html : \
311$(DIRTMP)/mini_notice_full.xml \
312$(DIRSRC)/saxo_html.xsl \
313$(DIRSRC)/style.css \
314$(DIRSRC)/$(PRODUCT).css
315        @xsltproc \
316        --param html.stylesheet "'style.css $(PRODUCT).css'" \
317        --param css.decoration 1 \
318        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
319        --param section.autolabel 1 \
320        --output $@ \
321        $(DIRSRC)/saxo_html.xsl \
322        $(DIRTMP)/mini_notice_full.xml
323
324$(DIRTMP)/mini_notice_full.xml : \
325$(DIRSRC)/mini_notice.xml
326        @xmllint \
327        --xinclude \
328        --encode utf-8 \
329        --noent \
330        --output $@ \
331        $(DIRSRC)/mini_notice.xml
332
333$(DIRWIKI)/TipLink : \
334$(DIRWWW)/tiplink.html
335        @echo "{{{" > $@
336        @echo "#!html" >> $@
337        @xml sel -N x="http://www.w3.org/1999/xhtml" \
338        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/tiplink.html \
339        >> $@
340        @echo "}}}" >> $@
341
342$(DIRWWW)/tiplink.html : \
343$(DIRTMP)/tiplink_full.xml \
344$(DIRSRC)/saxo_html.xsl \
345$(DIRSRC)/style.css \
346$(DIRSRC)/$(PRODUCT).css
347        @xsltproc \
348        --param html.stylesheet "'style.css $(PRODUCT).css'" \
349        --param css.decoration 1 \
350        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
351        --param section.autolabel 1 \
352        --output $@ \
353        $(DIRSRC)/saxo_html.xsl \
354        $(DIRTMP)/tiplink_full.xml
355
356$(DIRTMP)/tiplink_full.xml : \
357$(DIRSRC)/tiplink.xml
358        @xmllint \
359        --xinclude \
360        --encode utf-8 \
361        --noent \
362        --output $@ \
363        $(DIRSRC)/tiplink.xml
364
365$(DIRWIKI)/InfoUpdateCm : \
366$(DIRWWW)/infoupdatecm.html
367        @echo "{{{" > $@
368        @echo "#!html" >> $@
369        @xml sel -N x="http://www.w3.org/1999/xhtml" \
370        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/infoupdatecm.html \
371        >> $@
372        @echo "}}}" >> $@
373
374$(DIRWWW)/infoupdatecm.html : \
375$(DIRTMP)/infoupdatecm_full.xml \
376$(DIRSRC)/saxo_html.xsl \
377$(DIRSRC)/style.css \
378$(DIRSRC)/$(PRODUCT).css
379        @xsltproc \
380        --param html.stylesheet "'style.css $(PRODUCT).css'" \
381        --param css.decoration 1 \
382        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
383        --param section.autolabel 1 \
384        --output $@ \
385        $(DIRSRC)/saxo_html.xsl \
386        $(DIRTMP)/infoupdatecm_full.xml
387
388$(DIRTMP)/infoupdatecm_full.xml : \
389$(DIRSRC)/infoupdatecm.xml \
390$(DIRTMP)/rowscm.xml
391        @xmllint \
392        --xinclude \
393        --encode utf-8 \
394        --noent \
395        --output $@ \
396        $(DIRSRC)/infoupdatecm.xml
397
398$(DIRWIKI)/InfoUpdateKwd : \
399$(DIRWWW)/infoupdatekwd.html
400        @echo "{{{" > $@
401        @echo "#!html" >> $@
402        @xml sel -N x="http://www.w3.org/1999/xhtml" \
403        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/infoupdatekwd.html \
404        >> $@
405        @echo "}}}" >> $@
406
407$(DIRWWW)/infoupdatekwd.html : \
408$(DIRTMP)/infoupdatekwd_full.xml \
409$(DIRSRC)/saxo_html.xsl \
410$(DIRSRC)/style.css \
411$(DIRSRC)/$(PRODUCT).css
412        @xsltproc \
413        --param html.stylesheet "'style.css $(PRODUCT).css'" \
414        --param css.decoration 1 \
415        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
416        --param section.autolabel 1 \
417        --output $@ \
418        $(DIRSRC)/saxo_html.xsl \
419        $(DIRTMP)/infoupdatekwd_full.xml
420
421$(DIRTMP)/infoupdatekwd_full.xml : \
422$(DIRTMP)/infoupdatekwd.xml \
423$(DIRTMP)/rowskwd.xml
424        @xmllint \
425        --xinclude \
426        --encode utf-8 \
427        --noent \
428        --output $@ \
429        $(DIRTMP)/infoupdatekwd.xml
430
431$(DIRTMP)/rowscm.xml : \
432../../ForOldVersion/updateold.pro
433        @echo "<tbody>" > $@
434        @grep "IF NOT key_forgetold AND n_elements(\(.* = .*\)" ../../ForOldVersion/updateold.pro | \
435        sort | \
436        sed -e "s/\(^.* THEN \)\(.*\)\( = \)\(.*\)/<row><entry colname='old'><varname>\2<\/varname><\/entry> <entry colname='new'><varname>\4<\/varname><\/entry><\/row>/" >> $@
437        @echo "</tbody>" >> $@
438
439$(DIRTMP)/rowskwd.xml : \
440../../ForOldVersion/updatekwd.pro
441        @echo "<tbody>" > $@
442        @grep "^  old = \[old, .* new = \[new" ../../ForOldVersion/updatekwd.pro | \
443        sort | \
444        sed -e "s/\( old = \[old, '\)\(.*\)\('\] *& new = \[new, '\)\(.*\)\('\]\)/<row><entry colname='old'><varname>\2<\/varname><\/entry> <entry colname='new'><varname>\4<\/varname><\/entry><\/row>/" >> $@
445
446        @echo "</tbody>" >> $@
447
448$(DIRWIKI)/WhatisSaxo : \
449$(DIRWWW)/whatissaxo.html
450        @echo "{{{" > $@
451        @echo "#!html" >> $@
452        @xml sel -N x="http://www.w3.org/1999/xhtml" \
453        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/whatissaxo.html \
454        >> $@
455        @echo "}}}" >> $@
456
457$(DIRWWW)/whatissaxo.html : \
458$(DIRTMP)/whatissaxo_full.xml \
459$(DIRSRC)/saxo_html.xsl \
460$(DIRSRC)/style.css \
461$(DIRSRC)/$(PRODUCT).css
462        @xsltproc \
463        --param html.stylesheet "'style.css $(PRODUCT).css'" \
464        --param css.decoration 1 \
465        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
466        --param section.autolabel 1 \
467        --output $@ \
468        $(DIRSRC)/saxo_html.xsl \
469        $(DIRTMP)/whatissaxo_full.xml
470
471$(DIRTMP)/whatissaxo_full.xml : \
472$(DIRSRC)/whatissaxo.xml
473        @xmllint \
474        --xinclude \
475        --encode utf-8 \
476        --noent \
477        --output $@ \
478        $(DIRSRC)/whatissaxo.xml
479
480$(DIRWIKI)/WhatsNew : \
481$(DIRWWW)/whatsnew.html
482        @echo "{{{" > $@
483        @echo "#!html" >> $@
484        @xml sel -N x="http://www.w3.org/1999/xhtml" \
485        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/whatsnew.html \
486        >> $@
487        @echo "}}}" >> $@
488
489$(DIRWWW)/whatsnew.html : \
490$(DIRTMP)/whatsnew_full.xml \
491$(DIRSRC)/saxo_html.xsl \
492$(DIRSRC)/style.css \
493$(DIRSRC)/$(PRODUCT).css
494        @xsltproc \
495        --param html.stylesheet "'style.css $(PRODUCT).css'" \
496        --param css.decoration 1 \
497        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
498        --param section.autolabel 1 \
499        --output $@ \
500        $(DIRSRC)/saxo_html.xsl \
501        $(DIRTMP)/whatsnew_full.xml
502       
503$(DIRTMP)/whatsnew_full.xml : \
504$(DIRSRC)/whatsnew.xml
505        @xmllint \
506        --xinclude \
507        --encode utf-8 \
508        --noent \
509        --output $@ \
510        $(DIRSRC)/whatsnew.xml
511
512$(DIRWIKI)/UpdateSaxo : \
513$(DIRWWW)/updatesaxo.html
514        @echo "{{{" > $@
515        @echo "#!html" >> $@
516        @xml sel -N x="http://www.w3.org/1999/xhtml" \
517        -t -m "//x:div[@class='article']" -c . -n $(DIRWWW)/updatesaxo.html \
518        >> $@
519        @echo "}}}" >> $@
520
521$(DIRWWW)/updatesaxo.html : \
522$(DIRTMP)/updatesaxo_full.xml \
523$(DIRSRC)/saxo_html.xsl \
524$(DIRSRC)/style.css \
525$(DIRSRC)/$(PRODUCT).css
526        @xsltproc \
527        --param html.stylesheet "'style.css $(PRODUCT).css'" \
528        --param css.decoration 1 \
529        --param link.mailto.url "'mailto:saxo-dev_at_forge.ipsl.jussieu.fr'" \
530        --param section.autolabel 1 \
531        --output $@ \
532        $(DIRSRC)/saxo_html.xsl \
533        $(DIRTMP)/updatesaxo_full.xml
534       
535$(DIRTMP)/updatesaxo_full.xml : \
536$(DIRSRC)/updatesaxo.xml
537        @xmllint \
538        --xinclude \
539        --encode utf-8 \
540        --noent \
541        --output $@ \
542        $(DIRSRC)/updatesaxo.xml
543
544$(DIRTMP)/titlepage.main.xsl : \
545$(DIRSRC)/titlepage.main.xml
546        @xsltproc \
547        --output $@ \
548        http://docbook.sourceforge.net/release/xsl/current/template/titlepage.xsl \
549        $(DIRSRC)/titlepage.main.xml
550        $(DIRSRC)/titlepage.main.xml
Note: See TracBrowser for help on using the repository browser.