source: trunk/makefile

Last change on this file was 355, checked in by pinsard, 10 years ago

fix thanks to coding rules; typo; dupe empty lines

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