-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (49 loc) · 1.4 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# makefile per geometria.tex
#
# Copyright (c) 2015 Daniele Masini - d.masini.it@gmail.com
# v1.0
NAME = geometria
SHORT_NAME = geometria_clr
TEX = $(NAME).tex
PDF = $(NAME).pdf
PDF_DEF = $(NAME)-def.pdf
PDFLATEX = pdflatex --shell-escape
FILE_CLEAN = *.aux *.gnuplot *.table *.toc *.log *~ *backup
ROOT = $(shell basename $$(pwd))
DIRS = chap* lbr
CLEAN_DIRS= $(DIRS:%=clean-%)
DATE = $(shell date "+%Y%m%d")
TAR= $(SHORT_NAME)-$(DATE).tar.gz
ZIP= $(SHORT_NAME)-$(DATE).zip
help:
@echo ''
@echo 'Geometria Razionale - Makefile targets'
@echo ''
@echo ' help - Questo messaggio'
@echo ' pdf - Crea il file pdf'
@echo ' clean - Rimuove tutti i file ausiliari'
@echo ' clean-dist - Rimuove tutti i file prodotti'
@echo ' dist-tar - Crea una distribuzione (tar.gz) del codice sorgente, esclundendo il file pdf'
@echo ' dist-zip - Crea una distribuzione (zip) del codice sorgente, esclundendo il file pdf'
@echo ''
pdf: $(TEX)
$(PDFLATEX) $<
$(PDFLATEX) $<
mv -f $(PDF) $(PDF_DEF)
clean: $(CLEAN_DIRS)
$(CLEAN_DIRS):
@for i in $(FILE_CLEAN); \
do \
find ./ -type f -name "$$i" -delete ; \
done
clean-dist: clean
rm -f $(PDF_DEF)
rm -f *.tar.gz
rm -f *.zip
dist-zip: clean
rm -f $(ZIP)
zip -r $(ZIP) . -x '$(PDF)' -x '*.zip' -x '*.tar.gz'
dist-tar: clean
rm -f $(TAR)
tar -czvf $(TAR) --exclude $(PDF_DEF) --exclude *.tar.gz --exclude *.zip *
# END OF MAKEFILE