From 16700d9f305e700fbaab4af7bf4e7d5bba8e2df1 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 15 Feb 2017 21:29:09 +0000 Subject: [PATCH] Makefile: Check for trailing whitespaces when building a XEP. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 69ac69ac..170c2cd6 100644 --- a/Makefile +++ b/Makefile @@ -59,6 +59,8 @@ $(REFSDIR)/reference.XSF.XEP-%.xml: xep-%.xml $(XMLDEPS) ref.xsl $(REFSDIR) xsltproc --path $(CURDIR) ref.xsl "$<" > "$@" && echo "Finished building $@" $(OUTDIR)/%.html: %.xml $(XMLDEPS) $(HTMLDEPS) + ! grep -nr \\s$$ $@ + xmllint --nonet --noout --noent --loaddtd --valid "$<" # Check for non-data URIs ! xmllint --nonet --noout --noent --loaddtd --xpath "//img/@src[not(starts-with(., 'data:'))]" $< 2>/dev/null && true @@ -70,6 +72,8 @@ $(OUTDIR)/xmpp.pdf $(OUTDIR)/xmpp-text.pdf: $(OUTDIR) cp "resources/$(notdir $@)" "$@" $(OUTDIR)/%.pdf: %.xml $(XMLDEPS) $(TEXMLDEPS) + ! grep -nr \\s$$ $@ + xmllint --nonet --noout --noent --loaddtd --valid "$<" # Check for non-data URIs ! xmllint --nonet --noout --noent --loaddtd --xpath "//img/@src[not(starts-with(., 'data:'))]" $< 2>/dev/null && true