source: trunk/makefile @ 151

Last change on this file since 151 was 151, checked in by pinsard, 12 years ago

progress on rest procesing

  • Property svn:keywords set to Id
File size: 19.3 KB
Line 
1#+
2#
3# DESCRIPTION
4# ===========
5#
6# génération des pages superbib
7#
8# TODO
9# ====
10#
11# ask for end-user graphic tool
12#
13# EVOLUTIONS
14# ==========
15#
16# $Id$
17#
18# $URL$
19#
20# - fplod 20120228
21#
22#   * matplotlib ok on halios even if the image is too large
23#   * gnuplot process is also done but not use (to uggly)
24#   * ploticus command is now (version 2.41) pl
25#
26# - fplod 20120227
27#
28#   * move demo1 and nemo1 in tests
29#
30# - fplod 20110701T123529Z cratos.locean-ipsl.upmc.fr (Linux)
31#
32#   * add "Check SUPERBIB requirements in main.xml : " usage of checkmain.sh
33#     only procedure instructions
34#
35# - fplod 20110701T105417Z cratos.locean-ipsl.upmc.fr (Linux)
36#
37#   * contact is no more define here. see authorgroup/author[1]/email
38#     in main.xml
39#
40# - fplod 20110629T124212Z cratos.locean-ipsl.upmc.fr (Linux)
41#
42#   * introduce rest
43#
44# - fplod 20100111T140001Z aedon.locean-ipsl.upmc.fr (Darwin)
45#
46#   * usage of makepp for design
47#
48# - fplod 2008-12-19T10:56:43Z aedon.locean-ipsl.upmc.fr (Darwin)
49#
50#   * rename doc to design
51#
52# fplod 2008-09-17T15:37:10Z aedon.locean-ipsl.upmc.fr (Darwin)
53# parametrization of "affreux sed"
54# add test_demo1 and test_nemo1
55# fplod 2008-05-07T14:27:55Z aedon.locean-ipsl.upmc.fr (Darwin)
56# add test
57# fplod 2008-04-30T09:52:22Z aedon.locean-ipsl.upmc.fr (Darwin)
58# chgt for dbk5
59# fplod 2008-04-28T10:27:33Z aedon.locean-ipsl.upmc.fr (Darwin)
60# add .PHONY to make possible usage of makeppgraph
61# get rid of tidy
62# introduce URLPUBLISH
63# fplod 2008-04-18T10:24:13Z aedon.locean-ipsl.upmc.fr (Darwin)
64# add year_ploticus.xsl (replacing years_gnuplot.xsl)
65# fplod 2007-11-22T09:57:16Z aedon.locean-ipsl.upmc.fr (Darwin)
66# replace --output parameter by --stringparam base.dir
67# according to Bob Stayton recommandation in
68# http://lists.oasis-open.org/archives/docbook-apps/200711/msg00095.html
69# fplod 2007-10-12T09:40:01Z aedon.locean-ipsl.upmc.fr (Darwin)
70# add linkcheck
71# ++ la génération de pdf ne marchent pas bien sans doute à cause des images top
72# fplod 2007-09-28T08:56:17Z aedon.locean-ipsl.upmc.fr (Darwin)
73# add before and install targets
74# fplod 2007-06-06T10:23:19Z aedon.locean-ipsl.upmc.fr (Darwin)
75# change hard coded DIRBASE
76# fplod 2007-05-21T14:01:20Z aedon.locean-ipsl.upmc.fr (Darwin)
77# ajout du plot nbpub/year
78# fplod 2007-03-30T09:53:48Z aedon.locean-ipsl.upmc.fr (Darwin)
79# creation
80#
81#-
82PRODUCT = \
83superbib
84
85DIRBASE = \
86./
87
88DIRSRC = \
89$(DIRBASE)/
90
91DIRTMP = \
92./
93
94DIRXML = \
95$(DIRBASE)/xml/
96
97DIRDESIGN = \
98$(DIRBASE)/design/
99
100DIRWWW = \
101/tmp/$(PRODUCT)/
102
103DIRSPHINX = \
104/tmp/$(PRODUCT)/sphinx_tmpdir/
105
106# here are some examples of DIRPUBLISH/URLPUBLISH, the first on for Seb on his Mac,
107#
108# the real one for NEMO is opatlod@cerbere.locean-ispl.upmc.fr:NEMO/general/biblio_new/
109#
110# comment all of them and define your own
111#
112DIRPUBLISH = \
113smasson@arete.locean-ipsl.upmc.fr:Sites/bibnemomaf/
114
115URLPUBLISH = \
116none
117
118# the second one for me (Françoise) on my Mac aedon
119#DIRPUBLISH = \
120#fplod@aedon.locean-ipsl.upmc.fr:Sites/$(PRODUCT)demo/
121
122#URLPUBLISH = \
123#none
124
125# the third for me (Françoise) on my home page at LOCEAN
126# http://www.locean-ipsl.upmc.fr/~fplod/superbibdemo/
127#DIRPUBLISH = \
128#none
129
130#URLPUBLISH = \
131#http://www.locean-ipsl.upmc.fr/~fplod/$(PRODUCT)demo/
132
133MAKEDATE = \
134`date -u +"%Y-%m-%dT%H:%M:%SZ"`
135
136XSLPARAMHTML = \
137--param makedate "'$(MAKEDATE)'" \
138--param html.stylesheet "'../../style.css ../../$(PRODUCT).css'" \
139--param generate.article.toc '0' \
140--param generate.section.toc.level '0' \
141--param citerefentry.link '1'
142
143XSLPARAMRST = \
144--param makedate "'$(MAKEDATE)'"
145
146IMAGES = \
147$(DIRSRC)/images/globalicondl11x10_up.gif
148
149.PHONY : \
150test \
151test_raw \
152test_raw_demo1 \
153test_raw_nemo1 \
154test_raw_nemoall \
155dbkcheck \
156all \
157before \
158clean \
159design \
160help \
161html \
162html_en \
163rest \
164rest_en \
165htmllinkchecka \
166htmllinkcheckb \
167install \
168pdf
169
170help :
171        @echo "Define in the makefile localisations of :"
172        @echo " - sources (DIRSRC) where you \"svn checkout\" $(PRODUCT)"
173        @echo " - temporary Web pages (DIRWWW), where you can check links before publication"
174        @echo " - published Web pages (DIRPUBLISH/URLPUBLISH)"
175        @echo ""
176        @echo "Prepare output directories :"
177        @echo "\$$ make before"
178        @echo ""
179        @echo "check for duplicate DOI; for example :"
180        @echo "\$$ ./twindoi.sh -i $(DIRTMP)/biblio.xml -t xml"
181        @echo ""
182        @echo "Check for DocBook 5 validity : "
183        @echo "\$$ make dbkcheck"
184        @echo " "
185        @echo "Check SUPERBIB requirements in main.xml : "
186        @echo "\$$ ./checkmain.sh -i $(DIRTMP)/main.xml"
187        @echo " "
188        @echo "Check links before installation : "
189        @echo "\$$ make htmllinkcheckb"
190        @echo " "
191        @echo "Last step = installation"
192        @echo "\$$ make install"
193        @echo " "
194        @echo "Check links after installation : "
195        @echo "\$$ make htmllinkchecka"
196        @echo " "
197        @echo "if you move this product to an other place, "
198        @echo "change parameters in the call sequence of $(DIRSRC)/before.sh and $(DIRSRC)/install.sh"
199        @echo "and in the call sequence of in $(DIRSRC)/install.sh"
200        @echo "in this makefile"
201        @echo " "
202        @echo " "
203        @echo " "
204        @echo "for contributors at LOCEAN:"
205        @echo "\$$ export PATH=\$$PATH:/usr/home/fplod/src/schema_ws/"
206        @echo "\$$ make design"
207
208before :
209        @$(DIRSRC)/before.sh -p $(PRODUCT) -s $(DIRSRC) -w $(DIRWWW) -multi -l en -m 2
210        mkdir $(DIRSPHINX)
211
212install :
213        $(DIRSRC)/install.sh -w $(DIRWWW) -p $(DIRPUBLISH)
214        $(DIRSRC)/install.sh -w $(DIRWWW) -u $(URLPUBLISH)
215clean :
216        -@rm -fr $(DIRWWW)/
217        -@rm -f $(DIRTMP)/bibdemo1_dbk5_1.txt
218        -@rm -f $(DIRTMP)/bibdemo1_dbk5_2.bib
219        -@rm -f $(DIRTMP)/bibdemo1_dbk5_2.tex
220        -@rm -f $(DIRTMP)/bibdemo1_dbk5_1.xml
221        -@rm -f $(DIRTMP)/bibdemo1_dbk5_2.xml
222        -@rm -f $(DIRTMP)/bibdemo1_dbk5_2.bbl
223        -@rm -f $(DIRTMP)/bibdemo1_dbk5_2.blg
224        -@rm -f $(DIRTMP)/bibdemo1_dbk5_2.out
225        -@rm -f $(DIRTMP)/bibdemo1_dbk5_2.aux
226        -@rm -f $(DIRTMP)/bibdemo1_dbk5_2.dvi
227        -@rm -f $(DIRTMP)/bibdemo1_dbk5_2.log
228        -@rm -f $(DIRTMP)/bibnemo1.xml
229        -@rm -f $(DIRTMP)/bibnemo1.txt
230        -@rm -f $(DIRTMP)/bibnemoall.xml
231        -@rm -f $(DIRTMP)/bibnemoall.txt
232        -@rm -f $(DIRTMP)/select_id.xml
233        -@rm -f $(DIRTMP)/main_full.xml
234        -@rm -f $(DIRTMP)/$(PRODUCT)01.xml
235        -@rm -f $(DIRTMP)/$(PRODUCT)01_dblatex.log
236        -@rm -f $(DIRTMP)/$(PRODUCT)01_dblatex.err
237        -@rm -f $(DIRTMP)/years_gnuplot.gnu
238        -@rm -f $(DIRTMP)/years.ploticus
239        -@rm -f $(DIRTMP)/years_matplotlib.py
240        -@rm -f $(DIRTMP)/years.png
241        -@rm -f $(DIRTMP)/$(PRODUCT)02.xml
242        -@rm -f $(DIRTMP)/$(PRODUCT)02_dblatex.err
243        -@rm -f $(DIRTMP)/$(PRODUCT)02_dblatex.log
244        -@rm -f $(DIRTMP)/$(PRODUCT)many01.xml
245        -@rm -f $(DIRTMP)/$(PRODUCT)many02.xml
246        -@rm -f $(DIRTMP)/titlepage.$(PRODUCT).xsl
247        -@rm -f $(DIRTMP)/user_db.xml
248        -@rm -f $(DIRTMP)/template_beforesed.php
249        -@rm -f $(DIRTMP)/template_db.xml
250
251dbkcheck :
252        @-rm $(DIRTMP)/err_xmlstarlet_xsd 2> /dev/null
253        @-for file in $(DIRTMP)/biblio.xml $(DIRTMP)/*_full.xml $(DIRTMP)/select_id.xml $(DIRTMP)/$(PRODUCT)01.xml $(DIRTMP)/$(PRODUCT)02.xml $(DIRTMP)/$(PRODUCT)many01.xml $(DIRTMP)/$(PRODUCT)many02.xml $(DIRTMP)/user_db.xml $(DIRTMP)/template_db.xml; do \
254        xml val --err \
255        --xsd http://www.docbook.org/xml/5.0/xsd/docbook.xsd \
256        $${file} 1>> $(DIRTMP)/err_xmlstarlet_xsd 2>&1; done
257        @echo "check for valid diag for each file in $(DIRTMP)/err_xmlstarlet_xsd"
258
259
260all : \
261html
262
263html : \
264html_en
265
266rest : \
267rest_en
268
269design : \
270$(DIRDESIGN)/images/$(PRODUCT)_fulldependencies.png \
271$(DIRDESIGN)/images/$(PRODUCT)_fulldependencies.svg
272
273htmllinkcheckb :
274        @linkchecker.sh -d $(DIRWWW)
275
276htmllinkchecka :
277        @linkchecker.sh -d $(DIRPUBLISH)
278        @linkchecker.sh -u $(URLPUBLISH)
279
280rest_en : \
281$(DIRWWW)/en/one/main.php \
282$(DIRWWW)/en/one/template.php \
283$(DIRSPHINX)/$(PRODUCT)00.rst \
284$(DIRSPHINX)/$(PRODUCT)01.rst \
285$(DIRSPHINX)/$(PRODUCT)02.rst \
286$(DIRSPHINX)/$(PRODUCT)01/ \
287$(DIRSPHINX)/$(PRODUCT)02/ \
288$(DIRSPHINX)/user.rst
289
290html_en : \
291$(DIRWWW)/en/one/main.php \
292$(DIRWWW)/en/one/template.php \
293$(DIRWWW)/en/one/$(PRODUCT)00.html \
294$(DIRWWW)/en/one/$(PRODUCT)01.html \
295$(DIRWWW)/en/one/$(PRODUCT)02.html \
296$(DIRWWW)/en/many/$(PRODUCT)01/ \
297$(DIRWWW)/en/many/$(PRODUCT)02/ \
298$(DIRWWW)/en/one/user.html
299
300pdf_en : \
301$(DIRTMP)/$(PRODUCT)01.pdf \
302$(DIRTMP)/$(PRODUCT)02.pdf
303
304$(DIRSPHINX)/$(PRODUCT)00.rst : \
305$(DIRTMP)/biblio.xml \
306$(DIRSRC)/db_rest.xsl
307        @xsltproc \
308        --output $@ \
309        $(DIRSRC)/db_rest.xsl \
310        $<
311
312$(DIRWWW)/en/one/$(PRODUCT)00.html : \
313$(DIRTMP)/biblio.xml
314        @xsltproc \
315        --output $@ \
316        http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
317        $<
318
319$(DIRWWW)/en/one/main.php : \
320$(DIRTMP)/main_full.xml \
321$(DIRSRC)/$(PRODUCT).css \
322$(DIRSRC)/style.css \
323$(DIRSRC)/main_html.xsl \
324$(DIRSRC)/message_lang.xsl \
325$(DIRTMP)/titlepage.$(PRODUCT).xsl \
326$(DIRSRC)/form_html.xsl
327        @xsltproc \
328        $(XSLPARAMHTML) \
329        --output $@ \
330        $(DIRSRC)/main_html.xsl \
331        $<
332
333$(DIRSPHINX)/$(PRODUCT)01.rst : \
334$(DIRTMP)/biblio.xml \
335$(DIRWWW)/images/years.png \
336$(DIRSRC)/$(PRODUCT)01_rest.xsl \
337$(DIRSRC)/biblioentry_rest.xsl \
338$(DIRSRC)/db_rest.xsl \
339$(DIRSRC)/message_lang.xsl \
340$(DIRTMP)/titlepage.$(PRODUCT).xsl
341        @xsltproc \
342        $(XSLPARAMRST) \
343        --output $@ \
344        $(DIRSRC)/$(PRODUCT)01_rest.xsl \
345        $<
346
347$(DIRWWW)/en/one/$(PRODUCT)01.html : \
348$(DIRTMP)/$(PRODUCT)01.xml \
349$(DIRWWW)/images/years.png \
350$(DIRSRC)/$(PRODUCT).css \
351$(DIRSRC)/style.css \
352$(DIRSRC)/$(PRODUCT)01_html.xsl \
353$(DIRSRC)/message_lang.xsl \
354$(DIRTMP)/titlepage.$(PRODUCT).xsl
355        @xsltproc \
356        $(XSLPARAMHTML) \
357        --output $@ \
358        $(DIRSRC)/$(PRODUCT)01_html.xsl \
359        $<
360
361$(DIRTMP)/$(PRODUCT)01.xml : \
362$(DIRTMP)/biblio.xml \
363$(DIRSRC)/$(PRODUCT)01_xml.xsl \
364$(DIRSRC)/message_lang.xsl \
365$(DIRSRC)/biblioentry_xml.xsl
366        @xsltproc \
367        --output $@ \
368        $(DIRSRC)/$(PRODUCT)01_xml.xsl \
369        $<
370
371$(DIRSPHINX)/$(PRODUCT)02.rst : \
372$(DIRTMP)/$(PRODUCT)02.xml \
373$(DIRSRC)/$(PRODUCT)02_rest.xsl \
374$(DIRSRC)/biblioentry_rest.xsl \
375$(DIRSRC)/db_rest.xsl \
376$(DIRSRC)/message_lang.xsl \
377$(DIRTMP)/titlepage.$(PRODUCT).xsl
378        @xsltproc \
379        $(XSLPARAMRST) \
380        --output $@ \
381        $(DIRSRC)/$(PRODUCT)02_rest.xsl \
382        $<
383
384$(DIRWWW)/en/one/$(PRODUCT)02.html : \
385$(DIRTMP)/$(PRODUCT)02.xml \
386$(DIRSRC)/$(PRODUCT).css \
387$(DIRSRC)/style.css \
388$(DIRSRC)/$(PRODUCT)01_html.xsl \
389$(DIRSRC)/message_lang.xsl \
390$(DIRTMP)/titlepage.$(PRODUCT).xsl
391        @xsltproc \
392        $(XSLPARAMHTML) \
393        --output $@ \
394        $(DIRSRC)/$(PRODUCT)01_html.xsl \
395        $<
396
397$(DIRSPHINX)/$(PRODUCT)02/ :
398        @echo "not yet"
399
400$(DIRWWW)/en/many/$(PRODUCT)02/ : \
401$(DIRTMP)/$(PRODUCT)many02.xml \
402$(DIRSRC)/$(PRODUCT).css \
403$(DIRSRC)/style.css \
404$(DIRSRC)/$(PRODUCT)many02_html.xsl \
405$(DIRSRC)/message_lang.xsl \
406$(DIRTMP)/titlepage.$(PRODUCT).xsl \
407$(DIRSRC)/form_html.xsl
408        @xsltproc \
409        $(XSLPARAMHTML) \
410        --param html.ext "'.php'" \
411        --param base.dir "'$@/'" \
412        $(DIRSRC)/$(PRODUCT)many02_html.xsl \
413        $<
414        # affreux sed
415        @for file in $(DIRWWW)/en/many/$(PRODUCT)02/*.php; do \
416         $(DIRSRC)/insertphp.sh -i $${file} -o $${file}_sed \
417         -s $(DIRSRC)/insertphp_many.sed \
418         -d 3; \
419         mv $${file}_sed $${file} ; \
420        done
421        @touch $@/
422
423$(DIRTMP)/$(PRODUCT)many02.xml : \
424$(DIRTMP)/biblio.xml \
425$(DIRSRC)/$(PRODUCT)many02_xml.xsl \
426$(DIRSRC)/message_lang.xsl \
427$(DIRSRC)/form_db.xsl \
428$(DIRSRC)/compilers_db.xsl \
429$(DIRSRC)/components_db.xsl \
430$(DIRSRC)/platforms_db.xsl \
431$(DIRSRC)/personal_db.xsl \
432$(DIRSRC)/comments_db.xsl \
433$(DIRSRC)/newreferences_db.xsl \
434$(DIRSRC)/processors_db.xsl \
435$(DIRSRC)/biblioentry_xml.xsl \
436$(DIRSRC)/correction_db.xsl \
437$(DIRSRC)/firstname_id.xsl \
438$(DIRSRC)/surname_id.xsl
439        @xsltproc \
440        --param html.ext "'.php'" \
441        --output $@ \
442        $(DIRSRC)/$(PRODUCT)many02_xml.xsl \
443        $<
444
445$(DIRSPHINX)/$(PRODUCT)01/ :
446        @echo "not yet"
447
448$(DIRWWW)/en/many/$(PRODUCT)01/ : \
449$(DIRTMP)/$(PRODUCT)many01.xml \
450$(DIRSRC)/$(PRODUCT).css \
451$(DIRSRC)/style.css \
452$(DIRSRC)/$(PRODUCT)many01_html.xsl \
453$(DIRSRC)/message_lang.xsl \
454$(DIRTMP)/titlepage.$(PRODUCT).xsl
455        @xsltproc \
456        $(XSLPARAMHTML) \
457        --param base.dir "'$@/'" \
458        $(DIRSRC)/$(PRODUCT)many01_html.xsl \
459        $<
460        @touch $@/
461
462$(DIRTMP)/$(PRODUCT)many01.xml : \
463$(DIRTMP)/biblio.xml \
464$(DIRSRC)/$(PRODUCT)many01_xml.xsl \
465$(DIRSRC)/message_lang.xsl \
466$(DIRSRC)/firstname_id.xsl \
467$(DIRSRC)/surname_id.xsl \
468$(DIRSRC)/table_authors.xsl \
469$(DIRSRC)/biblioentry_xml.xsl \
470$(DIRSRC)/correction_db.xsl
471        @xsltproc \
472        --param html.ext "'.html'" \
473        --output $@ \
474        $(DIRSRC)/$(PRODUCT)many01_xml.xsl \
475        $<
476
477$(DIRTMP)/$(PRODUCT)02.xml : \
478$(DIRTMP)/biblio.xml \
479$(DIRSRC)/$(PRODUCT)02_xml.xsl \
480$(DIRSRC)/message_lang.xsl \
481$(DIRSRC)/firstname_id.xsl \
482$(DIRSRC)/surname_id.xsl \
483$(DIRSRC)/table_authors.xsl \
484$(DIRSRC)/biblioentry_xml.xsl \
485$(DIRSRC)/correction_db.xsl
486        @xsltproc \
487        --param html.ext "'.html'" \
488        --output $@ \
489        $(DIRSRC)/$(PRODUCT)02_xml.xsl \
490        $<
491
492$(DIRTMP)/titlepage.$(PRODUCT).xsl : \
493$(DIRSRC)/titlepage.$(PRODUCT).xml
494        @xsltproc \
495        --output $@ \
496        http://docbook.sourceforge.net/release/xsl/current/template/titlepage.xsl \
497        $<
498
499$(DIRWWW)/images/years.png : \
500$(DIRTMP)/years.ploticus \
501$(DIRTMP)/years_gnuplot.gnu \
502$(DIRTMP)/years_matplotlib.py
503        @gnuplot years_gnuplot.gnu
504        @pl -o $@ png $<       
505        @python years_matplotlib.py
506
507$(DIRTMP)/years_matplotlib.py : \
508$(DIRTMP)/biblio.xml \
509$(DIRSRC)/years_matplotlib.xsl \
510$(DIRSRC)/biblioentry_xml.xsl \
511$(DIRSRC)/message_lang.xsl
512        @xsltproc \
513        --param makedate "'$(MAKEDATE)'" \
514        --param path "'$(DIRWWW)/images/'" \
515        --output $@ \
516        $(DIRSRC)/years_matplotlib.xsl \
517        $<
518
519$(DIRTMP)/years_gnuplot.gnu : \
520$(DIRTMP)/biblio.xml \
521$(DIRSRC)/years_gnuplot.xsl \
522$(DIRSRC)/biblioentry_xml.xsl \
523$(DIRSRC)/message_lang.xsl
524        @xsltproc \
525        --param makedate "'$(MAKEDATE)'" \
526        --param path "'$(DIRWWW)/images/'" \
527        --output $@ \
528        $(DIRSRC)/years_gnuplot.xsl \
529        $<
530
531$(DIRTMP)/years.ploticus : \
532$(DIRTMP)/biblio.xml \
533$(DIRSRC)/years_ploticus.xsl \
534$(DIRSRC)/biblioentry_xml.xsl \
535$(DIRSRC)/message_lang.xsl
536        @xsltproc \
537        --param makedate "'$(MAKEDATE)'" \
538        --output $@ \
539        $(DIRSRC)/years_ploticus.xsl \
540        $<
541
542$(DIRTMP)/$(PRODUCT)01.pdf : \
543$(DIRTMP)/$(PRODUCT)01.xml \
544$(DIRSRC)/$(PRODUCT)_pdf.xsl
545        @dblatex \
546        -b pdftex \
547        -T simple \
548        -o $@ \
549        -d \
550        -x "--nonet" \
551        -p $(DIRSRC)/$(PRODUCT)_pdf.xsl \
552        $< \
553        1> $(DIRTMP)/$(PRODUCT)01_dblatex.log \
554        2> $(DIRTMP)/$(PRODUCT)01_dblatex.err
555
556$(DIRTMP)/$(PRODUCT)02.pdf : \
557$(DIRTMP)/biblio.xml \
558$(DIRSRC)/$(PRODUCT)_pdf.xsl
559        @dblatex \
560        -b pdftex \
561        -T simple \
562        -o $@ \
563        -d \
564        -x "--nonet" \
565        -p $(DIRSRC)/$(PRODUCT)_pdf.xsl \
566        $< \
567        1> $(DIRTMP)/$(PRODUCT)02_dblatex.log \
568        2> $(DIRTMP)/$(PRODUCT)02_dblatex.err
569
570$(DIRTMP)/main_full.xml : \
571$(DIRTMP)/main.xml \
572$(DIRSRC)/select_form.php \
573$(DIRTMP)/select_id.xml
574        @xmllint \
575        --xinclude \
576        --nonet \
577        --output $@ \
578        $<
579
580$(DIRTMP)/select_id.xml : \
581$(DIRTMP)/biblio.xml \
582$(DIRSRC)/select_id.xsl \
583$(DIRSRC)/firstname_id.xsl \
584$(DIRSRC)/surname_id.xsl
585        @xsltproc \
586        --output $@ \
587        $(DIRSRC)/select_id.xsl \
588        $<
589
590$(DIRSPHINX)/user.rst: \
591$(DIRTMP)/user_db.xml \
592$(DIRSRC)/user_rest.xsl \
593$(DIRSRC)/message_lang.xsl \
594$(DIRTMP)/titlepage.$(PRODUCT).xsl \
595$(DIRSRC)/form_rest.xsl
596        @xsltproc \
597        $(XSLPARAMRST) \
598        --output $@ \
599        $(DIRSRC)/user_rest.xsl \
600        $<
601
602$(DIRWWW)/en/one/user.html : \
603$(DIRTMP)/user_db.xml \
604$(DIRSRC)/$(PRODUCT).css \
605$(DIRSRC)/style.css \
606$(DIRSRC)/user_html.xsl \
607$(DIRSRC)/message_lang.xsl \
608$(DIRTMP)/titlepage.$(PRODUCT).xsl \
609$(DIRSRC)/form_html.xsl
610        @xsltproc \
611        $(XSLPARAMHTML) \
612        --output $@ \
613        $(DIRSRC)/user_html.xsl \
614        $<
615
616$(DIRTMP)/user_db.xml : \
617$(DIRTMP)/user.xml \
618$(DIRSRC)/user_db.xsl \
619$(DIRSRC)/message_lang.xsl \
620$(DIRSRC)/components_db.xsl \
621$(DIRSRC)/compilers_db.xsl \
622$(DIRSRC)/platforms_db.xsl \
623$(DIRSRC)/processors_db.xsl
624        @xsltproc \
625        --output $@ \
626        $(DIRSRC)/user_db.xsl \
627        $<
628
629$(DIRTMP)/user.xml : \
630$(DIRTMP)/user.dtd
631        -@xmllint --noout --valid $@
632
633$(DIRWWW)/en/one/template.php : \
634$(DIRTMP)/template_beforesed.php
635        # affreux sed
636        @$(DIRSRC)/insertphp.sh -i $< \
637        -o $@ \
638        -s $(DIRSRC)/insertphp_one.sed \
639        -d 2
640
641$(DIRTMP)/template_beforesed.php : \
642$(DIRTMP)/template_db.xml \
643$(DIRSRC)/$(PRODUCT).css \
644$(DIRSRC)/style.css \
645$(DIRSRC)/main_html.xsl \
646$(DIRSRC)/message_lang.xsl \
647$(DIRTMP)/titlepage.$(PRODUCT).xsl \
648$(DIRSRC)/form_html.xsl
649        @xsltproc \
650        $(XSLPARAMHTML) \
651        --param html.ext "'.php'" \
652        --output $@ \
653        $(DIRSRC)/main_html.xsl \
654        $<
655
656$(DIRTMP)/template_db.xml : \
657$(DIRTMP)/user.xml \
658$(DIRSRC)/template_db.xsl \
659$(DIRSRC)/message_lang.xsl \
660$(DIRSRC)/form_db.xsl \
661$(DIRSRC)/compilers_db.xsl \
662$(DIRSRC)/components_db.xsl \
663$(DIRSRC)/platforms_db.xsl \
664$(DIRSRC)/personal_db.xsl \
665$(DIRSRC)/comments_db.xsl \
666$(DIRSRC)/newreferences_db.xsl \
667$(DIRSRC)/processors_db.xsl \
668$(DIRSRC)/biblioentry_xml.xsl \
669$(DIRSRC)/correction_db.xsl
670        @xsltproc \
671        --output $@ \
672        $(DIRSRC)/template_db.xsl \
673        $<
674
675$(DIRDESIGN)/images/%.png : $(DIRDESIGN)/images/%.svg
676        @convert $< $@
677
678$(DIRDESIGN)/images/%.svg : $(DIRDESIGN)/%.dot
679        @dot -Tsvg -o $@ $<
680
681$(DIRDESIGN)/$(PRODUCT)_fulldependencies.dot : \
682$(DIRSRC)/makefile
683        @makeppgraph --graphviz --output=$@
684
685
686test : \
687test_raw
688
689test_raw : \
690test_raw_demo1_1 \
691test_raw_demo1_2 \
692test_raw_demo1_2_tex \
693test_raw_nemo1 \
694test_raw_nemoall
695
696test_raw_demo1_1 : \
697$(DIRSRC)/data/bibdemo1_dbk5.xml \
698$(DIRTMP)/bibdemo1_dbk5_1.xml \
699$(DIRTMP)/bibdemo1_dbk5_1.txt
700        @echo "test from xml to xml via raw form"
701        diff -b $(DIRTMP)/bibdemo1_dbk5_1.xml $(DIRSRC)/data/bibdemo1_dbk5.xml | more
702        rm -i $(DIRTMP)/bibdemo1_dbk5_1.xml $(DIRTMP)/bibdemo1_dbk5_1.txt
703
704$(DIRTMP)/bibdemo1_dbk5_1.txt : \
705$(DIRSRC)/data/bibdemo1_dbk5.xml \
706$(DIRSRC)/superbib01_txt.xsl \
707$(DIRSRC)/biblioentry_xml.xsl
708        xsltproc --param makedate "'$(MAKEDATE)'" \
709        --output $@ \
710        $(DIRSRC)/superbib01_txt.xsl \
711        $<
712
713$(DIRTMP)/bibdemo1_dbk5_1.xml : \
714$(DIRTMP)/bibdemo1_dbk5_1.txt \
715$(DIRSRC)/bibopa.sh
716        $(DIRSRC)/bibopa.sh -p demo1 -i $< -t raw -l fr
717
718test_raw_demo1_2_tex : \
719$(DIRTMP)/bibdemo1_dbk5_2.dvi
720        @echo "test from xml to latex via bibtex form"
721
722$(DIRTMP)/bibdemo1_dbk5_2.dvi : \
723$(DIRTMP)/bibdemo1_dbk5_2.tex \
724$(DIRTMP)/bibdemo1_dbk5_2.bib
725        cd $(DIRTMP)/
726        latex bibdemo1_dbk5_2
727        bibtex bibdemo1_dbk5_2
728        latex bibdemo1_dbk5_2
729
730$(DIRTMP)/bibdemo1_dbk5_2.tex : \
731$(DIRSRC)/data/superbib01.tex
732        @sed -e "s/bibliography{superbib01}/bibliography{bibdemo1_dbk5_2}/" \
733        $< > $(DIRTMP)/bibdemo1_dbk5_2.tex
734       
735test_raw_demo1_2 : \
736$(DIRSRC)/data/bibdemo1_dbk5.xml \
737$(DIRTMP)/bibdemo1_dbk5_2.xml \
738$(DIRTMP)/bibdemo1_dbk5_2.bib
739        @echo "test from xml to xml via bibtex form"
740        diff -b $(DIRTMP)/bibdemo1_dbk5_2.xml $(DIRSRC)/data/bibdemo1_dbk5.xml | more
741        rm -i $(DIRTMP)/bibdemo1_dbk5_2.xml $(DIRTMP)/bibdemo1_dbk5_2.bib
742
743$(DIRTMP)/bibdemo1_dbk5_2.bib : \
744$(DIRSRC)/data/bibdemo1_dbk5.xml \
745$(DIRSRC)/superbib02_txt.xsl \
746$(DIRSRC)/biblioentry_xml.xsl
747        xsltproc --param makedate "'$(MAKEDATE)'" \
748        --output $@ \
749        $(DIRSRC)/superbib02_txt.xsl \
750        $<
751
752$(DIRTMP)/bibdemo1_dbk5_2.xml : \
753$(DIRTMP)/bibdemo1_dbk5_2.bib \
754$(DIRSRC)/bibopa.sh \
755$(DIRSRC)/bibtexml2dbk.xsl \
756$(DIRSRC)/external/bibtex2xml.py
757        $(DIRSRC)/bibopa.sh -p demo1 -i $< -t bibtex -o fs -l fr
758
759test_raw_nemo1 : \
760$(DIRSRC)/data/bibnemo1.xml \
761$(DIRTMP)/bibnemo1.xml \
762$(DIRTMP)/bibnemo1.txt
763        diff -b $(DIRTMP)/bibnemo1.xml $(DIRSRC)/data/bibnemo1.xml | more
764        rm -i $(DIRTMP)/bibnemo1.xml $(DIRTMP)/bibnemo1.txt
765
766$(DIRTMP)/bibnemo1.txt : \
767$(DIRSRC)/data/bibnemo1.xml \
768$(DIRSRC)/superbib01_txt.xsl \
769$(DIRSRC)/biblioentry_xml.xsl
770        xsltproc --param makedate "'$(MAKEDATE)'" \
771        --output $@ \
772        $(DIRSRC)/superbib01_txt.xsl \
773        $<
774
775$(DIRTMP)/bibnemo1.xml : \
776$(DIRTMP)/bibnemo1.txt \
777$(DIRSRC)/bibopa.sh
778        $(DIRSRC)/bibopa.sh -p nemo -i $< -t raw -l en
779
780test_raw_nemoall : \
781$(DIRSRC)/data/biball.xml \
782$(DIRTMP)/bibnemoall.xml \
783$(DIRTMP)/bibnemoall.txt
784        diff -b $(DIRTMP)/bibnemoall.xml $(DIRSRC)/data/biball.xml | more
785        rm -i $(DIRTMP)/bibnemoall.xml $(DIRTMP)/bibnemoall.txt
786
787$(DIRTMP)/bibnemoall.txt : \
788$(DIRSRC)/data/biball.xml \
789$(DIRSRC)/superbib01_txt.xsl \
790$(DIRSRC)/biblioentry_xml.xsl
791        xsltproc --param makedate "'$(MAKEDATE)'" \
792        --output $@ \
793        $(DIRSRC)/superbib01_txt.xsl \
794        $<
795
796$(DIRTMP)/bibnemoall.xml : \
797$(DIRTMP)/bibnemoall.txt \
798$(DIRSRC)/bibopa.sh
799        $(DIRSRC)/bibopa.sh -p nemo -i $< -t raw -l en
Note: See TracBrowser for help on using the repository browser.