Install .php files
[infodrom.org/www.infodrom.org] / Makefile
1 hostname=$(shell hostname)
2
3 ifeq ($(hostname),finlandia)
4 DEST = $(HOME)/public_html/new/infodrom
5 TEST = $(HOME)/public_html/new/infodrom
6 else
7 ifeq ($(hostname),luonnotar)
8 DEST = /var/www/www.infodrom.org
9 TEST = $(HOME)/luonnotar_html/new/infodrom
10 endif
11 endif
12
13 FILES = --exclude "CVS/" --exclude "*imgdot-1x1-transp-ffffff.gif" --exclude "*imgdot-1x1-transp.gif"
14 ifeq ($(hostname),luonnotar)
15 FILES+= --exclude Mail-Archive/ --exclude Infodrom/mailstats/
16 endif
17 FILES+= --include "*/"
18 FILES+= --include "*.html" --include "*.shtml" --include "*.php" --include "*.txt"  --include "*.ps"
19 FILES+= --include "*.png" --include "*.gif" --include "*.jpg"
20 FILES+= --include "Debian/support/debian.de/channel.xml"
21 FILES+= --include "projects/gerstenstaft/quote.txt"
22 FILES+= --include "*.css"
23 FILES+= --include "favicon.ico"
24 FILES+= --exclude "*"
25
26 build:
27         make -C src all
28
29 test:
30         test -d $(TEST) || mkdir -p $(TEST)
31         rsync -lptr $(FILES) src/ $(TEST)/
32 #       cd src && for f in *.html; do cp $$f $(TEST)/$$f; done
33
34 fix:
35
36 install: fix
37         test -d $(DEST) || mkdir -p $(DEST)
38         rsync -lptr $(FILES) src/ $(DEST)/
39         rsync src/Mail-Archive/index.php /var/www/www.infodrom.org/Mail-Archive/index.php
40         rsync src/Infodrom/mailstats/index.php /var/www/www.infodrom.org/Infodrom/mailstats/index.php
41
42 #       cd src && for f in *.html; do cp $$f $(DEST)/$$f; done
43 ifeq ($(hostname),finlandia)
44         -cp src/imgdot-1x1-transp-ffffff.gif $(DEST)/gifs/imgdot-1x1-transp.gif
45 endif
46
47 clean:
48         -rm -f `find -name '*~'` `find -name '.?*.swp'`
49         -make -C src clean
50         -make -C Styles clean
51
52 depend:
53         make -C src rdepend