-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathGNUmakefile
162 lines (124 loc) · 4.24 KB
/
GNUmakefile
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
THISDIR := GAelectrodynamics
THISBOOK := GAelectrodynamics
BIBLIOGRAPHY_PATH := classicthesis_mine
HAVE_OWN_CONTENTS := 1
HAVE_OWN_TITLEPAGE := 1
MY_CLASSICTHESIS_FRONTBACK_FILES += ../latex/classicthesis_mine/FrontBackmatter/Index.tex
MY_CLASSICTHESIS_FRONTBACK_FILES += ../latex/classicthesis_mine/FrontBackmatter/ContentsAndFigures.tex
BOOKTEMPLATE := ../latex/classicthesis_mine/ClassicThesis2.tex
include make.revision
include ../latex/make.bookvars
#ONCEFLAGS := -justonce
SOURCE_DIRS += working
# comment this out for online pdf version (uncomment for KDP)
#PRINT_VERSION := 1
ifdef KINDLE_VERSION
PARAMS += --kindle
endif
ifdef PRINT_VERSION
SUBFIGDIR := bw
else
SUBFIGDIR := color
endif
ifndef PRINT_VERSION
PARAMS += --no-print
endif
PARAMS += -subfig $(SUBFIGDIR)
DISTEXTRA := $(SUBFIGDIR)
ifdef PRINT_VERSION
DISTEXTRA := $(DISTEXTRA).kdp
endif
FIGURES += ../figures/$(THISBOOK)/$(SUBFIGDIR)
FIGURES += ../figures/$(THISBOOK)
SOURCE_DIRS += $(FIGURES)
PRIMARY_SOURCES := $(shell grep input chapters.tex | sed 's/%.*//;s/.*{//;s/}.*//;')
PRIMARY_SOURCES += FrontBackmatter/preface.tex
#GENERATED_SOURCES += matlab.tex
GENERATED_SOURCES += mathematica.tex
#GENERATED_SOURCES += julia.tex
GENERATED_SOURCES += backmatter.tex
EPS_FILES := $(foreach dir,$(FIGURES),$(wildcard $(dir)/*.eps))
PDFS_FROM_EPS := $(subst eps,pdf,$(EPS_FILES))
#$(error PDFS_FROM_EPS $(PDFS_FROM_EPS))
THISBOOK_DEPS += $(PDFS_FROM_EPS)
#THISBOOK_DEPS += macros_mathematica.sty
CLEAN_TARGETS += *.sp FrontBackmatter/*.sp
DO_SPELL_CHECK := $(shell cat spellcheckem.txt)
KINDLE := gaee-kindle
include ../latex/make.rules
$(THISBOOK).pdf :: parameters.sty
#all :: $(THISBOOK).pdf
#all :: ellipticalWaves.pdf
#all :: junk.pdf
#all :: maxwells.pdf
integration.pdf :: $(shell cat spellcheckem.txt)
maxwells.pdf :: $(shell cat spellcheckem.txt)
ece2500report.pdf :: $(shell cat spellcheckem.txt) reportPreamble.tex
report : ece2500report.pdf
mx : maxwells.pdf
ii : integration.pdf
gp : geometricproduct.pdf
#lp : lineAndPlane.pdf
lp : subspaceDistance.pdf
eps:
@echo $(EPS_FILES)
pdfeps:
@echo $(PDFS_FROM_EPS)
eps2pdf: $(PDFS_FROM_EPS)
# FIXME: this should be an automatic dependency, but currently isn't.
#$(THISBOOK).pdf :: mmacells.sty
#$(THISBOOK).pdf :: classicthesis.sty $(EXTERNAL_DEPENDENCIES)
$(THISBOOK).pdf :: $(EXTERNAL_DEPENDENCIES)
.PHONY: spellcheck
spellcheck: $(patsubst %.tex,%.sp,$(filter-out $(DONT_SPELL_CHECK),$(DO_SPELL_CHECK)))
dropbox: $(HOME)/Dropbox/Review/$(THISBOOK).$(VER).pdf
$(HOME)/Dropbox/Review/$(THISBOOK).$(VER).pdf : $(THISBOOK).$(VER).pdf
cp $(THISBOOK).pdf ~/Dropbox/Review/$(THISBOOK).$(VER).pdf
git log --decorate > ~/Dropbox/Review/Changelog.txt
#alex:
# cp $(THISBOOK).pdf ~/Dropbox/4Alex/$(THISBOOK).$(VER).pdf
# #cp ece2500report.pdf ~/Dropbox/4Alex/ece2500report.$(VER).pdf
# git log --decorate > ~/Dropbox/4Alex/Changelog.txt
%.sp : %.tex
spellcheck $^
touch $@
#classicthesis.sty: ../latex/classicthesis/classicthesis.sty
# cp ../latex/classicthesis/classicthesis.sty .
#.PHONY: copy
#copy : $(HOME)/Dropbox/$(THISDIR)/$(THISBOOK).pdf
#
#$(HOME)/Dropbox/$(THISDIR)/$(THISBOOK).pdf : $(THISBOOK).pdf
# cp $^ $@
mmacells/mmacells.sty:
git clone https://github.com/jkuczm/mmacells
bib:
rm -f Bibliography.bib myrefs.bib
make Bibliography.bib myrefs.bib
mmacells.sty: mmacells/mmacells.sty
cp $^ $@
# hack for: HAVE_OWN_TITLEPAGE
clean :: kclean
git checkout FrontBackmatter/Titlepage.tex
kclean ::
#rm -f *.html # clobbers Changelog.html
rm -f *.idx *.4ct *.aux *.xref *.4tc *.dvi *.log *.ncx *.lg *.idv *.tmp *.css *.epub
rm -f *.bbl *.blg *.brf *.fdb_latexmk *.fls *.ilg *.ind *.lof *.out *.synctex.gz *.toc
rm -f *.aux */*.aux
rm -f $(KINDLE)*.html
rm -f $(KINDLE)*svg content.opf
rm -rf $(KINDLE)-epub $(KINDLE)-mobi
rm -rf $(KINDLE)-conversionLog.csv
git checkout README.md
kindle:
#tex4ebook -s -f mobi -e build.mk4 $(KINDLE).tex
#tex4ebook -s $(KINDLE).tex
tex4ebook -s -f mobi $(KINDLE).tex
#tex4ebook -s -e build.mk4 $(KINDLE).tex
#tex4ebook -s -e build_factor.mk4 $(KINDLE).tex
#tex4ebook -s $(KINDLE).tex
#tex4ebook -s -f mobi -e kbuild.mk4 $(KINDLE).tex
scrpage2.sty : ../latex/scrpage2.sty
cp $^ $@
backmatter.tex: ../latex/classicthesis_mine/backmatter2.tex
rm -f $@
ln -s ../latex/classicthesis_mine/backmatter2.tex backmatter.tex