-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·75 lines (63 loc) · 2.3 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#Anthony M. Agelastos, 2016/08/24. Revised for HPCMASPA by Sara Walton 07/05/2022
# Revised for CUG2021 by Jim Brandt 06-16-2021
#amagela's Standard GNU Make Makefile, version 2.0
#This Makefile builds: LongAbstract
#
# THE FOLLOWING TARGETS ARE GENERALLY AVAILABLE
# all: Performs all tasks to clean, build, and install the application and documentation
# spellcheckaspell: This runs a spell checker on all TeX files within doc/
# spellcheckhunspell: This runs a spell checker on all TeX files within doc/
# clean: Delete the files generated from building the examples and documentation
# purge: This does clean and also removes the resultant document
# tar: Create a stamped, Gzip-compressed tarball within directory tar
###### USER SETTINGS ######
# TITLE: Name of resultant documentation
TITLE?=Darshan-LDMS
###### COMPILER SETTINGS (ONLY ADMINS BELOW) ######
#COMPILERS/LINKERS
# MAKPDF:=latexmk -lualatex
MAKPDF:=latexmk -pdf
CLEAN:=latexmk -c
PURGE:=latexmk -C
SPELLCHECKTARGET:=spellcheckaspell
ifeq ($(wildcard /usr/bin/hunspell),/usr/bin/hunspell)
SPELLCHECKTARGET:=spellcheckhunspell
endif
ifeq ($(wildcard /opt/local/bin/hunspell),/opt/local/bin/hunspell)
SPELLCHECKTARGET:=spellcheckhunspell
endif
#EXTRA VARS
LOGAPPEND:=$(shell date '+%Y%m%d_%H%M%S')
###### TARGETS ######
default: initpurge pdf clean
pdf: $(TITLE).pdf
$(TITLE).pdf: $(TITLE).tex
%.pdf: %.tex
# $(MAKPDF) >$*.build.log 2>&1 $<
$(MAKPDF) $<
.PHONY: clean
clean:
$(CLEAN)
-find . -type f -name "*.bbl" -exec rm -f '{}' \;
-find . -type f -name "*~" -exec rm -f '{}' \;
-find . -type f -name "*.swp" -exec rm -f '{}' \;
-find . -type f -name ".*~" -exec rm -f '{}' \;
-find . -type f -name ".*.swp" -exec rm -f '{}' \;
.PHONY: initpurge
initpurge:
-rm -f $(TITLE).pdf
.PHONY: purge
purge: clean
$(PURGE)
.PHONY: spellcheckaspell
spellcheckaspell:
-find . -type f -name "[0-9]*.tex" -exec aspell -c '{}' --lang=en_US --mode=tex \;
.PHONY: spellcheckhunspell
spellcheckhunspell:
-find . -type f -name "[0-9]*.tex" -exec hunspell -t -d en_US '{}' \;
.PHONY: spellcheck
spellcheck: $(SPELLCHECKTARGET)
.PHONY: tar
tar: clean
mkdir -p tar
tar -czhf tar/$(TITLE)_$(LOGAPPEND).tgz $(TITLE).pdf Makefile *.tex *.bib figs