annotate buildhtml.mk @ 155:5a882b5773c9

initial website.
author Emanuel Schuetze <emanuel@intevation.de>
date Wed, 30 Mar 2011 15:51:06 +0200
parents
children 67d395ac5509
rev   line source
155
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
1 # Build html from m4 macrofiles
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
2 # $Id$
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
3 #
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
4 # (c)2005,2006 by Intevation GmbH
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
5 # Author(s): Sascha Wilde
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
6 #
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
7 # This is Free Software licensed under the GPL
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
8
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
9 # Preprocessor configuration
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
10 PP = m4
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
11 PPFLAGS = --prefix-builtins
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
12
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
13 # Build configuration
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
14 TARGETS = $(patsubst %.htm4,%.html,$(wildcard *.htm4)) change-history.html change-history-de.html
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
15 SUBDIRS =
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
16
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
17 # Installation configuration
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
18 INSTALL_DIR = /tmp/mapwoc-www
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
19 ADD_INST_TYPES = *.css *.php *.png
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
20 ADD_INST_DIRS = img
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
21
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
22 #USER=$(shell grep "svn+ssh://" .svn/entries | sed -e "s/.*svn+ssh:\/\///g" | sed -e "s/@.*//g" | head -1)
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
23
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
24 CURDIR=$(shell pwd)
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
25
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
26 .SUFFIXES: .html .htm4
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
27
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
28 .htm4.html:
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
29 $(PP) -DNO_LINK_FOR=$@ $(PPFLAGS) $< > $@
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
30
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
31 all: $(TARGETS) subdirs
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
32
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
33 $(TARGETS): template.m4 template_header.m4 \
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
34 header.m4 style.css
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
35
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
36 subdirs: $(SUBDIRS)
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
37 @for dir in $^ ; do \
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
38 $(MAKE) -C $$dir SUBDIRS="" ; \
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
39 done
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
40
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
41 online: all
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
42 echo "Going to put current contents online for www.mapwocp.org ..."
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
43 rsync -urvP --exclude='.svn' $(ADD_INST_TYPES) $(TARGETS) $(ADD_INST_DIRS) \
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
44 $(USER)@wald.intevation.org:/mapwoc/htdocs/
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
45
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
46 install: all
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
47 mkdir -p $(INSTALL_DIR) ;\
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
48 cp -uf $(TARGETS) $(INSTALL_DIR) ;\
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
49 cp -uf $(ADD_INST_TYPES) $(INSTALL_DIR)
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
50 cp -urf *$(ADD_INST_DIRS) $(INSTALL_DIR)
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
51 find $(INSTALL_DIR) -name ".svn" | xargs rm -rf
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
52
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
53 tar: install
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
54 echo $(CURDIR)
5a882b5773c9 initial website.
Emanuel Schuetze <emanuel@intevation.de>
parents:
diff changeset
55 ( cd $(INSTALL_DIR) ; tar -czv -f $(CURDIR)/www.mapwoc.org.tar.gz . )
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)