Mercurial > mxd2map
diff buildhtml.mk @ 155:5a882b5773c9
initial website.
author | Emanuel Schuetze <emanuel@intevation.de> |
---|---|
date | Wed, 30 Mar 2011 15:51:06 +0200 |
parents | |
children | 67d395ac5509 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildhtml.mk Wed Mar 30 15:51:06 2011 +0200 @@ -0,0 +1,55 @@ +# Build html from m4 macrofiles +# $Id$ +# +# (c)2005,2006 by Intevation GmbH +# Author(s): Sascha Wilde +# +# This is Free Software licensed under the GPL + +# Preprocessor configuration +PP = m4 +PPFLAGS = --prefix-builtins + +# Build configuration +TARGETS = $(patsubst %.htm4,%.html,$(wildcard *.htm4)) change-history.html change-history-de.html +SUBDIRS = + +# Installation configuration +INSTALL_DIR = /tmp/mapwoc-www +ADD_INST_TYPES = *.css *.php *.png +ADD_INST_DIRS = img + +#USER=$(shell grep "svn+ssh://" .svn/entries | sed -e "s/.*svn+ssh:\/\///g" | sed -e "s/@.*//g" | head -1) + +CURDIR=$(shell pwd) + +.SUFFIXES: .html .htm4 + +.htm4.html: + $(PP) -DNO_LINK_FOR=$@ $(PPFLAGS) $< > $@ + +all: $(TARGETS) subdirs + +$(TARGETS): template.m4 template_header.m4 \ + header.m4 style.css + +subdirs: $(SUBDIRS) + @for dir in $^ ; do \ + $(MAKE) -C $$dir SUBDIRS="" ; \ + done + +online: all + echo "Going to put current contents online for www.mapwocp.org ..." + rsync -urvP --exclude='.svn' $(ADD_INST_TYPES) $(TARGETS) $(ADD_INST_DIRS) \ + $(USER)@wald.intevation.org:/mapwoc/htdocs/ + +install: all + mkdir -p $(INSTALL_DIR) ;\ + cp -uf $(TARGETS) $(INSTALL_DIR) ;\ + cp -uf $(ADD_INST_TYPES) $(INSTALL_DIR) + cp -urf *$(ADD_INST_DIRS) $(INSTALL_DIR) + find $(INSTALL_DIR) -name ".svn" | xargs rm -rf + +tar: install + echo $(CURDIR) + ( cd $(INSTALL_DIR) ; tar -czv -f $(CURDIR)/www.mapwoc.org.tar.gz . )