Makefile
branchpoesie
changeset 30 fa0c9cb0ea30
parent 26 13f3a258179f
child 31 b05681f420f4
equal deleted inserted replaced
29:812a7a38b95a 30:fa0c9cb0ea30
     3 targets=$(addprefix $(1), .html .pdf .txt /index.html)
     3 targets=$(addprefix $(1), .html .pdf .txt /index.html)
     4 output=$(addprefix $(1), .html .pdf .txt) $(1)/
     4 output=$(addprefix $(1), .html .pdf .txt) $(1)/
     5 
     5 
     6 TOP=$(shell pwd)
     6 TOP=$(shell pwd)
     7 INSTALL_DIR=$(TOP)/install
     7 INSTALL_DIR=$(TOP)/install
     8 SRCS=poetry.xml
     8 SRCS=poetry.xml 
       
     9 
       
    10 # Currently, those sections doesn't compiled because of an invalid
       
    11 # link references.  I have a similar problem with the nargir source
       
    12 # book and ecjdr.  I should find a solutions for this kind of "mixed"
       
    13 # (internal|external) links when using xinclude.  Better would be to
       
    14 # not used xinclude at all.
       
    15 
       
    16 SECTIONS=alpha.xml				\
       
    17 	chronology.xml
     9 SRC_DEPS=					\
    18 SRC_DEPS=					\
    10 	alpha.xml				\
       
    11 	chronology.xml				\
       
    12 	themes.xml				\
    19 	themes.xml				\
    13 	abzoodre.xml				\
    20 	abzoodre.xml				\
    14 	amoureux.xml				\
    21 	amoureux.xml				\
    15 	apprends.xml				\
    22 	apprends.xml				\
    16 	belle.xml				\
    23 	belle.xml				\
    89 	rm -rf $(OUTPUT)
    96 	rm -rf $(OUTPUT)
    90 
    97 
    91 debug:
    98 debug:
    92 	echo $(PRINT_STYLES)
    99 	echo $(PRINT_STYLES)
    93 
   100 
    94 %.fo: %.xml $(PRINT_STYLES) $(SRC_DEPS)
   101 %.fo: %.xml $(PRINT_STYLES) $(SRC_DEPS) $(SECTIONS)
    95 	xsltproc --catalogs --xinclude			\
   102 	xsltproc --catalogs --xinclude			\
    96 		-o $@ $(STYLES_DIR)/poetry_print.xsl $<
   103 		-o $@ $(STYLES_DIR)/poetry_print.xsl $<
    97 
   104 
    98 %.pdf: %.fo
   105 %.pdf: %.fo
    99 #	xsltproc -o $@.tmp.fo strip-attributes.xsl $<
   106 #	xsltproc -o $@.tmp.fo strip-attributes.xsl $<
   100 #	xmlto pdf -o $(dir $@) $<
   107 #	xmlto pdf -o $(dir $@) $<
   101 	fop $< $@
   108 	fop $< $@
   102 #	rm $@.tmp.fo
   109 #	rm $@.tmp.fo
   103 
   110 
   104 %.html: %.xml $(HTML_STYLES) $(SRC_DEPS)
   111 %.html: %.xml $(HTML_STYLES) $(SRC_DEPS) $(SECTIONS)
   105 	xsltproc --catalogs --xinclude				\
   112 	xsltproc --catalogs --xinclude				\
   106 		--stringparam css-base-dir '/~fabien/styles/'	\
   113 		--stringparam css-base-dir '/~fabien/styles/'	\
   107 		-o $@ $(STYLES_DIR)/poetry_html.xsl $<
   114 		-o $@ $(STYLES_DIR)/poetry_html.xsl $<
   108 
   115 
   109 %/index.html: %.xml $(HTML_STYLES) $(SRC_DEPS)
   116 %/index.html: %.xml $(HTML_STYLES) $(SRC_DEPS) $(SECTIONS)
   110 	rm -rf $(dir $@)
   117 	rm -rf $(dir $@)
   111 	mkdir -p $(dir $@)
   118 	mkdir -p $(dir $@)
   112 	xsltproc --catalogs --xinclude				\
   119 	xsltproc --catalogs --xinclude				\
   113 		--stringparam css-base-dir '/~fabien/styles/'	\
   120 		--stringparam css-base-dir '/~fabien/styles/'	\
   114 		-o $@ $(STYLES_DIR)/poetry_html.xsl $<
   121 		-o $@ $(STYLES_DIR)/poetry_html.xsl $<