-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
47 lines (36 loc) · 1.96 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
.PHONY: all clean dist release
VERSION1:=$(shell grep '%<fancyhdr|extramarks> *\[20' fancyhdr.dtx | sed 's/.*\[//' \
| awk '{print $$2 " " $$1}')
VERSION0:=$(shell grep '%<fancyheadings> *\[20' fancyhdr.dtx | sed 's/.*\[//' \
| awk '{print $$2 " " $$1}')
VERSION4:=$(shell grep '%<extramarks-v4> *\[20' fancyhdr.dtx | sed 's/.*\[//' \
| awk '{print $$2 " " $$1}')
VERSION:=$(shell echo "$(VERSION1)" | awk '{print $$1}' | sed 's/v//')
all: fancyhdr.sty extramarks.sty extramarks-v4.sty fancyheadings.sty fancyhdr.pdf
extramarks.sty fancyhdr.sty extramarks-v4.sty fancyheadings.sty: fancyhdr.dtx fancyhdr.ins
tex fancyhdr.ins
fancyhdr.pdf: fancyhdr.dtx fancyhdr.sty extramarks.sty extramarks-v4.sty fancyheadings.sty
rm -f fancyhdr.ind
latexmk fancyhdr.dtx
clean:
rm -f *.aux *.log *.idx *.ind *.ilg *.fdb_latexmk *.fls *.glo *.gls *~ *.rel *.toc
rm -f *.synctex.gz *.bbl *.blg *.out fancyhdr.pdf
rm -f fancyhdr.sty extramarks*.sty fancyheadings.sty
README: README.TPL fancyhdr.dtx
sed -e "s@<V1>@$(VERSION1)@g" -e "s@<V0>@$(VERSION0)@g" -e "s@<V4>@$(VERSION4)@g" \
-e "s@<V>@$(VERSION)@g" README.TPL > README
install:
cp fancyhdr.sty extramarks*.sty ~/Library/texmf/tex/latex
# Make dist to make fancyhdr.zip for submission to CTAN
dist: fancyhdr.zip
distfiles = README fancyhdr.dtx fancyhdr.pdf fancyhdr.ins
fancyhdr.zip: $(distfiles)
cd .. ; zip -9 fancyhdr/fancyhdr.zip $(addprefix fancyhdr/,$(distfiles))
# Make release for release files (like a github release)
release: fancyhdr-$(VERSION).zip fancyhdr-dist-$(VERSION).zip
releasefiles = README fancyhdr.sty fancyheadings.sty extramarks.sty extramarks-v4.sty fancyhdr.pdf
fancyhdr-dist-$(VERSION).zip: $(releasefiles)
cd .. ; zip -9 fancyhdr/fancyhdr-dist-$(VERSION).zip $(addprefix fancyhdr/,$(releasefiles))
sourcefiles = README README.TPL fancyhdr.dtx fancyhdr.ins Makefile latexmkrc
fancyhdr-$(VERSION).zip: $(sourcefiles)
cd .. ; zip -9 fancyhdr/fancyhdr-$(VERSION).zip $(addprefix fancyhdr/,$(sourcefiles))