X-Git-Url: https://projects.mako.cc/source/to_fork_or_not/blobdiff_plain/147d62aca074d54c3cb7952e085a0df81f03b186..aa46fee29447da7c46b633ecec989c9ccb69c0ba:/Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e87b8ff --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +#!/usr/bin/make -f + +SOURCE = to_fork_or_not_to_fork.xml +OUTPUT_STEM = to_fork_or_not_to_fork + +CURRENT_DISTRO = $(shell test -e /etc/debian_version && echo "debian") +ifeq ($(CURRENT_DISTRO),debian) + NWDBXSL = /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl +else + NWDBXSL = /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl +endif + +html: + xsltproc -o "$(OUTPUT_STEM).html" "$(NWDBXSL)" "$(SOURCE)" + +pdf: + xmlto fo "$(SOURCE)" + fop "$(OUTPUT_STEM).fo" "$(OUTPUT_STEM).pdf" + +build: html pdf + +viewpdf: pdf + xpdf "$(OUTPUT_STEM).pdf" + +validate: + xmllint --noout --noent "$(SOURCE)" + +# Remove the mess +clean: + rm -rf "$(OUTPUT_STEM).html" "$(OUTPUT_STEM).fo" "$(OUTPUT_STEM).pdf" + +# rm -rf ./tmp + + +# some future rules +#move: +#install: build move