blob: 28af502bde1d8c1d9b94edbd9d21df41c0631b16 (
plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
# Makefile per il pacchetto matC3
# (c) 2013 Dimitrios Vrettos - d.vrettos@gmail.com
# v1.0 -- 2013/04/05
NAME = matC3
INS = $(NAME).ins
DTX = $(NAME).dtx
IND = $(NAME).ind
DOC = $(NAME).pdf
IDX = $(NAME).idx
GLS = $(NAME).gls
GLO = $(NAME).glo
PDFLATEX = pdflatex --shell-escape
MAKEINDEX = makeindex -s gind.ist -o $(IND) $(IDX) && \
makeindex -s gglo.ist -o $(GLS) $(GLO)
FILE_CLEAN = *.aux *.idx *.ilg *.ind *.log *.glo *.gls *.toc *.log *~* *backup
VERSION = 1_0
TAR = $(NAME)-$(VERSION).tar.gz
ZIP = $(NAME)-$(VERSION).zip
TEXMFHOME = `kpsewhich --expand-path='$$TEXMFHOME'`
INSDIR = $(TEXMFHOME)/tex/latex/$(NAME)
DOCDIR = $(TEXMFHOME)/doc/latex/$(NAME)
SRCDIR = $(TEXMFHOME)/source/latex/$(NAME)
.SILENT: clean dist-tar dist-zip directories help quick-install install uninstall
help:
echo ''
echo 'Makefile targets:'
echo ''
echo " help - Questo messaggio"
echo ' quick-install - Installa pacchetto, documentazione e sorgenti senza compilarli'
echo ' install - Prima compila pacchetto, documentazione e sorgenti e poi li installa'
echo ' uninstall - Disinstallazione completa'
echo ' pdf - Crea solo la documentazione senza installarla'
echo ' clean - Rimuove i file intermediari'
echo ' dist-tar - Crea una distibuzione (.tar.gz) del pacchetto'
echo ' dist-zip - Crea una distibuzione (.zip) del pacchetto'
echo ''
ins: $(INS)
latex $<
pdf: $(DTX)
$(PDFLATEX) $<
$(MAKEINDEX)
$(PDFLATEX) $<
$(PDFLATEX) $<
$(PDFLATEX) $<
clean:
rm -f $(FILE_CLEAN)
dist-tar: clean
rm -f $(TAR)
tar --exclude '*.zip' -zcvf $(TAR) *
dist-zip: clean
rm -f $(ZIP)
zip -r $(ZIP) . -x '*.tar.gz'
all: ins pdf clean
directories:
if [ ! -d $(INSDIR) ]; then \
mkdir -p $(INSDIR); \
fi
if [ ! -d $(DOCDIR) ]; then \
mkdir -p $(DOCDIR); \
fi
if [ ! -d $(SRCDIR) ] ; then \
mkdir -p $(SRCDIR) ; \
fi
quick-install: directories
install -m644 $(NAME).sty $(INSDIR)
install -m644 $(DOC) README $(DOCDIR)
install -m644 $(INS) $(DTX) Makefile $(SRCDIR)
texhash
install: all directories
install -m644 $(NAME).sty $(INSDIR)
install -m644 $(DOC) README $(DOCDIR)
install -m644 $(INS) $(DTX) Makefile $(SRCDIR)
texhash
uninstall:
if [ -d $(INSDIR) ] ; then \
rm -rf $(INSDIR); \
fi
if [ -d $(DOCDIR) ] ; then \
rm -rf $(DOCDIR); \
fi
if [ -d $(SRCDIR) ] ; then \
rm -rf $(SRCDIR) ; \
fi
texhash
# End of Makefile
|