Permalink
Browse files

new build options

- epub2 (replaces epub)
- epub3 (epub + mathml)
- mathml (html5 + mathml)
  • Loading branch information...
1 parent b71a2c1 commit fa4aba59c3dbeb1fe98f743764b17635ee4688ee @iainmcgin iainmcgin committed Jul 31, 2013
Showing with 40 additions and 6 deletions.
  1. +40 −6 Makefile
View
46 Makefile
@@ -16,10 +16,10 @@ MD_SOURCES := 01-title.md \
BUILD_DIR := build
-.PHONY: dirs all html pdf tex epub md clean
+.PHONY: dirs all html mathml pdf tex epub2 epub3 md clean
-all: html pdf epub md
+all: html mathml pdf tex epub2 epub3 md
clean:
@@ -29,20 +29,26 @@ clean:
html: $(BUILD_DIR)/ScalaReference.html
+mathml: $(BUILD_DIR)/ScalaReference-mathml.html
+
+
pdf: $(BUILD_DIR)/ScalaReference.pdf
tex: $(BUILD_DIR)/ScalaReference.tex
-epub: $(BUILD_DIR)/ScalaReference.epub
+epub2: $(BUILD_DIR)/ScalaReference.epub2
+
+
+epub3: $(BUILD_DIR)/ScalaReference.epub3
md: $(BUILD_DIR)/ScalaReference.md
-$(BUILD_DIR)/ScalaReference.epub: Scala.bib $(BUILD_DIR)/ScalaReference.md
- @echo "building EPUB spec to $(BUILD_DIR)/ScalaReference.epub"
+$(BUILD_DIR)/ScalaReference.epub2: Scala.bib $(BUILD_DIR)/ScalaReference.md
+ @echo "building EPUB2 spec to $(BUILD_DIR)/ScalaReference.epub2"
@pandoc -f markdown \
-t epub \
--standalone \
@@ -51,7 +57,21 @@ $(BUILD_DIR)/ScalaReference.epub: Scala.bib $(BUILD_DIR)/ScalaReference.md
--number-sections \
--bibliography=Scala.bib \
--self-contained \
- -o build/ScalaReference.epub \
+ -o build/ScalaReference.epub2 \
+ build/ScalaReference.md
+
+
+$(BUILD_DIR)/ScalaReference.epub3: Scala.bib $(BUILD_DIR)/ScalaReference.md
+ @echo "building EPUB3 spec to $(BUILD_DIR)/ScalaReference.epub3"
+ @pandoc -f markdown \
+ -t epub3 \
+ --standalone \
+ --toc \
+ --chapters \
+ --number-sections \
+ --bibliography=Scala.bib \
+ --self-contained \
+ -o build/ScalaReference.epub3 \
build/ScalaReference.md
@@ -98,6 +118,20 @@ $(BUILD_DIR)/ScalaReference.html: Scala.bib $(BUILD_DIR)/ScalaReference.md
-o build/ScalaReference.html \
build/ScalaReference.md
+$(BUILD_DIR)/ScalaReference-mathml.html: Scala.bib $(BUILD_DIR)/ScalaReference.md
+ @echo "building HTML spec to $(BUILD_DIR)/ScalaReference-mathml.html"
+ @pandoc -f markdown \
+ -t html5 \
+ --standalone \
+ --toc \
+ --chapters \
+ --number-sections \
+ --bibliography=Scala.bib \
+ --template=resources/scala-ref-template.html5 \
+ --mathml \
+ -o build/ScalaReference-mathml.html \
+ build/ScalaReference.md
+
$(BUILD_DIR)/ScalaReference.md: dirs $(MD_SOURCES)
@echo "building Markdown source to $(BUILD_DIR)/ScalaReference.md"

0 comments on commit fa4aba5

Please sign in to comment.