| 1 |
.PHONY: lint clean |
| 2 |
|
| 3 |
PKG=ensps-colorscheme |
| 4 |
DOC=$(PKG)-doc.pdf |
| 5 |
# The version of the package is obtained using git decribe, |
| 6 |
# and if it fails we use the value v0.0.0 as a default. |
| 7 |
VER=$(shell git describe --tags --always --dirty|| echo "v0.0.0") |
| 8 |
|
| 9 |
$(PKG).sty: $(PKG).ins |
| 10 |
latex $(PKG).ins |
| 11 |
|
| 12 |
# We need to use the classical several |
| 13 |
# pass compilation to get everything right |
| 14 |
# gind.ist is a specific style for the index |
| 15 |
# that is compatible with dtx files. |
| 16 |
# https://tex.stackexchange.com/questions/84870/index-completely-messed-up-in-dtx-file |
| 17 |
$(PKG)-doc.pdf: $(PKG).dtx $(PKG).sty |
| 18 |
pdflatex $(PKG).dtx |
| 19 |
makeindex -s gglo.ist -o $(PKG).gls $(PKG).glo |
| 20 |
makeindex -s gind.ist $(PKG).idx |
| 21 |
pdflatex $(PKG).dtx |
| 22 |
mv $(PKG).pdf $(PKG)-doc.pdf |
| 23 |
|
| 24 |
install: |
| 25 |
cp $(PKG).sty ~/texmf/tex/latex/$(PKG). |
| 26 |
cp $(PKG)-doc.pdf ~/texmf/doc/latex/$(PKG). |
| 27 |
|
| 28 |
$(PKG).zip: $(PKG).sty $(PKG)-doc.pdf |
| 29 |
mkdir -p $(PKG) |
| 30 |
cp Makefile $(PKG)/Makefile |
| 31 |
cp LICENSE $(PKG)/LICENSE |
| 32 |
cp README.md $(PKG)/README.md |
| 33 |
cp $(PKG)-doc.pdf $(PKG)/$(PKG)-doc.pdf |
| 34 |
cp $(PKG).dtx $(PKG)/$(PKG).dtx |
| 35 |
cp $(PKG).ins $(PKG)/$(PKG).ins |
| 36 |
zip -r $(PKG).zip $(PKG) |
| 37 |
|
| 38 |
|
| 39 |
lint: $(PKG).sty |
| 40 |
chktex $(PKG).dtx |
| 41 |
chktex $(PKG).sty |
| 42 |
|
| 43 |
clean: |
| 44 |
rm -rf $(PKG).pdf \ |
| 45 |
$(PKG).aux \ |
| 46 |
$(PKG).dvi \ |
| 47 |
$(PKG).glo \ |
| 48 |
$(PKG).hd \ |
| 49 |
$(PKG).idx \ |
| 50 |
$(PKG).log \ |
| 51 |
$(PKG).out \ |
| 52 |
$(PKG).pdf \ |
| 53 |
$(PKG).sty \ |
| 54 |
$(PKG).zip |