-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
49 lines (36 loc) · 1.17 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
# Rolf Niepraschk, 2024-01-04, [email protected]
.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps
MAIN = overpic
PDFLATEX = pdflatex
TEX = tex
LATEX = latex
VERSION = $(shell awk '/ProvidesPackage/ {print $$2}' $(MAIN).dtx)
DIST_DIR = $(MAIN)
DIST_FILES = README.md README.de.md $(MAIN).pdf $(MAIN).dtx $(MAIN).ins
ARCHNAME = $(MAIN)-$(VERSION).zip
all : $(MAIN).sty
$(MAIN).sty : $(MAIN).dtx
$(TEX) $(basename $<).ins
$(MAIN)-readme.pdf $(MAIN)-readme-de.pdf : $(MAIN)-readme.tex $(MAIN).sty
$(PDFLATEX) $<
$(MAIN).pdf : $(MAIN).dtx
if ! test -f $(basename $<).glo ; then touch $(basename $<).glo; fi
if ! test -f $(basename $<).idx ; then touch $(basename $<).idx; fi
makeindex -s gglo.ist -t $(basename $<).glg -o $(basename $<).gls \
$(basename $<).glo
makeindex -s gind.ist -t $(basename $<).ilg -o $(basename $<).ind \
$(basename $<).idx
$(PDFLATEX) $<
$(PDFLATEX) $<
dist : $(DIST_FILES)
rm -rf $(DIST_DIR) $(ARCHNAME)
mkdir -p $(DIST_DIR)
cp -p $+ $(DIST_DIR)
zip $(ARCHNAME) -r $(DIST_DIR)
rm -rf $(DIST_DIR)
clean :
$(RM) *.aux *.log *.glg *.glo *.gls *.idx *.ilg *.ind *.toc
veryclean : clean
$(RM) $(MAIN).pdf $(MAIN).sty $(ARCHNAME)
debug :
@echo $(ARCHNAME)