mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-24 10:12:19 -05:00
remove PDF build steps from Makefile (fixes #121)
This commit is contained in:
parent
d361e430a7
commit
59e523a57c
41
Makefile
41
Makefile
@ -14,57 +14,38 @@ help:
|
|||||||
@echo 'XEP makefile targets:'
|
@echo 'XEP makefile targets:'
|
||||||
@echo ' '
|
@echo ' '
|
||||||
@echo ' help - (this message)'
|
@echo ' help - (this message)'
|
||||||
@echo ' all - build all XEPs (html and pdfs)'
|
@echo ' all - build all XEPs (same as make html)'
|
||||||
@echo ' pdf - build all XEPs'
|
|
||||||
@echo ' html - build all XEPs'
|
@echo ' html - build all XEPs'
|
||||||
@echo ' clean - recursively unlink the build tree'
|
@echo ' clean - recursively unlink the build tree'
|
||||||
@echo ' preview - builds html whenever an XEP changes (requires inotify-tools)'
|
@echo ' preview - builds html whenever an XEP changes (requires inotify-tools)'
|
||||||
@echo ' xep-xxxx - build xep-xxxx.html and xep-xxxx.pdf'
|
@echo ' xep-xxxx - build xep-xxxx.html'
|
||||||
@echo ' xep-xxxx.html - build xep-xxxx.html'
|
@echo ' xep-xxxx.html - build xep-xxxx.html'
|
||||||
@echo ' xep-xxxx.pdf - build xep-xxxx.html'
|
|
||||||
@echo ' '
|
@echo ' '
|
||||||
@echo 'Output directory: "$(OUTDIR)/"'
|
@echo 'Output directory: "$(OUTDIR)/"'
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: html pdfs
|
all: html
|
||||||
|
|
||||||
.PHONY: html
|
.PHONY: html
|
||||||
html: $(patsubst %.xml, $(OUTDIR)/%.html, $(wildcard *.xml))
|
html: $(patsubst %.xml, $(OUTDIR)/%.html, $(wildcard *.xml))
|
||||||
|
|
||||||
.PHONY: pdf
|
|
||||||
pdf: $(patsubst %.xml, $(OUTDIR)/%.pdf, $(wildcard *.xml))
|
|
||||||
|
|
||||||
.PHONY: xep-%
|
.PHONY: xep-%
|
||||||
xep-%: $(OUTDIR)/xep-%.html $(OUTDIR)/xep-%.pdf ;
|
xep-%: $(OUTDIR)/xep-%.html ;
|
||||||
|
|
||||||
.PHONY: xep-%.html
|
.PHONY: xep-%.html
|
||||||
xep-%.html: $(OUTDIR)/xep-%.html ;
|
xep-%.html: $(OUTDIR)/xep-%.html ;
|
||||||
|
|
||||||
.PHONY: xep-%.pdf
|
.PHONY: dependencies
|
||||||
xep-%.pdf: $(OUTDIR)/xep-%.pdf ;
|
dependencies: $(OUTDIR)/prettify.css $(OUTDIR)/prettify.js $(OUTDIR)/xmpp.css ;
|
||||||
|
|
||||||
$(OUTDIR)/%.html: %.xml $(XMLDEPS)
|
$(OUTDIR)/%.html: %.xml $(XMLDEPS) dependencies
|
||||||
xsltproc --path $(CURDIR) xep.xsl "$<" > "$@" && echo "Finished building $@"
|
xsltproc --path $(CURDIR) xep.xsl "$<" > "$@" && echo "Finished building $@"
|
||||||
|
|
||||||
$(OUTDIR)/%.pdf: %.xml $(TEMPDIR)/%.xml.texml $(TEMPDIR)/%.xml.texml.tex $(TEXMLDEPS)
|
$(OUTDIR)/%.js: %.js
|
||||||
cd $(TEMPDIR); xelatex $(TEMPDIR)/$<.texml.tex
|
cp "$<" "$@"
|
||||||
mv $(TEMPDIR)/$<.texml.pdf $(OUTDIR)/$(patsubst %.xml.pdf,%.pdf,$<.pdf)
|
|
||||||
echo "Finished building $(patsubst %.xml.pdf,%.pdf,$<.pdf)"
|
|
||||||
|
|
||||||
$(TEMPDIR)/%.xml.texml: %.xml $(TEXMLDEPS) $(TEMPDIR)
|
$(OUTDIR)/%.css: %.css
|
||||||
xsltproc -o $(TEMPDIR)/$<.texml xep2texml.xsl "$<"
|
cp "$<" "$@"
|
||||||
|
|
||||||
$(TEMPDIR)/%.xml.texml.tex: $(TEMPDIR)/%.xml.texml $(OUTDIR) $(TEMPDIR)
|
|
||||||
texml -e utf8 $< $<.tex
|
|
||||||
sed -i -e 's|\([\s"]\)\([^"]http\://[^ "]*\)|\1\\path{\2}|g' \
|
|
||||||
-e 's|\\hyperref\[#\([^}]*\)\]|\\hyperref\[\1\]|g' \
|
|
||||||
-e 's|\\pageref{#\([^}]*\)}|\\pageref{\1}|g' $<.tex
|
|
||||||
|
|
||||||
$(RESOURCESDIR)/xmpp-text.pdf: $(RESOURCESDIR)
|
|
||||||
curl -o $@ $(XMPPIMAGESURL)/xmpp-text.pdf
|
|
||||||
|
|
||||||
$(RESOURCESDIR)/xmpp.pdf: $(RESOURCESDIR)
|
|
||||||
curl -o $@ $(XMPPIMAGESURL)/images/xmpp.pdf
|
|
||||||
|
|
||||||
$(TEMPDIR) $(OUTDIR) $(RESOURCESDIR):
|
$(TEMPDIR) $(OUTDIR) $(RESOURCESDIR):
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
Loading…
Reference in New Issue
Block a user