-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
96 lines (76 loc) · 3 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
88
89
90
91
92
93
94
95
96
##------------------------------------------------------------------------------------##
##------------------------------------------------------------------------------------##
## Content: Open-Science-Poster LaTeX-Makefile
## Usage: Compile Open-Science-Poster
## Author: Claas-Thido Pfaff
##------------------------------------------------------------------------------------##
##------------------------------------------------------------------------------------##
# Maindocument
DOCUMENT = open_science_poster
# Dependencies maindocument
DEPENDENCIES = $(DOCUMENT).Rnw usr/subdocuments/open_science_poster.* usr/subdocuments/*.Rnw
# Used Programs
KNITR = knit
BIBTEX = biber
PDFLATEX = pdflatex
PACKER= tar -czf
REMOVER = @-rm -r
PRINTER = @-echo
GREPPER = @-grep
COPY = @-cp
PDFVIEWER = okular
DATE = $(shell date +%y%m%d)
OUTPUREDIRECT = > /dev/null 2>&1
# Example and Empty files
SUBDOCFOLDER = subdocuments/
LAYOUT2COLUMN = osp_layout_two_column.Rnw
LAYOUT3COLUMN = osp_layout_three_column.Rnw
LAYOUTFALLENTLEFT = osp_layout_t_fallen_right.Rnw
LAYOUTFALLENTRIGHT = osp_layout_t_fallen_left.Rnw
# Archive document
ARCHNAME = $(DOCUMENT)_$(DATE).tar.gz
ARCHFILES = $(DOCUMENT).pdf $(DOCUMENT).Rnw usr makefile
# Clean up the document folder
CLEANFILES = usr/graphics/dynamic/* usr/cache/* *.xdy *.nav *.snm *tikzDictionary *.idx *.mtc* *.glo *.maf *.ptc *.tikz *.lot *.dpth *.figlist *.dep *.log *.makefile *.out *.map *.tex *.toc *.aux *.tmp *.bbl *.blg *.lof *.acn *.acr *.alg *.glg *.gls *.ilg *.ind *.ist *.slg *.syg *.syi minimal.acn minimal.dvi minimal.ist minimal.syg minimal.synctex.gz *.bcf *.run.xml *-blx.bib
# General rule
all: $(DOCUMENT).pdf
$(DOCUMENT).pdf: $(DEPENDENCIES)
$(KNITR) $(DOCUMENT).Rnw $(DOCUMENT).tex --no-convert
$(PDFLATEX) $(DOCUMENT).tex
$(PDFLATEX) $(DOCUMENT).tex
$(BIBTEX) $(DOCUMENT)
$(PDFLATEX) $(DOCUMENT).tex
# Special rules
showpdf:
$(PDFVIEWER) $(DOCUMENT).pdf &
warnings:
$(PRINTER) "----------------------------------------------------o"
$(PRINTER) "Multiple defined lables!"
$(PRINTER) ""
$(GREPPER) 'multiply defined' $(DOCUMENT).log
$(PRINTER) "----------------------------------------------------o"
$(PRINTER) "Undefined lables!"
$(PRINTER) ""
$(GREPPER) 'undefined' $(DOCUMENT).log
$(PRINTER) "----------------------------------------------------o"
$(PRINTER) "Warnings!"
$(PRINTER) ""
$(GREPPER) 'Warning' $(DOCUMENT).log
$(PRINTER) "----------------------------------------------------o"
$(PRINTER) "Over- and Underfull boxes!"
$(PRINTER) ""
$(GREPPER) 'Overfull' $(DOCUMENT).log
$(GREPPER) 'Underfull' $(DOCUMENT).log
$(PRINTER) "----------------------------------------------------o"
layout2c:
$(COPY) $(SUBDOCFOLDER)$(LAYOUT2COLUMN) $(DOCUMENT).Rnw
layout3c:
$(COPY) $(SUBDOCFOLDER)$(LAYOUT3COLUMN) $(DOCUMENT).Rnw
layouttl:
$(COPY) $(SUBDOCFOLDER)$(LAYOUTFALLENTLEFT) $(DOCUMENT).Rnw
layouttr:
$(COPY) $(SUBDOCFOLDER)$(LAYOUTFALLENTRIGHT) $(DOCUMENT).Rnw
archive:
$(PACKER) $(ARCHNAME) $(ARCHFILES)
clean:
$(REMOVER) $(CLEANFILES) $(OUTPUREDIRECT)