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

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

migration from DocBook? 4 to Docbook 5 : sources and production tools

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