changeset 2450:2cf0c49a36a3 octave-forge

Added Makefile
author hauberg
date Sun, 10 Sep 2006 17:54:05 +0000
parents 0160ef60c4c8
children 8e3f71f0476e
files www/Makefile
diffstat 1 files changed, 53 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/Makefile	Sun Sep 10 17:54:05 2006 +0000
@@ -0,0 +1,53 @@
+ifeq ($(shell hostname), bevo.che.wisc.edu)
+  SHELL = /usr/local/gnu/bin/bash
+else
+  ifeq ($(shell hostname), bahaha.che.wisc.edu)
+    SHELL = /usr/local/gnu/bin/bash
+  endif
+endif
+
+destdir = /usr/local/www/octave.org
+
+INSTALL_DATA = install -m 644
+
+MV := mv
+
+M4 := m4
+
+MACRO_FILE := macros.m4
+
+HTML_SRC := $(shell find . | grep "\.in")
+
+IMG_HTML := $(HTML_SRC:.in=.html)
+
+all: build-www $(IMG_HTML)
+.PHONY: all
+
+build-www:
+	./build-www.py
+	touch $(HTML_SRC)
+
+%.html : %.in
+	$(M4) $(MACRO_FILE) $< > $@
+
+clean:
+	rm -f $(IMG_HTML)
+	rmdir text
+.PHONY: clean
+
+define do-install
+if [ ! -f $(destdir)/$f -o $f -nt $(destdir)/$f ] ; then \
+  echo installing $f in $(destdir) ; \
+  $(INSTALL_DATA) $f $(destdir)/$f ; \
+fi
+
+endef
+
+install: all
+	@$(foreach f, $(FILES_TO_INSTALL), $(do-install))
+.PHONY: install
+
+dist: 
+	tar cf dist.tar $(SOURCES) Makefile macros.m4
+	gzip --best dist.tar
+.PHONY: dist