summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-03-06 23:54:49 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-03-06 23:54:49 +0100
commitca1a6aa7df6703c10d1cd97afedd9c6838ba425b (patch)
treeca8a7fbd6fd4d43268a095ead32f7b4fecd38b72 /Makefile
parente2f172624be2c0cc96461bdd9418e23e798a93b2 (diff)
First commit of the ousia based website architecture
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8e21c8e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+# Makefile for compiling the Ousía Homepage
+#
+# (c) Andreas Stöckel, 2015
+#
+# This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
+# International License. <http://creativecommons.org/licenses/by-sa/4.0/>
+
+SOURCE_OSML=$(wildcard *.osml)
+TARGET_XML=$(SOURCE_OSML:.osml=.xml)
+TARGET_HTML=$(SOURCE_OSML:.osml=.html)
+
+.PHONY: all
+all: style/style.css $(TARGET_XML) $(TARGET_HTML)
+
+# Build the stylesheet using lessc
+# On Fedora you can install lessc using the following commands (as root):
+# yum install nodejs npm
+# npm install -g less
+style/style.css: style/*.less
+ lessc style/style.less style/style.css #--clean-css="--s1"
+
+# Compile all osml files to xml
+%.xml: %.osml
+ ousia -F xml -o $@ $<
+
+# Compile the xml files to html
+%.html: %.xml xsl/*.xsl
+ xsltproc xsl/webpage.xsl $< > $@
+
+# Clean script
+.PHONY: clean webclean
+clean:
+ rm -f style/*.css
+ rm -f $(TARGET_HTML)
+ rm -f $(TARGET_XML)
+
+webclean:
+ rm -f style/*.less
+ rm -f $(TARGET_XML)
+ rm -f $(SOURCE_OSML)
+ rm -rf ontology