-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·88 lines (86 loc) · 1.9 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#
#
# Simple Makefile
# * compile latex
# * bibliography management
#
#
##############################################################
#
#
# @category Latex Makefile
# @package texlive-full -yep!-
# @author Anon - Sergio Casanova - David Gueguen
# @copyright 2016 bitwise.com - choucroutage.com
# @license Attribution 4.0 International
# @version 1.1
# @since 1.0
# @deprecated not yet
# @link not link yet
# @see for more ftp://ftp.fau.de/ctan/support/latex-make/latex-make.pdf
#
#
##############################################################
#
#
# pdf type
PDF_TYPE = pdflatex -file-line-error -halt-on-error
#
# output name
NAME_REPORT = STATeOfTHeARtSmardCardsCryptology
FILE_REPORT = $(NAME_REPORT).pdf
#
# sub-folder structure
DIR_TMP = tmp
DIR_TEX = tex
DIR_IMG = images
#
# list temp files
TMP_FILES = $(NAME_REPORT).bbl \
$(NAME_REPORT).blg \
$(NAME_REPORT).idx \
$(NAME_REPORT).log \
$(NAME_REPORT).out \
$(NAME_REPORT).toc \
$(NAME_REPORT).aux \
$(NAME_REPORT).brf
# bibliographie.bib.bak
#
# main tex file
TEX_FILE = $(NAME_REPORT).tex
AUX_FILE = $(NAME_REPORT).aux
#
# generic action
all: Makefile setup compile clean
debug:
echo $(TEX_FILE)
echo $(AUX_FILE)
#
# triple latex compilation -working bug weird aux naming!!-
compile: Makefile
$(PDF_TYPE) $(TEX_FILE)
bibtex $(AUX_FILE)
$(PDF_TYPE) $(TEX_FILE)
bibtex $(AUX_FILE)
$(PDF_TYPE) $(TEX_FILE)
mv $(TMP_FILES) $(DIR_TMP)/
# show finish
echo "compilation done"
#
# create tmp if needed
setup:
@if [ -d $(DIR_TMP) ];\
then \
echo "Sorry, $(DIR_TMP) is present";\
else\
echo "S$(DIR_TMP) does not exist, creating";\
mkdir -p $(DIR_TMP);\
fi
#
# suppress temp files / tmp folder
clean:
# clean
rm -f $(DIR_TMP)/*
rm -r $(DIR_TMP)
# show finish
echo "cleaning done";