-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
62 lines (49 loc) · 1.73 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
59
60
61
DOCTYPE = RTN
DOCNUMBER = 001
DOCNAME = $(DOCTYPE)-$(DOCNUMBER)
tex = $(filter-out $(wildcard *acronyms.tex) , $(wildcard *.tex))
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
export TEXMFHOME ?= lsst-texmf/texmf
# Add aglossary.tex as a dependancy here if you want a glossary
$(DOCNAME).pdf: $(tex) meta.tex local.bib acronyms.tex
latexmk -bibtex -xelatex -f $(DOCNAME)
# makeglossaries $(DOCNAME)
# xelatex $(SRC)
# For glossary uncomment the 2 lines abouve
# Acronym tool allows for selection of acronyms based on tags - you may want more than DM
acronyms.tex: $(tex) myacronyms.txt
$(TEXMFHOME)/../bin/generateAcronyms.py -t "DM" $(tex)
# If you want a glossary you must manually run generateAcronyms.py -gu to put the \gls in your files.
aglossary.tex :$(tex) myacronyms.txt
generateAcronyms.py -g $(tex)
# pick up this form the lsst-texmf/bin
tables: .FORCE
cd tables; makeTablesFromGoogle.py 1RCXFwnVfXgR-WxFO4dfYRZuMX8egz35nABODKANEAUo Team\!A1:J
# milestones from Jira
openMilestones.tex:
( \
cd operations_milestones; \
source venv/bin/activate; \
python opsMiles.py -ls -u ${USER}; \
mv *Milestones.tex .. \
)
.PHONY: clean
clean:
latexmk -c
rm -f $(DOCNAME).bbl
rm -f $(DOCNAME).pdf
rm -f meta.tex
.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' >>$@