| 1 |
# |
| 2 |
# Copyright (c) 2014, Norbert Preining. All rights reserved. |
| 3 |
# |
| 4 |
# Redistribution and use in source and binary forms, with or without |
| 5 |
# modification, are permitted provided that the following conditions |
| 6 |
# are met: |
| 7 |
# |
| 8 |
# * Redistributions of source code must retain the above copyright |
| 9 |
# notice, this list of conditions and the following disclaimer. |
| 10 |
# |
| 11 |
# * Redistributions in binary form must reproduce the above |
| 12 |
# copyright notice, this list of conditions and the following |
| 13 |
# disclaimer in the documentation and/or other materials |
| 14 |
# provided with the distribution. |
| 15 |
# |
| 16 |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED |
| 17 |
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 18 |
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 19 |
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
| 20 |
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 21 |
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
| 22 |
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 23 |
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 |
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 25 |
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 26 |
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 |
# |
| 28 |
|
| 29 |
SHELL=/bin/bash |
| 30 |
|
| 31 |
ENGINE=xelatex |
| 32 |
|
| 33 |
PDOPTSALL= -f markdown --table-of-contents --toc-depth=2 |
| 34 |
|
| 35 |
PDOPTSOTHER= |
| 36 |
PDOPTSLATEX= \ |
| 37 |
--template=template.tex \ |
| 38 |
--biblatex \ |
| 39 |
-V biblio-files=manual.bib \ |
| 40 |
-V papersize=a4paper \ |
| 41 |
-V mainfont='Lucida Bright OT' \ |
| 42 |
-V sansfont='Lucida Sans OT' \ |
| 43 |
-V monofont='Lucida Sans Typewriter OT' \ |
| 44 |
-V documentclass=memoir \ |
| 45 |
--pdf-engine=$(ENGINE) |
| 46 |
|
| 47 |
# |
| 48 |
# included md files, order is important!!! |
| 49 |
MDFILES=reference-manual.md introduction.md overview.md cloudsync.md \ |
| 50 |
reference-head.md reference.md |
| 51 |
|
| 52 |
MDFILESORIG=reference-manual.md introduction.md overview.md cloudsync.md \ |
| 53 |
reference-backup.md |
| 54 |
|
| 55 |
manuals: reference-manual.odt reference-manual.epub reference-manual.html reference-manual.pdf |
| 56 |
|
| 57 |
update-ref: |
| 58 |
cafeobj -batch update-reference.cafe |
| 59 |
|
| 60 |
wiki: update-ref |
| 61 |
rm -rf wiki/*.mdwn |
| 62 |
cat reference.md | perl refman2wiki.pl |
| 63 |
|
| 64 |
reference-manual.odt: $(MDFILES) Makefile.in |
| 65 |
pandoc ${PDOPTSALL} ${PDOPTSOTHER} -t odt -s -o reference-manual.odt ${MDFILES} |
| 66 |
|
| 67 |
reference-manual.epub: $(MDFILES) Makefile.in |
| 68 |
pandoc ${PDOPTSALL} ${PDOPTSOTHER} -t epub -s -o reference-manual.epub ${MDFILES} |
| 69 |
|
| 70 |
reference-manual.tex: $(MDFILES) Makefile.in manual.bib template.tex |
| 71 |
pandoc ${PDOPTSALL} ${PDOPTSLATEX} --template=template.tex -t latex -s -o reference-manual.tex ${MDFILES} |
| 72 |
|
| 73 |
reference-manual-orig.tex: $(MDFILESORIG) Makefile.in manual.bib template.tex |
| 74 |
pandoc ${PDOPTSALL} ${PDOPTSLATEX} -t latex -s -o reference-manual-orig.tex ${MDFILESORIG} |
| 75 |
|
| 76 |
reference-manual.html: $(MDFILES) Makefile.in |
| 77 |
pandoc ${PDOPTSALL} ${PDOPTSOTHER} -t html -s -o reference-manual.html ${MDFILES} |
| 78 |
|
| 79 |
reference-manual.bbl: reference-manual.tex manual.bib |
| 80 |
$(ENGINE) reference-manual.tex |
| 81 |
bibtex reference-manual |
| 82 |
|
| 83 |
reference-manual.pdf: reference-manual.tex reference-manual.bbl |
| 84 |
$(ENGINE) reference-manual.tex |
| 85 |
$(ENGINE) reference-manual.tex |
| 86 |
|
| 87 |
all: reference-manual.pdf reference-manual.html |
| 88 |
|
| 89 |
clean: |
| 90 |
rm -f reference-manual-orig.{aux,bbl,bcf,blg,log,out,run.xml,toc} |
| 91 |
rm -f reference-manual-orig-blx.bib |
| 92 |
rm -f reference-manual.{aux,bbl,bcf,blg,log,out,run.xml,toc} |
| 93 |
rm -f reference-manual-blx.bib |
| 94 |
rm -f reference-manual.tex |
| 95 |
|
| 96 |
distclean: clean |
| 97 |
rm -f reference-manual.html |
| 98 |
|
| 99 |
.PHONY: clean distclean |