From 0f663435017223a1b8292206f8ff91c0916113e3 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 9 Jan 2013 09:37:25 +0100 Subject: Add GNU and BSD makefile Rules are in Makefile.include. --- BSDmakefile | 4 ++++ Makefile | 38 +++----------------------------------- Makefile.include | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 35 deletions(-) create mode 100644 BSDmakefile create mode 100644 Makefile.include diff --git a/BSDmakefile b/BSDmakefile new file mode 100644 index 0000000..25d1baf --- /dev/null +++ b/BSDmakefile @@ -0,0 +1,4 @@ +IMAGES!=ls image/*.dia +GenSVG=${IMAGES:S/.dia$/.svg/} + +include Makefile.include diff --git a/Makefile b/Makefile index 74e710c..c6c4ac2 100644 --- a/Makefile +++ b/Makefile @@ -1,36 +1,4 @@ -DBLATEX_OPTS="-P latex.encoding=utf8 -P latex.output.revhistory=0 -P doc.publisher.show=0 -P latex.class.options=a4paper,12pt,abstraction,titlepage -b xetex" -IMAGES!=ls image/*.dia -GenSVG=${IMAGES:S/.dia$/.svg/} +IMAGES=$(wildcard image/*.dia) +GenSVG=$(IMAGES:.dia=.svg) -.PHONY: all clean up -all: ${GenSVG} document.html document.pdf presentation.html - -.SUFFIXES: .asciidoc .html -presentation.html: presentation.asciidoc - asciidoc --out-file=$@.tmp --backend=slidy $< - sed -f fix-css.sed $@.tmp > $@ - rm $@.tmp - -.asciidoc.html: - asciidoc --out-file=$@ --backend=html $< - -.SUFFIXES: .asciidoc .tex -.asciidoc.tex: - asciidoc --backend=latex $< - -.SUFFIXES: .asciidoc .pdf -document.pdf: document.asciidoc sksys.sty - a2x.py -f pdf --dblatex-opts=$(DBLATEX_OPTS) --dblatex-opts="-s sksys.sty" $< - -.asciidoc.pdf: - a2x.py -f pdf --dblatex-opts=$(DBLATEX_OPTS) $< - -.SUFFIXES: .dia .svg -.dia.svg: - @dia --export=$@ --filter=svg $< - -up: document.html presentation.html - scp -r document.html presentation.html image klemkow.net:www - -clean: - rm -f document.html presentation.html document.pdf ${GenSVG} +include Makefile.include diff --git a/Makefile.include b/Makefile.include new file mode 100644 index 0000000..4c50105 --- /dev/null +++ b/Makefile.include @@ -0,0 +1,34 @@ +DBLATEX_OPTS="-P latex.encoding=utf8 -P latex.output.revhistory=0 -P doc.publisher.show=0 -P latex.class.options=a4paper,12pt,abstraction,titlepage -b xetex" + +.PHONY: all clean up +all: ${GenSVG} document.html document.pdf presentation.html + +.SUFFIXES: .asciidoc .html +presentation.html: presentation.asciidoc + asciidoc --out-file=$@.tmp --backend=slidy $< + sed -f fix-css.sed $@.tmp > $@ + rm $@.tmp + +.asciidoc.html: + asciidoc --out-file=$@ --backend=html $< + +.SUFFIXES: .asciidoc .tex +.asciidoc.tex: + asciidoc --backend=latex $< + +.SUFFIXES: .asciidoc .pdf +document.pdf: document.asciidoc sksys.sty + a2x.py -f pdf --dblatex-opts=$(DBLATEX_OPTS) --dblatex-opts="-s sksys.sty" $< + +.asciidoc.pdf: + a2x.py -f pdf --dblatex-opts=$(DBLATEX_OPTS) $< + +.SUFFIXES: .dia .svg +.dia.svg: + @dia --export=$@ --filter=svg $< + +up: document.html presentation.html + scp -r document.html presentation.html image klemkow.net:www + +clean: + rm -f document.html presentation.html document.pdf ${GenSVG} -- cgit