1- # Targets
2- TEX_NAME = Design_Patterns_In_Python
1+ # Builds the e-book in multiple formats
2+
3+ OPTIONS = -s --toc --toc-depth=2 --highlight-style haddock
4+ SOURCE_NAME = Design_Patterns_In_Python
5+ OUTPUT_NAME = $(shell echo $(SOURCE_NAME ) | sed -e 's/ /_/g')
6+
7+ # ==============================================================================
8+ all : $(OUTPUT_NAME ) .epub $(OUTPUT_NAME ) .pdf $(OUTPUT_NAME ) .html
9+ @echo -e " All made"
10+
11+ # ==============================================================================
12+ $(OUTPUT_NAME ) .html : $(SOURCE_NAME ) .md
13+ @echo -e " Making html."
14+ @pandoc $< $(OPTIONS ) -o $@
15+ @echo -e " html made.\n"
316
417# ==============================================================================
5- all : open
6- @true
18+ $(OUTPUT_NAME ) .pdf : $(SOURCE_NAME ) .md
19+ @echo -e " Making pdf."
20+ @pandoc $< $(OPTIONS ) -o $@
21+ @echo -e " pdf made.\n"
722
8- include $(DROPBOX ) /Coding/MakeFiles/latex.mk
9- # override OUTPUT_NAME here
23+ # ==============================================================================
24+ $(OUTPUT_NAME ) .epub : $(SOURCE_NAME ) .md
25+ @echo -e " Making epub."
26+ @pandoc $< $(OPTIONS ) -o $@
27+ @echo -e " epub made.\n"
28+
29+ # ==============================================================================
30+ clean : FRC
31+ # remove the temporary files
32+ @rm -f *.pdf *.pyc *.html *.epub
33+ @echo "Removed all: pdfs, html, epubs and temp files."
34+
35+ # ==============================================================================
36+ # D Pseudo target causes all targets that depend on FRC to be remade even in
37+ # D case a file with the name of the target exists. Works unless there is a file
38+ # D called FRC in the directory.
39+ # ------------------------------------------------------------------------------
40+ FRC :
0 commit comments