mirror of
https://github.com/moparisthebest/xeps
synced 2025-02-16 07:10:15 -05:00
Use TEMPDIR within OUTDIR in Makefile
and some other cleanups: Add XMPPIMAGESURL. Use multiple target rule for "mkdir -p". Use special variables where possible. Remove unnecessary [ -e $FILE ] test in curl recipes.
This commit is contained in:
parent
b2cf8fb102
commit
67beabbbb1
22
Makefile
22
Makefile
@ -1,9 +1,11 @@
|
|||||||
.SILENT:
|
.SILENT:
|
||||||
|
|
||||||
OUTDIR?=build
|
OUTDIR?=build
|
||||||
TEMPDIR?=$(TMPDIR)/xepbuild
|
RESOURCESDIR=$(OUTDIR)/resources
|
||||||
|
TEMPDIR?=$(OUTDIR)/xepbuild
|
||||||
XMLDEPS=xep.xsl xep.xsd xep.ent xep.dtd ref.xsl $(OUTDIR)
|
XMLDEPS=xep.xsl xep.xsd xep.ent xep.dtd ref.xsl $(OUTDIR)
|
||||||
TEXMLDEPS=xep2texml.xsl $(TEMPDIR) $(XMLDEPS) $(TEMPDIR)/xmpp.pdf $(TEMPDIR)/xmpp-text.pdf
|
TEXMLDEPS=xep2texml.xsl $(TEMPDIR) $(XMLDEPS) $(RESOURCESDIR)/xmpp.pdf $(RESOURCESDIR)/xmpp-text.pdf
|
||||||
|
XMPPIMAGESURL=https://xmpp.org/images
|
||||||
|
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
@ -56,19 +58,15 @@ $(TEMPDIR)/%.xml.texml.tex: $(TEMPDIR)/%.xml.texml $(OUTDIR) $(TEMPDIR)
|
|||||||
-e 's|\\hyperref\[#\([^}]*\)\]|\\hyperref\[\1\]|g' \
|
-e 's|\\hyperref\[#\([^}]*\)\]|\\hyperref\[\1\]|g' \
|
||||||
-e 's|\\pageref{#\([^}]*\)}|\\pageref{\1}|g' $<.tex
|
-e 's|\\pageref{#\([^}]*\)}|\\pageref{\1}|g' $<.tex
|
||||||
|
|
||||||
$(TEMPDIR)/xmpp-text.pdf: $(TEMPDIR)
|
$(RESOURCESDIR)/xmpp-text.pdf: $(RESOURCESDIR)
|
||||||
-[ -e $(TEMPDIR)/xmpp-text.pdf ] || curl -o "$(TEMPDIR)/xmpp-text.pdf" https://xmpp.org/images/xmpp-text.pdf
|
curl -o $@ $(XMPPIMAGESURL)/xmpp-text.pdf
|
||||||
|
|
||||||
$(TEMPDIR)/xmpp.pdf: $(TEMPDIR)
|
$(RESOURCESDIR)/xmpp.pdf: $(RESOURCESDIR)
|
||||||
-[ -e $(TEMPDIR)/xmpp.pdf ] || curl -o "$(TEMPDIR)/xmpp.pdf" https://xmpp.org/images/xmpp.pdf
|
curl -o $@ $(XMPPIMAGESURL)/images/xmpp.pdf
|
||||||
|
|
||||||
$(TEMPDIR):
|
$(TEMPDIR) $(OUTDIR) $(RESOURCESDIR):
|
||||||
mkdir -p $(TEMPDIR)
|
mkdir -p $@
|
||||||
|
|
||||||
$(OUTDIR):
|
|
||||||
mkdir -p $(OUTDIR)
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(TEMPDIR)
|
|
||||||
rm -rf $(OUTDIR)
|
rm -rf $(OUTDIR)
|
||||||
|
Loading…
Reference in New Issue
Block a user