Skip to content

Commit 239fcbd

Browse files
committed
Hook pandoc into make system, remove build script
1 parent ac36122 commit 239fcbd

3 files changed

Lines changed: 38 additions & 10 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ debug.log
1616
# ignore the finished product, attach as a download later
1717
*.pdf
1818
*.html
19+
*.epub
1920

2021
# ignore the C++ examples I've made to better my understanding
2122
C++/*

build_markdown.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

makefile

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,40 @@
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

Comments
 (0)