Adjusted initrd.img creation
[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" --include "*.js"
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         install -m 644 src/Debian/lists-lookup.php3 $(DEST)/Debian/lists-lookup.php
40         install -m 644 src/search.php3 $(DEST)/search.php
41         test ! -d /var/www/www.infodrom.org/Mail-Archive || rsync src/Mail-Archive/index.php /var/www/www.infodrom.org/Mail-Archive/index.php
42         test ! -d /var/www/www.infodrom.org/Infodrom/mailstats || rsync src/Infodrom/mailstats/index.php /var/www/www.infodrom.org/Infodrom/mailstats/index.php
43
44 #       cd src && for f in *.html; do cp $$f $(DEST)/$$f; done
45 ifeq ($(hostname),finlandia)
46         -cp src/imgdot-1x1-transp-ffffff.gif $(DEST)/gifs/imgdot-1x1-transp.gif
47 endif
48
49 clean:
50         -rm -f `find -name '*~'` `find -name '.?*.swp'`
51         -make -C src clean
52         -make -C Styles clean
53
54 depend:
55         make -C src rdepend