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
stephan@219: ADD_INST_DIRS = img documentation
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:
stephan@211: all: $(TARGETS) images subdirs
emanuel@155:
emanuel@155: $(TARGETS): template.m4 template_header.m4 \
emanuel@155: header.m4 style.css
emanuel@155:
stephan@219: documentation:
stephan@219: $(MAKE) -C ../doku online
stephan@219:
stephan@211: images:
stephan@211: $(MAKE) -C ../doku/funktionsweise/ all
stephan@211:
emanuel@155: subdirs: $(SUBDIRS)
emanuel@155: @for dir in $^ ; do \
emanuel@155: $(MAKE) -C $$dir SUBDIRS="" ; \
emanuel@155: done
emanuel@155:
stephan@219: online: all documentation
stephan@162: echo "Going to put current contents online for www.mxd2mapp.org ..."
stephan@212: rsync -urvPL --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@211: $(MAKE) -C ../doku/funktionsweise/ 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: