Makefile
branchpoesie
changeset 34 1dbea8c79a01
parent 31 b05681f420f4
child 35 0574b475151f
equal deleted inserted replaced
33:5c27e2a6b34f 34:1dbea8c79a01
    11 # link references.  I have a similar problem with the nargir source
    11 # link references.  I have a similar problem with the nargir source
    12 # book and ecjdr.  I should find a solution for this kind of "mixed"
    12 # book and ecjdr.  I should find a solution for this kind of "mixed"
    13 # (internal|external) links when using xinclude.  Better would be to
    13 # (internal|external) links when using xinclude.  Better would be to
    14 # not used xinclude at all.
    14 # not used xinclude at all.
    15 
    15 
    16 SECTIONS=alpha.xml				\
    16 SECTIONS=\
    17 	themes.xml				\
    17     alpha.xml \
       
    18 	themes.xml \
    18 	chronology.xml
    19 	chronology.xml
    19 SRC_DEPS=					\
    20 SRC_DEPS=\
    20 	abzoodre.xml				\
    21 	abzoodre.xml \
    21 	amoureux.xml				\
    22 	amoureux.xml \
    22 	apprends.xml				\
    23 	apprends.xml \
    23 	belle.xml				\
    24 	belle.xml \
    24 	coeur.xml				\
    25 	coeur.xml \
    25 	democratie.xml				\
    26 	democratie.xml \
    26 	desert.xml				\
    27 	desert.xml \
    27 	ecrivain.xml				\
    28 	ecrivain.xml \
    28 	espoir.xml				\
    29 	espoir.xml \
    29 	flocons.xml				\
    30 	flocons.xml \
    30 	hiver.xml				\
    31 	hiver.xml \
    31 	horloge.xml				\
    32 	horloge.xml \
    32 	idees.xml				\
    33 	idees.xml \
    33 	jugement.xml				\
    34 	jugement.xml \
    34 	langue.xml				\
    35 	langue.xml \
    35 	lettreseule.xml				\
    36 	lettreseule.xml \
    36 	louve.xml				\
    37 	louve.xml \
    37 	nature.xml				\
    38 	nature.xml \
    38 	oiseau.xml				\
    39 	oiseau.xml \
    39 	ondes.xml				\
    40 	ondes.xml \
    40 	orchidee.xml				\
    41 	orchidee.xml \
    41 	paysage.xml				\
    42 	paysage.xml \
    42 	plonger.xml				\
    43 	plonger.xml \
    43 	pomme.xml				\
    44 	pomme.xml \
    44 	prince.xml				\
    45 	prince.xml \
    45 	renaissance.xml				\
    46 	renaissance.xml \
    46 	reverie.xml				\
    47 	reverie.xml \
    47 	serrure.xml				\
    48 	serrure.xml \
    48 	si_tu_maimais.xml			\
    49 	si_tu_maimais.xml \
    49 	tempete.xml				\
    50 	sombrespensees.xml \
    50 	testament.xml				\
    51 	tempete.xml \
    51 	ton_rire.xml				\
    52 	testament.xml \
    52 	valentin.xml				\
    53 	ton_rire.xml \
    53 	voix.xml				\
    54 	valentin.xml \
       
    55 	voix.xml \
    54 	wolf.xml
    56 	wolf.xml
    55 STYLES_DIR=$(TOP)/styles
    57 STYLES_DIR=$(TOP)/styles
    56 DTD_DIR=$(TOP)/dtd
    58 DTD_DIR=$(TOP)/dtd
    57 STYLES=$(addprefix $(STYLES_DIR)/,common.xsl)
    59 STYLES=$(addprefix $(STYLES_DIR)/,common.xsl)
    58 HTML_STYLES=$(STYLES) $(addprefix $(STYLES_DIR)/,html.xsl poetry_html.xsl)
    60 HTML_STYLES=$(STYLES) $(addprefix $(STYLES_DIR)/,html.xsl poetry_html.xsl)
    59 PRINT_STYLES=$(STYLES) $(addprefix $(STYLES_DIR)/,print.xsl poetry_print.xsl masters_print.xsl)
    61 PRINT_STYLES=$(STYLES) $(addprefix $(STYLES_DIR)/,print.xsl poetry_print.xsl masters_print.xsl)
    60 DTD=$(addprefix $(DTD_DIR)/,poetry.dtd)
    62 DTD=$(addprefix $(DTD_DIR)/,poetry.dtd)
    61 SGML_CATALOG_FILES=$(TOP)/catalog
    63 SGML_CATALOG_FILES=$(TOP)/catalog
    62 export SGML_CATALOG_FILES
    64 export SGML_CATALOG_FILES
    63 xml_validate=xmllint --catalogs --valid --noout $(1)
    65 XML_CATALOG_FILES=$(TOP)/catalog.xml
    64 xml_post_validate=xmllint --catalogs --xinclude --postvalid --noout $(1)
    66 export XML_CATALOG_FILES
       
    67 xml_validate=xmllint -nonet --valid --noout $(1)
       
    68 xml_post_validate=xmllint -nonet --xinclude --postvalid --noout $(1)
    65 html_validate=xmllint --xinclude --valid --noout $(1)
    69 html_validate=xmllint --xinclude --valid --noout $(1)
    66 
    70 
    67 #REMOTE_DIR=o:public_html/poesie
    71 #REMOTE_DIR=o:public_html/poesie
    68 # FOP=xmlto pdf
    72 # FOP=xmlto pdf
    69 FOP=fop
    73 FOP=fop
   100 
   104 
   101 debug:
   105 debug:
   102 	echo $(PRINT_STYLES)
   106 	echo $(PRINT_STYLES)
   103 
   107 
   104 %.fo: %.xml $(PRINT_STYLES) $(SRC_DEPS) $(SECTIONS)
   108 %.fo: %.xml $(PRINT_STYLES) $(SRC_DEPS) $(SECTIONS)
   105 	xsltproc --catalogs --xinclude			\
   109 	xsltproc -nonet --xinclude			\
   106 		-o $@ $(STYLES_DIR)/poetry_print.xsl $<
   110 		-o $@ $(STYLES_DIR)/poetry_print.xsl $<
   107 
   111 
   108 %.pdf: %.fo
   112 %.pdf: %.fo
   109 #	xsltproc -o $@.tmp.fo strip-attributes.xsl $<
   113 #	xsltproc -o $@.tmp.fo strip-attributes.xsl $<
   110 #	xmlto pdf -o $(dir $@) $<
   114 #	xmlto pdf -o $(dir $@) $<
   111 	fop $< $@
   115 	fop $< $@
   112 #	rm $@.tmp.fo
   116 #	rm $@.tmp.fo
   113 
   117 
   114 %.html: %.xml $(HTML_STYLES) $(SRC_DEPS) $(SECTIONS)
   118 %.html: %.xml $(HTML_STYLES) $(SRC_DEPS) $(SECTIONS)
   115 	xsltproc --catalogs --xinclude				\
   119 	xsltproc -nonet --xinclude				\
   116 		--stringparam css-base-dir '/~fabien/styles/'	\
   120 		--stringparam css-base-dir '/~fabien/styles/'	\
   117 		-o $@ $(STYLES_DIR)/poetry_html.xsl $<
   121 		-o $@ $(STYLES_DIR)/poetry_html.xsl $<
   118 
   122 
   119 %/index.html: %.xml $(HTML_STYLES) $(SRC_DEPS) $(SECTIONS)
   123 %/index.html: %.xml $(HTML_STYLES) $(SRC_DEPS) $(SECTIONS)
   120 	rm -rf $(dir $@)
   124 	rm -rf $(dir $@)
   121 	mkdir -p $(dir $@)
   125 	mkdir -p $(dir $@)
   122 	xsltproc --catalogs --xinclude				\
   126 	xsltproc -nonet --xinclude				\
   123 		--stringparam css-base-dir '/~fabien/styles/'	\
   127 		--stringparam css-base-dir '/~fabien/styles/'	\
   124 		-o $@ $(STYLES_DIR)/poetry_html.xsl $<
   128 		-o $@ $(STYLES_DIR)/poetry_html.xsl $<
   125 
   129 
   126 %.txt: %.html
   130 %.txt: %.html
   127 	w3m -dump $< > $@
   131 	w3m -dump $< > $@