Generalise rules for making various output formats from Markdown.
[mkws-moved-to-github.git] / tools / htdocs / Makefile
index ede5186..36b0106 100644 (file)
@@ -4,9 +4,19 @@
 
 #JQUERY_URL=   http://code.jquery.com/jquery-2.0.3.min.js
 JQUERY_URL=    http://code.jquery.com/jquery-1.10.0.min.js
+#JQUERY_URL=   http://code.jquery.com/jquery-1.9.1.min.js
+#JQUERY_URL=   http://code.jquery.com/jquery-1.8.3.min.js
+#JQUERY_URL=   http://code.jquery.com/jquery-1.7.2.min.js
+#JQUERY_URL=   http://code.jquery.com/jquery-1.6.4.min.js
+#JQUERY_URL=   http://code.jquery.com/jquery-1.4.4.min.js
+
+JQUERY_UI_URL= http://code.jquery.com/ui/1.10.3/jquery-ui.js   
+#JQUERY_UI_URL=        http://code.jquery.com/ui/1.8.0/jquery-ui.min.js
 
 MKWS_JS=       mkws-complete.js
-all: ${MKWS_JS} README.html
+DOCS = README.html README.odt README.pdf
+**default**: ${MKWS_JS} README.html
+all: ${MKWS_JS} $(DOCS)
 
 mkws-js ${MKWS_JS}: ../../../libjs-pz2/pz2api.1.js mkws.js
        ( echo "/* created at: $$(date)"; \
@@ -17,7 +27,7 @@ mkws-js ${MKWS_JS}: ../../../libjs-pz2/pz2api.1.js mkws.js
 
 distclean: clean
 clean:
-       rm -f ${MKWS_JS} README.html
+       rm -f ${MKWS_JS} $(DOCS)
 
 help:
        @echo "make [ help | mkws-js | clean ]"
@@ -30,8 +40,18 @@ help:
 # For a description of pandoc's markdown format, see:
 # http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html -->
 
-README.html: README.markdown
+%.html: %.markdown
+       rm -f $@
+       pandoc --standalone -c mkws-doc.css $< -o $@
+       chmod ugo-w $@
+
+%.odt: %.markdown
+       rm -f $@
+       pandoc --standalone $< -o $@
+       chmod ugo-w $@
+
+%.pdf: %.markdown
        rm -f $@
-       pandoc --standalone $< > $@
+       pandoc --standalone $< -o $@
        chmod ugo-w $@