aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-04-17 13:00:42 +0800
committerAaron LI <aly@aaronly.me>2018-04-17 13:00:42 +0800
commit0f8437048f18f4cb1dec2b2701e54f1bfbd7bc59 (patch)
tree3b7b24ba76047f256c196ff3d9e633589cd952d3 /Makefile
parent38be66305830364ef8a17f590857ddc56ea3bc12 (diff)
downloadresume-0f8437048f18f4cb1dec2b2701e54f1bfbd7bc59.tar.bz2
Makefile: add dist target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 93b914e..dbb5825 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,9 @@ DEPS:= resume.cls fontawesome.sty
SRCS:= resume-zh.tex resume-en.tex
PDFS:= $(SRCS:%.tex=%.pdf)
+DATE= $(shell date +%Y%m%d)
+DISTDIR= resume.$(DATE)
+
all: $(PDFS)
resume-zh.pdf: resume-zh.tex $(DEPS)
@@ -17,6 +20,12 @@ resume-zh.pdf: resume-zh.tex $(DEPS)
resume-en.pdf: resume-en.tex $(DEPS)
latexmk -xelatex $<
+dist: all
+ mkdir $(DISTDIR)
+ cp Makefile $(DEPS) $(SRCS) $(PDFS) $(DISTDIR)/
+ tar -cjf $(DISTDIR).tar.bz2 $(DISTDIR)/
+ rm -r $(DISTDIR)
+
clean:
for f in $(SRCS); do \
latexmk -c $$f; \
@@ -28,7 +37,7 @@ cleanall:
latexmk -C $$f; \
done
-.PHONY: clean cleanall
+.PHONY: dist clean cleanall
# One liner to get the value of any makefile variable