diff -r ab0866b1578d -r 5d8d02c08a17 Makefile --- a/Makefile Thu Jan 26 16:51:34 2006 -0500 +++ b/Makefile Thu Jan 26 16:51:42 2006 -0500 @@ -43,18 +43,14 @@ HTML_STYLES=$(STYLES) $(addprefix $(STYLES_DIR)/,html.xsl poetry_html.xsl) PRINT_STYLES=$(STYLES) $(addprefix $(STYLES_DIR)/,print.xsl poetry_print.xsl masters_print.xsl) DTD=$(addprefix $(DTD_DIR)/,poetry.dtd) -SGML_CATALOG_FILES=$(CATALOG) +SGML_CATALOG_FILES=$(TOP)/catalog export SGML_CATALOG_FILES -xml_validate=xmllint --catalogs --xinclude $(1) | \ - sed -e 's/\(xmlns:xi\|xml:base\)="[^"]*"//g' | \ - xmllint --catalogs --valid --noout - 2>&1 | \ - sed 's/^-:/$(1):/' +xml_validate=xmllint --catalogs --xinclude --postvalid --noout $(1) html_validate=true #REMOTE_DIR=o:public_html/poesie # FOP=xmlto pdf FOP=fop -CATALOG=$(TOP)/catalog #OUTPUT=$(foreach target,$(basename $(SRCS)),$(call output,$(target))) OUTPUT=poetry.pdf poetry/ @@ -71,8 +67,11 @@ [ -d $(INSTALL_DIR) ] || mkdir -p $(INSTALL_DIR) cp -a $(OUTPUT)* $(INSTALL_DIR) -validate: - $(call xml_validate,$(SRCS)) +validate: $(SRCS) $(addsuffix -validate,$(SRC_DEPS)) + $(call xml_validate,$<) + +%-validate: % + $(call xml_validate,$<) clean: rm -f *~ *.fo @@ -84,25 +83,25 @@ echo $(PRINT_STYLES) %.fo: %.xml $(PRINT_STYLES) $(SRC_DEPS) - SGML_CATALOG_FILES=$(CATALOG) xsltproc --catalogs --xinclude \ + xsltproc --catalogs --xinclude \ -o $@ $(STYLES_DIR)/poetry_print.xsl $< %.pdf: %.fo -# SGML_CATALOG_FILES=$(CATALOG) xsltproc -o $@.tmp.fo strip-attributes.xsl $< +# xsltproc -o $@.tmp.fo strip-attributes.xsl $< # xmlto pdf -o $(dir $@) $< fop $< $@ # rm $@.tmp.fo %.html: %.xml $(HTML_STYLES) $(SRC_DEPS) - SGML_CATALOG_FILES=$(CATALOG) xsltproc --catalogs --xinclude \ - --stringparam css-base-dir '/~fabien/styles/' \ + xsltproc --catalogs --xinclude \ + --stringparam css-base-dir '/~fabien/styles/' \ -o $@ $(STYLES_DIR)/poetry_html.xsl $< %/index.html: %.xml $(HTML_STYLES) $(SRC_DEPS) rm -rf $(dir $@) mkdir -p $(dir $@) - SGML_CATALOG_FILES=$(CATALOG) xsltproc --catalogs --xinclude \ - --stringparam css-base-dir '/~fabien/styles/' \ + xsltproc --catalogs --xinclude \ + --stringparam css-base-dir '/~fabien/styles/' \ -o $@ $(STYLES_DIR)/poetry_html.xsl $< %.txt: %.html