Makefile
branchcontes
changeset 6 f5ce1e175ca6
parent 5 b0d91312ad83
child 7 201b9e3f08dd
equal deleted inserted replaced
5:b0d91312ad83 6:f5ce1e175ca6
    25 SGML_CATALOG_FILES=$(TOP)/catalog
    25 SGML_CATALOG_FILES=$(TOP)/catalog
    26 export SGML_CATALOG_FILES
    26 export SGML_CATALOG_FILES
    27 
    27 
    28 #OUTPUT=$(foreach target,$(basename $(SRCS)),$(call output,$(target)))
    28 #OUTPUT=$(foreach target,$(basename $(SRCS)),$(call output,$(target)))
    29 OUTPUT=contes.pdf contes/
    29 OUTPUT=contes.pdf contes/
    30 xml_validate=xmllint --catalogs --xinclude $(1) |	\
    30 xml_validate=xmllint --catalogs --xinclude --postvalid --noout $(1)
    31 	sed -e 's/\(xmlns:xi\|xml:base\)="[^"]*"//g' |	\
       
    32 	xmllint --catalogs --valid --noout - 2>&1 |	\
       
    33 	sed 's/^-:/$(1):/'
       
    34 html_validate=true
    31 html_validate=true
    35 
    32 
    36 all: $(OUTPUT)
    33 all: $(OUTPUT)
    37 
    34 
    38 #poetry: $(call targets,poetry) $(SRC_DEPS)
    35 #poetry: $(call targets,poetry) $(SRC_DEPS)
    43 
    40 
    44 install: $(OUTPUT)
    41 install: $(OUTPUT)
    45 	[ -d $(INSTALL_DIR) ] || mkdir -p $(INSTALL_DIR)
    42 	[ -d $(INSTALL_DIR) ] || mkdir -p $(INSTALL_DIR)
    46 	cp -a $(OUTPUT)* $(INSTALL_DIR)
    43 	cp -a $(OUTPUT)* $(INSTALL_DIR)
    47 
    44 
    48 validate:
    45 validate: $(SRCS) $(addsuffix -validate,$(SRC_DEPS))
    49 	$(call xml_validate,$(SRCS))
    46 	$(call xml_validate,$<)
       
    47 
       
    48 %-validate: %
       
    49 	$(call xml_validate,$<)
    50 
    50 
    51 clean:
    51 clean:
    52 	rm -f *~ *.fo
    52 	rm -f *~ *.fo
    53 
    53 
    54 purge: clean
    54 purge: clean