From 0f8437048f18f4cb1dec2b2701e54f1bfbd7bc59 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 17 Apr 2018 13:00:42 +0800 Subject: Makefile: add dist target --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile') 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 -- cgit v1.2.2