| 1 | |
| 2 | include ../resources/make.param |
| 3 | |
| 4 | TUTORIAL_MAIN=main.txt |
| 5 | SOURCE_DEPS= \ |
| 6 | $(TUTORIAL_MAIN) \ |
| 7 | starting.txt \ |
| 8 | first_map.txt second_map.txt publish.txt \ |
| 9 | splitter.txt custom.txt \ |
| 10 | $(XSL) |
| 11 | |
| 12 | build: html |
| 13 | |
| 14 | all: html pdf epub |
| 15 | |
| 16 | html: tutorial.html |
| 17 | pdf: tutorial.pdf |
| 18 | epub: tutorial.epub |
| 19 | |
| 20 | tutorial.html: $(SOURCE_DEPS) |
| 21 | $(ASCIIDOC) $(HTML_ATTRS) -o tutorial.html -a icons -a iconsdir=$(ICONSDIR) -b html5 $(TUTORIAL_MAIN) |
| 22 | |
| 23 | tutorial.pdf: $(SOURCE_DEPS) |
| 24 | $(A2X) --xsl-file=$(XSL) --fop -a doctype=article $(PDF_OPTS) $(TUTORIAL_MAIN) |
| 25 | mv main.pdf tutorial.pdf |
| 26 | |
| 27 | tutorial.epub: $(SOURCE_DEPS) |
| 28 | mkdir -p build |
| 29 | cp -ru $(RES)/common-images build |
| 30 | $(A2X) --format epub --icons --icons-dir=build/common-images/icons $(TUTORIAL_MAIN) |
| 31 | |
| 32 | |
| 33 | install: pdf |
| 34 | cp -u tutorial.pdf $(DEST) |
| 35 | |
| 36 | clean: |
| 37 | rm -f tutorial.{pdf,epub,html} |
| 38 | rm -rf build |