summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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