diff options
author | Aaron LI <aly@aaronly.me> | 2018-04-17 13:00:42 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-04-17 13:00:42 +0800 |
commit | 0f8437048f18f4cb1dec2b2701e54f1bfbd7bc59 (patch) | |
tree | 3b7b24ba76047f256c196ff3d9e633589cd952d3 | |
parent | 38be66305830364ef8a17f590857ddc56ea3bc12 (diff) | |
download | resume-0f8437048f18f4cb1dec2b2701e54f1bfbd7bc59.tar.bz2 |
Makefile: add dist target
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 11 |
2 files changed, 12 insertions, 1 deletions
@@ -7,3 +7,5 @@ auto/ photos/ photo.* submitted/ +dist/ +*.tar.bz2 @@ -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 |