emanuel@155: # Build html from m4 macrofiles emanuel@155: # $Id$ emanuel@155: # emanuel@155: # (c)2005,2006 by Intevation GmbH emanuel@155: # Author(s): Sascha Wilde emanuel@155: # emanuel@155: # This is Free Software licensed under the GPL emanuel@155: emanuel@155: # Preprocessor configuration emanuel@155: PP = m4 emanuel@155: PPFLAGS = --prefix-builtins emanuel@155: emanuel@155: # Build configuration emanuel@155: TARGETS = $(patsubst %.htm4,%.html,$(wildcard *.htm4)) change-history.html change-history-de.html emanuel@155: SUBDIRS = emanuel@155: emanuel@155: # Installation configuration emanuel@155: INSTALL_DIR = /tmp/mapwoc-www emanuel@155: ADD_INST_TYPES = *.css *.php *.png emanuel@155: ADD_INST_DIRS = img emanuel@155: emanuel@155: #USER=$(shell grep "svn+ssh://" .svn/entries | sed -e "s/.*svn+ssh:\/\///g" | sed -e "s/@.*//g" | head -1) emanuel@155: emanuel@155: CURDIR=$(shell pwd) emanuel@155: emanuel@155: .SUFFIXES: .html .htm4 emanuel@155: emanuel@155: .htm4.html: emanuel@155: $(PP) -DNO_LINK_FOR=$@ $(PPFLAGS) $< > $@ emanuel@155: emanuel@155: all: $(TARGETS) subdirs emanuel@155: emanuel@155: $(TARGETS): template.m4 template_header.m4 \ emanuel@155: header.m4 style.css emanuel@155: emanuel@155: subdirs: $(SUBDIRS) emanuel@155: @for dir in $^ ; do \ emanuel@155: $(MAKE) -C $$dir SUBDIRS="" ; \ emanuel@155: done emanuel@155: emanuel@155: online: all emanuel@155: echo "Going to put current contents online for www.mapwocp.org ..." emanuel@155: rsync -urvP --exclude='.svn' $(ADD_INST_TYPES) $(TARGETS) $(ADD_INST_DIRS) \ emanuel@155: $(USER)@wald.intevation.org:/mapwoc/htdocs/ emanuel@155: emanuel@155: install: all emanuel@155: mkdir -p $(INSTALL_DIR) ;\ emanuel@155: cp -uf $(TARGETS) $(INSTALL_DIR) ;\ emanuel@155: cp -uf $(ADD_INST_TYPES) $(INSTALL_DIR) emanuel@155: cp -urf *$(ADD_INST_DIRS) $(INSTALL_DIR) emanuel@155: find $(INSTALL_DIR) -name ".svn" | xargs rm -rf emanuel@155: emanuel@155: tar: install emanuel@155: echo $(CURDIR) emanuel@155: ( cd $(INSTALL_DIR) ; tar -czv -f $(CURDIR)/www.mapwoc.org.tar.gz . )