Debian Codegraph @

texmf-dist/doc/latex/matc3/Makefile

raw
1 # Makefile per il pacchetto matc3
2 # (c) 2013 Dimitrios Vrettos - [email protected]
3 # v1.1 -- 2013/04/06
4
5 NAME = matc3
6 INS = $(NAME).ins
7 DTX = $(NAME).dtx
8 IND = $(NAME).ind
9 DOC = $(NAME).pdf
10 IDX = $(NAME).idx
11 GLS = $(NAME).gls
12 GLO = $(NAME).glo
13
14 PDFLATEX = pdflatex --shell-escape
15 MAKEINDEX = makeindex -s gind.ist -o $(IND) $(IDX) && \
16 makeindex -s gglo.ist -o $(GLS) $(GLO)
17
18 FILE_CLEAN = *.aux *.idx *.ilg *.ind *.log *.glo *.gls *.toc *.log *~* *backup
19
20 VERSION = 1_0_1
21 TAR = $(NAME)-$(VERSION).tar.gz
22 ZIP = $(NAME)-$(VERSION).zip
23
24 # Cambiare la variabile TEXDIR se non si vuole installare nell'albero personale
25 TEXDIR = `kpsewhich --expand-path='$$TEXMFHOME'`
26 INSDIR = $(TEXDIR)/tex/latex/$(NAME)
27 DOCDIR = $(TEXDIR)/doc/latex/$(NAME)
28 SRCDIR = $(TEXDIR)/source/latex/$(NAME)
29
30 .SILENT: clean x-clean dist-tar dist-zip directories help install uninstall
31
32 help:
33 echo ''
34 echo 'Makefile targets:'
35 echo ''
36 echo " help - Questo messaggio"
37 echo ' install - Compila il pacchetto e la documentazione e poi li installa'
38 echo ' uninstall - Disinstallazione completa'
39 echo ' pdf - Crea solo la documentazione senza installarla'
40 echo ' clean - Rimuove i file intermediari'
41 echo ' x-clean - Rimuove i file intermediari e il pacchetto derivato'
42 echo ' dist-tar - Crea una distibuzione (.tar.gz) del pacchetto'
43 echo ' dist-zip - Crea una distibuzione (.zip) del pacchetto'
44 echo ''
45
46 ins: $(INS)
47 latex $<
48
49 pdf: $(DTX)
50 $(PDFLATEX) $<
51 $(MAKEINDEX)
52 $(PDFLATEX) $<
53 $(PDFLATEX) $<
54 $(PDFLATEX) $<
55
56 clean:
57 rm -f $(FILE_CLEAN)
58
59 x-clean:
60 rm -f $(FILE_CLEAN)
61 rm -f $(NAME).sty
62
63
64 dist-tar: x-clean
65 rm -f $(TAR)
66 tar --exclude '*.zip' -zcvf $(TAR) *
67
68 dist-zip: x-clean
69 rm -f $(ZIP)
70 zip -r $(ZIP) . -x '*.tar.gz'
71
72 directories:
73 if [ ! -d $(INSDIR) ]; then \
74 mkdir -p $(INSDIR); \
75 fi
76 if [ ! -d $(DOCDIR) ]; then \
77 mkdir -p $(DOCDIR); \
78 fi
79 if [ ! -d $(SRCDIR) ] ; then \
80 mkdir -p $(SRCDIR) ; \
81 fi
82
83
84 install: ins pdf directories
85 install -m644 $(NAME).sty $(INSDIR)
86 install -m644 $(DOC) README $(DOCDIR)
87 install -m644 $(INS) $(DTX) Makefile $(SRCDIR)
88 texhash
89
90 uninstall:
91 if [ -d $(INSDIR) ] ; then \
92 rm -rf $(INSDIR); \
93 fi
94 if [ -d $(DOCDIR) ] ; then \
95 rm -rf $(DOCDIR); \
96 fi
97 if [ -d $(SRCDIR) ] ; then \
98 rm -rf $(SRCDIR) ; \
99 fi
100 texhash
101
102 # End of Makefile