Port to Debian.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 14 Oct 2011 00:38:24 +0300
changeset 7 6a41484fd3a4
parent 6 24914893fd3c
child 8 d07c0496cdfe
Port to Debian.
Makefile
--- a/Makefile	Wed Aug 17 21:14:54 2011 +0300
+++ b/Makefile	Fri Oct 14 00:38:24 2011 +0300
@@ -11,6 +11,23 @@
 .DEFAULT_GOAL = all
 
 ################################################################
+# Platform definition.
+
+host_os := linux
+ifneq '' '$(WINDIR)'
+  host_os := cygwin
+endif
+target_os := $(host_os)
+
+################################################################
+# Build tool definition/switches.
+
+RST2HTML = rst2html
+ifeq '$(host_os)' 'cygwin'
+  RST2HTML = rst2html.py
+endif
+
+################################################################
 # Proj dirs/files.
 
 RST_FILES := $(wildcard *.rst)
@@ -34,7 +51,7 @@
 html: $(HTML_FILES) $(TXT__FILES)
 
 $(HTML_DIR)/%.html: %.rst rst.css | $(HTML_DIR)
-	rst2html.py --stylesheet=rst.css $*.rst $@
+	$(RST2HTML) --stylesheet=rst.css $*.rst $@
 
 $(HTML_DIR)/index.html: index.sh $(filter-out $(HTML_DIR)/index.html,$(HTML_FILES)) | $(HTML_DIR)
 	./index.sh frame >$@