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@156: TARGETS = $(patsubst %.htm4,%.html,$(wildcard *.htm4)) emanuel@155: SUBDIRS = emanuel@155: emanuel@155: # Installation configuration stephan@162: INSTALL_DIR = ./mxd2map-www stephan@195: ADD_INST_TYPES = *.css *.php *.png .htaccess emanuel@155: ADD_INST_DIRS = img 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 stephan@162: echo "Going to put current contents online for www.mxd2mapp.org ..." emanuel@156: rsync -urvP --exclude='.hg' $(ADD_INST_TYPES) $(TARGETS) $(ADD_INST_DIRS) \ stephan@195: sholl@wald.intevation.org:/mxd2map/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@156: find $(INSTALL_DIR) -name ".hg" | xargs rm -rf emanuel@155: emanuel@155: tar: install emanuel@155: echo $(CURDIR) stephan@162: ( cd $(INSTALL_DIR) ; tar -czv -f $(CURDIR)/www.mxd2map.org.tar.gz . ) stephan@195: stephan@195: clean: stephan@195: rm -f *.html stephan@195: stephan@195: clean-en: stephan@195: rm -f 404.html about.html contact.html development.html donate.html download.html impressum.html index.html license.html stephan@195: