Skip to content
Snippets Groups Projects
Commit 4edee50d authored by nimrod's avatar nimrod
Browse files

Allow building to a specific directory.

parent 951262d5
No related branches found
No related tags found
No related merge requests found
...@@ -10,19 +10,24 @@ RESUME = resume.rst ...@@ -10,19 +10,24 @@ RESUME = resume.rst
# Output paper size # Output paper size
PAPERSIZE = A4 PAPERSIZE = A4
OUTPUTS = resume.html resume.pdf resume.docx resume.odt # Allow saving files in a different directory
DESTDIR ?= .
OUTPUTS = $(DESTDIR)/resume.html $(DESTDIR)/resume.pdf $(DESTDIR)/resume.docx $(DESTDIR)/resume.odt
.PHONY: all .PHONY: all
all: $(OUTPUTS) all: $(OUTPUTS)
resume.html: $(RESUME) $(DESTDIR)/resume.html: $(RESUME)
mkdir -p $(DESTDIR)
pandoc --standalone \ pandoc --standalone \
--to html5 \ --to html5 \
--email-obfuscation none \ --email-obfuscation none \
--output $@ \ --output $@ \
$< $<
resume.pdf: $(RESUME) $(DESTDIR)/resume.pdf: $(RESUME)
mkdir -p $(DESTDIR)
pandoc --pdf-engine xelatex \ pandoc --pdf-engine xelatex \
--metadata 'mainfont=SILEOT.ttf' \ --metadata 'mainfont=SILEOT.ttf' \
--variable 'papersize=$(PAPERSIZE)' \ --variable 'papersize=$(PAPERSIZE)' \
...@@ -30,10 +35,12 @@ resume.pdf: $(RESUME) ...@@ -30,10 +35,12 @@ resume.pdf: $(RESUME)
--output $@ \ --output $@ \
$< $<
resume.docx: $(RESUME) $(DESTDIR)/resume.docx: $(RESUME)
mkdir -p $(DESTDIR)
pandoc --variable 'papersize=$(PAPERSIZE)' --output $@ $< pandoc --variable 'papersize=$(PAPERSIZE)' --output $@ $<
resume.odt: $(RESUME) $(DESTDIR)/resume.odt: $(RESUME)
mkdir -p $(DESTDIR)
pandoc --variable 'papersize=$(PAPERSIZE)' --output $@ $< pandoc --variable 'papersize=$(PAPERSIZE)' --output $@ $<
.PHONY: clean .PHONY: clean
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment