From d80596a3c4af7db7ad75215f3d7395ff9be3b76c Mon Sep 17 00:00:00 2001 From: Steve Beattie Date: Sat, 10 Dec 2016 11:29:15 -0800 Subject: [PATCH] documentation: add Makefile to generate pdfs from odt files The odt files in the documentation directory are hard to consume in that form. This adds a Makefile that generates pdfs from the odt files, using the unoconv tool, based on the idea/github tree https://github.com/jessfraz/apparmor-docs from Jessica Frazelle . Signed-off-by: Steve Beattie Acked-by: Seth Arnold --- documentation/Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 documentation/Makefile diff --git a/documentation/Makefile b/documentation/Makefile new file mode 100644 index 000000000..b95c7dd54 --- /dev/null +++ b/documentation/Makefile @@ -0,0 +1,36 @@ +# ---------------------------------------------------------------------- +# Copyright (c) 2016 Canonical Ltd. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public +# License published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# ---------------------------------------------------------------------- +NAME = documentation +all: +COMMONDIR=../common/ + +include $(COMMONDIR)/Make.rules + +all: docs + +SOURCES:= $(wildcard *.odt) +DOCS:=$(SOURCES:.odt=.pdf) + +.PHONY: docs +docs: $(DOCS) + +%.pdf: %.odt + unoconv -v -f pdf --output "$@" "$<" + +.PHONY: clean +ifndef VERBOSE +.SILENT: clean +endif +clean: + rm -f *.pdf +