-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (49 loc) · 1.25 KB
/
Makefile
File metadata and controls
60 lines (49 loc) · 1.25 KB
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
OutPut ?= output
RM ?= rm -f
RMDIR ?= rm -rf
PDFVIEW ?= evince
#M is the folder contains tex files, and related images
M ?= .
BuildDir ?= $(M)
TemplateFolder ?= progressbar
TemplateFiles = beamercolorthemeprogressbar.sty \
beamerfontthemeprogressbar.sty \
beamerinnerthemeprogressbar.sty \
beamerouterthemeprogressbar.sty \
beamerthemeprogressbar.sty \
linuxfb-logo.bb \
linuxfb-logo.png
include $(M)/config.mk
WorkDir = $(shell pwd)
TemplateFilePaths = $(addprefix $(TemplateFolder)/, $(TemplateFiles))
Latex ?= pdflatex
LatexOpt ?= ""
${OutPut}:
mkdir -p $@
%.pdf: $(BuildDir)/%.pdf
cp $< $@
$(BuildDir)/%.pdf: $(M)/%.tex template
cd $(dir $@); \
${Latex} ${LatexOpt} $(notdir $<); \
${Latex} ${LatexOpt} $(notdir $<)
du -h $@
%: $(BuildDir)/%.pdf ${OutPut}
cp $< ${OutPut}/
${PDFVIEW} ${OutPut}/$@.pdf
.PHONY: template
template: $(TemplateFilePaths)
@if [ ! -d $(BuildDir) ]; then \
echo "Create build dir";\
mkdir -p $(BuildDir); \
fi
cp -f $(TemplateFilePaths) $(BuildDir)/
.PHONY: templateclean
templateclean:
rm -f $(addprefix $(BuildDir)/, $(TemplateFiles))
.PHONY: clean
clean: templateclean
cd $(BuildDir); \
${RM} *.aux *.log *.nav *.out *.snm *.toc *.pdf *.vrb
.PHONY: cleanall
cleanall: clean
${RMDIR} ${OutPut}