Install .php files
[infodrom.org/lists.infodrom.org] / Makefile
1 hostname=$(shell hostname)
2
3 ifeq ($(hostname),finlandia)
4 DEST = $(HOME)/public_html/new/lists
5 TEST = $(HOME)/public_html/new/lists
6 else
7 ifeq ($(hostname),luonnotar)
8 DEST = /var/www/lists.infodrom.org
9 TEST = $(HOME)/luonnotar_html/new/lists
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 stats/
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 "infodrom.css"
21 FILES+= --include "favicon.ico"
22 FILES+= --exclude "*"
23
24 build:
25         make -C src all
26
27 test:
28         test -d $(TEST) || mkdir -p $(TEST)
29         rsync -lptr $(FILES) src/ $(TEST)/
30 #       cd src && for f in *.html; do cp $$f $(TEST)/$$f; done
31
32 fix:
33
34 install: fix
35         test -d $(DEST) || mkdir -p $(DEST)
36         rsync -lptr $(FILES) src/ $(DEST)/
37         rsync src/index.php /var/www/lists.infodrom.org/index.php
38         rsync src/stats/*.php /var/www/lists.infodrom.org/stats/
39
40 #       cd src && for f in *.html; do cp $$f $(DEST)/$$f; done
41 ifeq ($(hostname),finlandia)
42         -cp src/imgdot-1x1-transp-ffffff.gif $(DEST)/gifs/imgdot-1x1-transp.gif
43 endif
44
45 clean:
46         -rm -f `find -name '*~'` `find -name '.?*.swp'`
47         -make -C src clean
48         -make -C Styles clean
49
50 depend:
51         make -C src rdepend