-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (44 loc) · 1.39 KB
/
Makefile
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
46
47
48
49
50
51
52
53
54
55
56
57
58
DOCTYPE = DMTR
NAMESPACE = DM
PLAN = LVV-P73
DOCNUMBER = 241
DOCNAME = $(DOCTYPE)-$(DOCNUMBER)
DOCNAMEP = $(DOCNAME)-plan
TEX = $(filter-out $(wildcard *acronyms.tex) , $(wildcard *.tex))
export TEXMFHOME ?= lsst-texmf/texmf
# Version information extracted from git.
GITVERSION := $(shell git log -1 --date=short --pretty=%h)
GITDATE := $(shell git log -1 --date=short --pretty=%ad)
GITSTATUS := $(shell git status --porcelain)
ifneq "$(GITSTATUS)" ""
GITDIRTY = -dirty
endif
all: $(DOCNAME).pdf $(DOCNAMEP).pdf
%.pdf: %.tex meta.tex acronyms.tex
xelatex $<
bibtex $(basename $<)
xelatex $<
xelatex $<
xelatex $<
.FORCE:
meta.tex: Makefile .FORCE
rm -f $@
touch $@
printf '%% GENERATED FILE -- edit this in the Makefile\n' >>$@
printf '\\newcommand{\\lsstDocType}{$(DOCTYPE)}\n' >>$@
printf '\\newcommand{\\lsstDocNum}{$(DOCNUMBER)}\n' >>$@
printf '\\newcommand{\\vcsRevision}{$(GITVERSION)$(GITDIRTY)}\n' >>$@
printf '\\newcommand{\\vcsDate}{$(GITDATE)}\n' >>$@
generate: .FORCE
docsteady --namespace $(NAMESPACE) generate-tpr --includeall True $(PLAN) $(DOCNAME).tex
#Traditional acronyms are better in this document
acronyms.tex : ${TEX} myacronyms.txt skipacronyms.txt
echo ${TEXMFHOME}
python3 ${TEXMFHOME}/../bin/generateAcronyms.py -t "DM" $(TEX)
myacronyms.txt :
touch myacronyms.txt
skipacronyms.txt :
touch skipacronyms.txt
clean :
latexmk -c
rm *.pdf *.nav *.bbl *.xdv *.snm