source: trunk/makefile @ 35

Last change on this file since 35 was 35, checked in by pinsard, 17 years ago

reduce verbosity and improve dependencies

  • Property svn:keywords set to Id
File size: 13.7 KB
Line 
1# module :
2# génération de la page bibnemomaf en HTML
3#
4# original location :
5# /usr/home/fplod/incas/bibnemo/src/bibnemomaf/makefile sur aedon.locean-ipsl.upmc.fr
6#
7# update :
8# $Id$
9# fplod 2007-10-12T09:40:01Z aedon.locean-ipsl.upmc.fr (Darwin)
10# add linkcheck
11# ++ les dépendences ne marchent pas bien
12# ++ la génération de pdf ne marchent pas bien sans doute à cause des images top
13# fplod 2007-09-28T08:56:17Z aedon.locean-ipsl.upmc.fr (Darwin)
14# add before and install targets
15# fplod 2007-06-06T10:23:19Z aedon.locean-ipsl.upmc.fr (Darwin)
16# change hard coded DIRBASE
17# fplod 2007-05-21T14:01:20Z aedon.locean-ipsl.upmc.fr (Darwin)
18# ajout du plot nbpub/year
19# fplod 2007-03-30T09:53:48Z aedon.locean-ipsl.upmc.fr (Darwin)
20# creation
21#
22PRODUIT = \
23bibnemomaf
24
25MACHINE_REF = \
26arete.locean-ipsl.upmc.fr
27
28DIRBASE = \
29./
30
31DIRSRC = \
32$(DIRBASE)
33
34DIRTMP = \
35.
36
37DIRXML = \
38$(DIRBASE)/xml/
39
40DIRWWW = \
41/tmp/bibopa/
42
43# here are some examples of DIRPUBLISH, the first on for Seb on his Mac,
44# the second one for me (Françoise) on mine
45# the third for me (Françoise) on my home page http://www.locean-ipsl.upmc.fr/~fplod/superbibdemo/
46#
47# the real one for NEMO is opatlod@cerbere.locean-ispl.upmc.fr:NEMO/general/biblio_new/
48#
49# comment all of them and define your own
50#
51#DIRPUBLISH = \
52#smasson@arete.locean-ipsl.upmc.fr:Sites/bibnemomaf/
53
54#DIRPUBLISH = \
55#fplod@aedon.locean-ipsl.upmc.fr:Sites/superbibdemo/
56
57DIRPUBLISH = \
58fplod@cerbere.locean-ipsl.upmc.fr:./WWW/superbibdemo/
59
60MAKEDATE = \
61`date -u +"%Y-%m-%dT%H:%M:%SZ"`
62
63XSLPARAMHTML = \
64--xinclude \
65--param makedate "'$(MAKEDATE)'" \
66--param html.stylesheet "'../../style.css ../../$(PRODUIT).css'" \
67--param generate.article.toc '0' \
68--param generate.section.toc.level '0' \
69--param link.mailto.url "'mailto:opatlod@locean-ipsl.upmc.fr'" \
70--param citerefentry.link '1'
71
72XSLDOCBOOKHTML = \
73$(DIRXML)/html_xsltproc.xsl
74
75PDF_XSLDOCBOOK = \
76$(DIRSRC)/$(PRODUIT)_pdf.xsl
77
78SRCXMLDB0 = \
79$(DIRSRC)/bibnemomain.xml
80
81SRCXMLDB0C = \
82$(DIRTMP)/bibnemomain_complet.xml
83
84IMAGES = \
85$(DIRSRC)/images/globalicondl11x10_up.gif
86
87help :
88        @echo "Define in the makefile localisations of :"
89        @echo " - sources (DIRSRC) where you \"svn checkout\" superbib"
90        @echo " - temporary Web pages (DIRWWW), where you can check links before publication"
91        @echo "- published Web pages (DIRPUBLISH)"
92        @echo ""
93        @echo "Prepare output directories :"
94        @echo "$ make before"
95        @echo ""
96        @echo "Identify bibliography databank "
97        @echo ""
98        @echo "for example for superbib demo1:"
99        @echo "$ ln -sf data/bibdemo1.xml biblio.xml"
100        @echo ""
101        @echo "for example for NEMO Survey :"
102        @echo "$ ln -sf data/biball.xml biblio.xml"
103        @echo ""
104        @echo "check for duplicate DOI; for example :"
105        @echo "$ ./twindoi.sh -i biblio.xml -t xml"
106        @echo ""
107        @echo "Identify user databank; for example :"
108        @echo ""
109        @echo "for example for superbib demo1:"
110        @echo "$ ln -sf data/userdemo1.xml user.xml"
111        @echo "$ ln -sf data/usernemo.dtd user.dtd"
112        @echo ""
113        @echo "for example for NEMO Survey :"
114        @echo "$ ln -sf data/usernemo.xml user.xml"
115        @echo "$ ln -sf data/usernemo.dtd user.dtd"
116        @echo ""
117        @echo "Following commands are available to build outputs :"
118        @echo "$ make html_en"
119        @echo "$ make pdf_en"
120        @echo " "
121        @echo "Check links before installation : "
122        @echo "make htmllinkcheckb"
123        @echo " "
124        @echo "Last step = installation"
125        @echo "$ make install"
126        @echo " "
127        @echo "Check links after installation : "
128        @echo "make htmllinkchecka"
129        @echo " "
130        @echo "if you move this product to an other place, "
131        @echo "change parameters in the call sequence of ./before.sh and ./install.sh"
132        @echo "and in the call sequence of in ./install.sh"
133        @echo "in this makefile"
134
135before :
136        ./before.sh -p $(PRODUIT) -s $(DIRSRC) -w $(DIRWWW) -multi -l en -m 2
137
138install :
139        ./install.sh -w $(DIRWWW) -p $(DIRPUBLISH)
140clean :
141        -@rm -fr $(DIRWWW)/
142        -@rm -f $(DIRTMP)/bibnemomain_beforetidy.php
143        -@rm -f $(DIRTMP)/bibnemomain_tidy_err
144        -@rm -f $(DIRTMP)/$(DIRTMP)/select_id.xml
145        -@rm -f $(SRCXMLDB0C)
146        -@rm -f $(DIRTMP)/$(PRODUIT)01.xml
147        -@rm -f $(DIRTMP)/$(PRODUIT)01_beforetidy.html
148        -@rm -f $(DIRTMP)/$(PRODUIT)01_dblatex.log
149        -@rm -f $(DIRTMP)/$(PRODUIT)01_dblatex.err
150        -@rm -f $(DIRTMP)/$(PRODUIT)01_tidy_err
151        -@rm -f $(DIRTMP)/years_gnuplot.gnu
152        -@rm -f $(DIRTMP)/$(PRODUIT)02.xml
153        -@rm -f $(DIRTMP)/$(PRODUIT)02_beforetidy.html
154        -@rm -f $(DIRTMP)/$(PRODUIT)02_tidy_err
155        -@rm -f $(DIRTMP)/$(PRODUIT)02_dblatex.err
156        -@rm -f $(DIRTMP)/$(PRODUIT)02_dblatex.log
157        -@rm -f $(DIRTMP)/bibliomany01.xml
158        -@rm -f $(DIRTMP)/bibliomany02.xml
159        -@rm -f $(DIRTMP)/titlepage.$(PRODUIT).xsl
160        -@rm -f $(DIRTMP)/user_db.xml
161        -@rm -f $(DIRTMP)/user_beforetidy.html
162        -@rm -f $(DIRTMP)/user_tidy_err
163        -@rm -f $(DIRTMP)/template_beforetidy.php
164        -@rm -f $(DIRTMP)/template_tidy_err
165        -@rm -f $(DIRTMP)/template_db.xml
166
167htmllinkcheckb :
168        @linkchecker.sh -d $(DIRWWW)
169
170htmllinkchecka :
171        @linkchecker.sh -d $(DIRPUBLISH)
172
173html_en : \
174$(DIRWWW)/en/one/bibnemomain.php \
175$(DIRWWW)/en/one/template.php \
176$(DIRWWW)/en/one/$(PRODUIT)00.html \
177$(DIRWWW)/en/one/$(PRODUIT)01.html \
178$(DIRWWW)/en/one/$(PRODUIT)02.html \
179$(DIRWWW)/en/many/$(PRODUIT)01/ \
180$(DIRWWW)/en/many/$(PRODUIT)02/ \
181$(DIRWWW)/en/one/user.html
182
183pdf_en : ./\
184$(DIRTMP)/$(PRODUIT)01.pdf \
185$(DIRTMP)/$(PRODUIT)02.pdf
186
187$(DIRWWW)/en/one/$(PRODUIT)00.html : \
188$(DIRSRC)/biblio.xml
189        @xsltproc \
190        --output $@ \
191        http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
192        $(DIRSRC)/biblio.xml
193
194$(DIRWWW)/en/one/bibnemomain.php : \
195$(DIRTMP)/bibnemomain_beforetidy.php \
196$(DIRSRC)/configtidy.txt
197        -@tidy -config $(DIRSRC)/configtidy.txt \
198        -f $(DIRTMP)/bibnemomain_tidy_err \
199        -xml \
200        -clean \
201        -output $@ \
202        $(DIRTMP)/bibnemomain_beforetidy.php
203
204$(DIRTMP)/bibnemomain_beforetidy.php : \
205$(DIRSRC)/$(PRODUIT).css \
206$(DIRSRC)/style.css \
207$(DIRSRC)/bibnemomain_html.xsl \
208$(DIRTMP)/titlepage.$(PRODUIT).xsl \
209$(SRCXMLDB0C)
210        @xsltproc \
211        $(XSLPARAMHTML) \
212        --output $@ \
213        $(DIRSRC)/bibnemomain_html.xsl \
214        $(SRCXMLDB0C)
215
216$(DIRWWW)/en/one/$(PRODUIT)01.html : \
217$(DIRTMP)/$(PRODUIT)01_beforetidy.html \
218$(DIRSRC)/configtidy.txt \
219$(DIRWWW)/images/years.png
220        -@tidy -config $(DIRSRC)/configtidy.txt \
221        -f $(DIRTMP)/$(PRODUIT)01_tidy_err \
222        -clean \
223        -xml \
224        -o $@ \
225        $(DIRTMP)/$(PRODUIT)01_beforetidy.html
226        # tidy supprime trop de blancs
227        @cp $(DIRTMP)/$(PRODUIT)01_beforetidy.html \
228        $(DIRWWW)/en/one/$(PRODUIT)01.html
229
230$(DIRTMP)/$(PRODUIT)01_beforetidy.html : \
231$(DIRSRC)/$(PRODUIT).css \
232$(DIRSRC)/style.css \
233$(DIRSRC)/$(PRODUIT)01_html.xsl \
234$(DIRTMP)/$(PRODUIT)01.xml
235        @xsltproc \
236        $(XSLPARAMHTML) \
237        --output $@ \
238        $(DIRSRC)/$(PRODUIT)01_html.xsl \
239        $(DIRTMP)/$(PRODUIT)01.xml
240
241$(DIRTMP)/$(PRODUIT)01.xml : \
242$(DIRSRC)/$(PRODUIT)01_xml.xsl \
243$(DIRSRC)/biblio.xml
244        @xsltproc \
245        $(XSLPARAMHTML) \
246        --output $@ \
247        $(DIRSRC)/$(PRODUIT)01_xml.xsl \
248        $(DIRSRC)/biblio.xml
249
250$(DIRWWW)/en/one/$(PRODUIT)02.html : \
251$(DIRTMP)/$(PRODUIT)02_beforetidy.html \
252$(DIRSRC)/configtidy.txt
253        -@tidy -config $(DIRSRC)/configtidy.txt \
254        -f $(DIRTMP)/$(PRODUIT)02_tidy_err \
255        -clean \
256        -xml \
257        -o $@ \
258        $(DIRTMP)/$(PRODUIT)02_beforetidy.html
259        # tidy ne fait pas la bonne conversion de charset
260        @cp $(DIRTMP)/$(PRODUIT)02_beforetidy.html \
261        $(DIRWWW)/en/one/$(PRODUIT)02.html
262
263$(DIRTMP)/$(PRODUIT)02_beforetidy.html : \
264$(DIRSRC)/$(PRODUIT).css \
265$(DIRSRC)/style.css \
266$(DIRSRC)/$(PRODUIT)01_html.xsl \
267$(DIRTMP)/$(PRODUIT)02.xml
268        @xsltproc \
269        $(XSLPARAMHTML) \
270        --output $@ \
271        $(DIRSRC)/$(PRODUIT)01_html.xsl \
272        $(DIRTMP)/$(PRODUIT)02.xml
273
274$(DIRWWW)/en/many/$(PRODUIT)02/ : \
275$(DIRSRC)/$(PRODUIT).css \
276$(DIRSRC)/style.css \
277$(DIRSRC)/superbibmany02_html.xsl \
278$(DIRTMP)/bibliomany02.xml
279        @xsltproc \
280        $(XSLPARAMHTML) \
281        --param html.ext "'.php'" \
282        --output $@ \
283        $(DIRSRC)/superbibmany02_html.xsl \
284        $(DIRTMP)/bibliomany02.xml
285        # affreux sed
286        for file in $(DIRWWW)/en/many/$(PRODUIT)02/*.php; do \
287         sed -f insertphp_many.sed $${file} > $${file}_sed ; \
288         mv $${file}_sed $${file} ; \
289        done
290
291$(DIRTMP)/bibliomany02.xml : \
292$(DIRSRC)/superbibmany02_xml.xsl \
293$(DIRSRC)/biblio.xml
294        @xsltproc \
295        $(XSLPARAMHTML) \
296        --param html.ext "'.php'" \
297        --output $@ \
298        $(DIRSRC)/superbibmany02_xml.xsl \
299        $(DIRSRC)/biblio.xml
300
301$(DIRWWW)/en/many/$(PRODUIT)01/ : \
302$(DIRSRC)/$(PRODUIT).css \
303$(DIRSRC)/style.css \
304$(DIRSRC)/superbibmany01_html.xsl \
305$(DIRTMP)/bibliomany01.xml
306        @xsltproc \
307        $(XSLPARAMHTML) \
308        --output $@ \
309        $(DIRSRC)/superbibmany01_html.xsl \
310        $(DIRTMP)/bibliomany01.xml
311
312$(DIRTMP)/bibliomany01.xml : \
313$(DIRSRC)/superbibmany01_xml.xsl \
314$(DIRSRC)/biblio.xml
315        @xsltproc \
316        $(XSLPARAMHTML) \
317        --param html.ext "'.html'" \
318        --output $@ \
319        $(DIRSRC)/superbibmany01_xml.xsl \
320        $(DIRSRC)/biblio.xml
321
322$(DIRTMP)/$(PRODUIT)02.xml : \
323$(DIRSRC)/$(PRODUIT)02_xml.xsl \
324$(DIRSRC)/biblio.xml
325        @xsltproc \
326        $(XSLPARAMHTML) \
327        --param html.ext "'.html'" \
328        --output $@ \
329        $(DIRSRC)/$(PRODUIT)02_xml.xsl \
330        $(DIRSRC)/biblio.xml
331
332$(DIRTMP)/titlepage.$(PRODUIT).xsl : \
333$(DIRSRC)/titlepage.$(PRODUIT).xml
334        @xsltproc \
335        --xinclude \
336        --output $@ \
337        http://docbook.sourceforge.net/release/xsl/current/template/titlepage.xsl \
338        $(DIRSRC)/titlepage.$(PRODUIT).xml
339
340$(DIRWWW)/images/years.png : \
341$(DIRTMP)/years_gnuplot.gnu     
342        @gnuplot $(DIRTMP)/years_gnuplot.gnu
343
344$(DIRTMP)/years_gnuplot.gnu : \
345$(DIRSRC)/years_gnuplot.xsl \
346$(DIRSRC)/biblio.xml
347        @xsltproc \
348        --output $@ \
349        --param makedate "'$(MAKEDATE)'" \
350        --param path "'$(DIRWWW)/images/'" \
351        $(DIRSRC)/years_gnuplot.xsl \
352        $(DIRSRC)/biblio.xml
353
354$(DIRTMP)/$(PRODUIT)01.pdf : \
355$(PDF_XSLDOCBOOK) \
356$(DIRTMP)/$(PRODUIT)01.xml
357        @dblatex \
358        -b pdftex \
359        -T simple \
360        -o $@ \
361        -d \
362        -x "--nonet" \
363        -p $(PDF_XSLDOCBOOK) \
364        $(DIRTMP)/$(PRODUIT)01.xml \
365        1> $(DIRTMP)/$(PRODUIT)01_dblatex.log \
366        2> $(DIRTMP)/$(PRODUIT)01_dblatex.err
367
368$(DIRTMP)/$(PRODUIT)02.pdf : \
369$(PDF_XSLDOCBOOK) \
370$(DIRSRC)/biblio.xml
371        @dblatex \
372        -b pdftex \
373        -T simple \
374        -o $@ \
375        -d \
376        -x "--nonet" \
377        -p $(PDF_XSLDOCBOOK) \
378        $(DIRSRC)/biblio.xml
379        1> $(DIRTMP)/$(PRODUIT)02_dblatex.log \
380        2> $(DIRTMP)/$(PRODUIT)02_dblatex.err
381
382$(SRCXMLDB0C) : \
383$(SRCXMLDB0) \
384$(DIRSRC)/select_form.php \
385$(DIRTMP)/select_id.xml
386        @xmllint \
387        --xinclude \
388        --nonet \
389        --output $@ \
390        $(DIRSRC)/bibnemomain.xml
391
392$(DIRTMP)/select_id.xml : \
393$(DIRSRC)/select_id.xsl \
394$(DIRSRC)/biblio.xml
395        @xsltproc \
396        --output $@ \
397        $(DIRSRC)/select_id.xsl \
398        $(DIRSRC)/biblio.xml
399
400$(DIRWWW)/en/one/user.html : \
401$(DIRTMP)/user_beforetidy.html \
402$(DIRSRC)/configtidy.txt
403        -@tidy -config $(DIRSRC)/configtidy.txt \
404        -f $(DIRTMP)/user_tidy_err \
405        -clean \
406        -xml \
407        -o $@ \
408        $(DIRTMP)/user_beforetidy.html
409        # tidy supprime trop de blancs
410        @cp $(DIRTMP)/user_beforetidy.html \
411        $(DIRWWW)/en/one/user.html
412
413$(DIRTMP)/user_beforetidy.html : \
414$(DIRSRC)/$(PRODUIT).css \
415$(DIRSRC)/style.css \
416$(DIRSRC)/user_html.xsl \
417$(DIRTMP)/user_db.xml
418        @xsltproc \
419        $(XSLPARAMHTML) \
420        --output $@ \
421        $(DIRSRC)/user_html.xsl \
422        $(DIRTMP)/user_db.xml
423
424$(DIRTMP)/user_db.xml : \
425$(DIRSRC)/user_db.xsl \
426$(DIRSRC)/user.xml
427        @xsltproc \
428        $(XSLPARAMHTML) \
429        --output $@ \
430        $(DIRSRC)/user_db.xsl \
431        $(DIRSRC)/user.xml
432
433$(DIRSRC)/user.xml : \
434$(DIRSRC)/user.dtd
435        -@xmllint --noout --valid $(DIRSRC)/user.xml
436
437$(DIRWWW)/en/one/template.php : \
438$(DIRTMP)/template_beforetidy.php \
439$(DIRSRC)/configtidy.txt
440        -@tidy -config $(DIRSRC)/configtidy.txt \
441        -f $(DIRTMP)/template_tidy_err \
442        -xml \
443        -clean \
444        -o $@ \
445        $(DIRTMP)/template_beforetidy.php
446        # affreux sed
447        @sed -f insertphp_one.sed $(DIRTMP)/template_beforetidy.php > \
448        $(DIRTMP)/template_beforetidy.php_sed
449        mv $(DIRTMP)/template_beforetidy.php_sed \
450        $(DIRTMP)/template_beforetidy.php
451        # tidy supprime trop de blancs
452        @cp \
453        $(DIRTMP)/template_beforetidy.php \
454        $(DIRWWW)/en/one/template.php
455
456$(DIRTMP)/template_beforetidy.php : \
457$(DIRSRC)/$(PRODUIT).css \
458$(DIRSRC)/style.css \
459$(DIRSRC)/bibnemomain_html.xsl \
460$(DIRTMP)/template_db.xml
461        @xsltproc \
462        $(XSLPARAMHTML) \
463        --param html.ext "'.php'" \
464        --output $@ \
465        $(DIRSRC)/bibnemomain_html.xsl \
466        $(DIRTMP)/template_db.xml
467
468$(DIRTMP)/template_db.xml : \
469$(DIRSRC)/user.xml \
470$(DIRSRC)/template_db.xsl
471        @xsltproc \
472        $(XSLPARAMHTML) \
473        --output $@ \
474        $(DIRSRC)/template_db.xsl \
475        $(DIRSRC)/user.xml
476
477$(DIRSRC)/user_db.xsl : \
478$(DIRSRC)/components_db.xsl \
479$(DIRSRC)/compilers_db.xsl \
480$(DIRSRC)/platforms_db.xsl \
481$(DIRSRC)/processors_db.xsl
482        @touch $@
483
484$(DIRSRC)/form_db.xsl : \
485$(DIRSRC)/compilers_db.xsl \
486$(DIRSRC)/components_db.xsl \
487$(DIRSRC)/platforms_db.xsl \
488$(DIRSRC)/personal_db.xsl \
489$(DIRSRC)/comments_db.xsl \
490$(DIRSRC)/newreferences_db.xsl \
491$(DIRSRC)/processors_db.xsl \
492$(DIRSRC)/biblioentry_xml.xsl
493        @touch $@
494
495$(DIRSRC)/biblioentry_xml.xsl : \
496$(DIRSRC)/correction_db.xsl
497        @touch $@
498
499$(DIRSRC)/bibnemomaf01_html.xsl : \
500$(DIRTMP)/titlepage.bibnemomaf.xsl
501        @touch $@
502
503$(DIRSRC)/user_html.xsl : \
504$(DIRTMP)/titlepage.bibnemomaf.xsl \
505$(DIRSRC)/form_html.xsl
506        @touch $@
507
508
509$(DIRSRC)/bibnemomafmain_html.xsl : \
510$(DIRTMP)/titlepage.bibnemomaf.xsl \
511$(DIRSRC)/form_html.xsl
512        @touch $@
513
514$(DIRSRC)/bibnemomaf02_html.xsl : \
515$(DIRTMP)/titlepage.bibnemomaf.xsl
516        @touch $@
517
518$(DIRSRC)/superbibmany01_html.xsl : \
519$(DIRTMP)/titlepage.bibnemomaf.xsl
520        @touch $@
521
522$(DIRSRC)/superbibmany02_html.xsl : \
523$(DIRTMP)/titlepage.bibnemomaf.xsl \
524$(DIRSRC)/form_html.xsl
525        @touch $@
526
527$(DIRSRC)/bibnemomaf_pdf.xsl : \
528$(DIRTMP)/titlepage.bibnemomaf.xsl
529        @touch $@
530
531$(DIRSRC)/bibnemomaf01_txt.xsl : \
532$(DIRTMP)/titlepage.bibnemomaf.xsl
533        @touch $@
534
535$(DIRSRC)/bibnemomaf01_xml.xsl : \
536$(DIRSRC)/biblioentry_xml.xsl
537        @touch $@
538
539$(DIRSRC)/select_id.xsl : \
540$(DIRSRC)/firstname_id.xsl \
541$(DIRSRC)/surname_id.xsl
542        @touch $@
543
544$(DIRSRC)/superbibmany01_xml.xsl : \
545$(DIRSRC)/firstname_id.xsl \
546$(DIRSRC)/surname_id.xsl \
547$(DIRSRC)/table_authors.xsl \
548$(DIRSRC)/biblioentry_xml.xsl
549        @touch $@
550
551$(DIRSRC)/superbibmany02_xml.xsl : \
552$(DIRSRC)/firstname_id.xsl \
553$(DIRSRC)/surname_id.xsl \
554$(DIRSRC)/table_authors.xsl
555        @touch $@
556
557$(DIRSRC)/bibnemomaf02_xml.xsl : \
558$(DIRSRC)/firstname_id.xsl \
559$(DIRSRC)/surname_id.xsl \
560$(DIRSRC)/table_authors.xsl \
561$(DIRSRC)/biblioentry_xml.xsl
562        @touch $@
563
564$(DIRSRC)/template_db.xsl : \
565$(DIRSRC)/form_db.xsl
566        @touch $@
567
568$(DIRSRC)/years_gnuplot.xsl : \
569$(DIRSRC)/biblioentry_xml.xsl
570        @touch $@
571
Note: See TracBrowser for help on using the repository browser.