source: trunk/adm/guides/makefile @ 3

Last change on this file since 3 was 3, checked in by pinsard, 15 years ago

beginning of documentations : draft guides

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