6 TOP=`pwd` |
6 TOP=`pwd` |
7 INSTALL_DIR=$(TOP)/install |
7 INSTALL_DIR=$(TOP)/install |
8 SRCS=cda.xml |
8 SRCS=cda.xml |
9 FOP=fop |
9 FOP=fop |
10 NWALSH_XSL_DIR=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh |
10 NWALSH_XSL_DIR=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh |
11 OO_PDF_OUTPUT_DIR=$(HOME)/pdf |
|
12 |
11 |
13 PDF_OUTPUT=cda-perso.pdf cda-perso-alt.pdf presentation.pdf |
12 OUTPUT=$(foreach target,$(basename $(SRCS)),$(call output,$(target))) |
14 OUTPUT=$(foreach target,$(basename $(SRCS)),$(call output,$(target))) \ |
13 UPLOAD=$(OUTPUT) cda.xml cda-perso.odt cda-perso-vierge.odt presentation.odp \ |
15 $(PDF_OUTPUT) |
14 cda-perso-vierge.pdf presentation.pdf presentation.swf \ |
16 UPLOAD=$(OUTPUT) cda-perso.sxw cda-perso-alt.sxw presentation.sxi index.fr.html blason.png |
15 index.fr.html blason.png |
17 xml_validate=xmllint --xinclude --noout $(1) |
16 xml_validate=xmllint --xinclude --noout $(1) |
18 html_validate=$(call xml_validate,$(1)) |
17 html_validate=$(call xml_validate,$(1)) |
19 |
18 |
20 all: $(basename $(SRCS)) $(PDF_OUTPUT) |
19 all: $(basename $(SRCS)) |
21 |
20 |
22 # Should I need to validate other file? Can I? |
21 # Should I need to validate other file? Can I? |
23 validate: $(addsuffix -validate, $(SRCS) index.fr.html) |
22 validate: $(addsuffix -validate, $(SRCS) index.fr.html) |
24 |
23 |
25 %.xml-validate: %.xml |
24 %.xml-validate: %.xml |
41 # xsltproc -o $@.tmp.fo strip-attributes.xsl $< |
40 # xsltproc -o $@.tmp.fo strip-attributes.xsl $< |
42 # xmlto pdf -o $(dir $@) $< |
41 # xmlto pdf -o $(dir $@) $< |
43 fop $< $@ |
42 fop $< $@ |
44 # rm $@.tmp.fo |
43 # rm $@.tmp.fo |
45 |
44 |
46 %.pdf: %.sxw |
|
47 xvfb-run -a oowriter2 -pt PDF $< |
|
48 mv $(OO_PDF_OUTPUT_DIR)/$@ $@ |
|
49 |
|
50 %.pdf: %.sxi |
|
51 xvfb-run -a ooimpress2 -pt PDF $< |
|
52 mv $(OO_PDF_OUTPUT_DIR)/$@ $@ |
|
53 |
|
54 %.html: %.xml html.xsl common.xsl |
45 %.html: %.xml html.xsl common.xsl |
55 xsltproc --xinclude -o $@ html.xsl $< |
46 xsltproc --xinclude -o $@ html.xsl $< |
56 # recode u8..l1 $@ |
47 # recode u8..l1 $@ |
57 |
48 |
58 %/index.html: %.xml chunk.xsl common.xsl |
49 %/index.html: %.xml chunk.xsl common.xsl |