-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (34 loc) · 1.13 KB
/
Makefile
File metadata and controls
45 lines (34 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
ID:= halo-eor
SRCS:= main.tex
REFS:= main.bbl main.bib
FIGURES:= $(wildcard figures/*.pdf)
TEMPLATE:= aastex/aastex62.cls aastex/aasjournal-links.bst
TEXINPUTS:= .:aastex:revtex:texmf:$(TEXINPUTS)
BSTINPUTS:= .:aastex:revtex:texmf:$(BSTINPUTS)
DATE:= $(shell date +'%Y%m%d')
default: main.pdf
report: main.pdf $(SRCS)
@test -d "reports" || mkdir reports
cp main.pdf reports/$(ID)-$(DATE).pdf
cp main.tex reports/$(ID)-$(DATE).tex
main.pdf: $(SRCS) $(TEMPLATE) $(FIGURES)
env TEXINPUTS=$(TEXINPUTS) BSTINPUTS=$(BSTINPUTS) latexmk -xelatex $<
aaspack: $(SRCS) $(TEMPLATE) $(FIGURES)
mkdir $@.$(DATE)
@for f in $(SRCS) $(REFS) $(TEMPLATE) $(FIGURES); do \
cp -v $$f $@.$(DATE)/; \
done
tar -cvf $@.$(DATE).tar -C $@.$(DATE)/ .
rm -r $@.$(DATE)
cp main.pdf $@.$(DATE).pdf
clean:
latexmk -c main.tex
touch main.tex
cleanall:
latexmk -C main.tex
help:
@echo "default - compile the paper PDF file (main.pdf)"
@echo "aaspack - pack the necessary files and figures for AAS submission"
@echo "clean - clean the temporary files"
@echo "cleanall - clean temporary files and the output PDF file"
.PHONY: report clean cleanall help