From 2384f16c57011f1cae60bf6a37e1e0e400c40407 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Fri, 13 Jan 2017 00:33:28 -0600 Subject: [PATCH] Remove .SECONDARY makefile hack And eliminate the buggy implicit rule in the process --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 71a49691..69ac69ac 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,4 @@ .SILENT: -.SECONDARY: OUTDIR?=build REFSDIR?=$(OUTDIR)/refs @@ -7,7 +6,9 @@ EXAMPLESDIR?=$(OUTDIR)/examples XMLDEPS=xep.xsd xep.ent xep.dtd ref.xsl $(OUTDIR) TEXMLDEPS=xep2texml.xsl $(OUTDIR)/xmpp.pdf $(OUTDIR)/xmpp-text.pdf XEPDIRS=. inbox -HTMLDEPS=xep.xsl $(OUTDIR)/prettify.css $(OUTDIR)/prettify.js $(OUTDIR)/xmpp.css +HTMLDEPS=xep.xsl $(CSSTARGETS) $(JSTARGETS) +CSSTARGETS=$(OUTDIR)/xmpp.css $(OUTDIR)/prettify.css +JSTARGETS=$(OUTDIR)/prettify.js .PHONY: help @@ -80,11 +81,11 @@ $(OUTDIR)/%.pdf: %.xml $(XMLDEPS) $(TEXMLDEPS) -e 's|\\pageref{#\([^}]*\)}|\\pageref{\1}|g' "$(@:.pdf=.tex)" cd $(OUTDIR); xelatex -interaction=batchmode -no-shell-escape "$(notdir $(basename $@)).tex" && echo "Finished building $@" -$(OUTDIR)/%.js: %.js $(OUTDIR) - cp "$<" "$@" +$(JSTARGETS): $(OUTDIR) + cp "$(notdir $@)" "$@" -$(OUTDIR)/%.css: %.css $(OUTDIR) - cp "$<" "$@" +$(CSSTARGETS): $(OUTDIR) + cp "$(notdir $@)" "$@" $(EXAMPLESDIR) $(REFSDIR) $(OUTDIR): mkdir -p "$@"