Improvements
[infodrom.org/oldenburg.linux.de] / Makefile
1 DEST = /var/www/oldenburg.linux.de
2
3 hostname=$(shell hostname -f)
4
5 ifeq ($(hostname),kyllikki.infodrom.org)
6 DEST = /var/lib/www/oldenburg.linux.de
7 endif
8
9 TEST = $(HOME)/public_html/new/lugo
10
11 FILES= --exclude "CVS/" --include "*/"
12 FILES += --include "*.png" --include "*.jpg" --include "*.html" --include "*.gif"
13 FILES += --include "*.php"
14 FILES += --include "News/*.txt" --include "Termine/*.txt"
15 FILES += --include "favicon.ico"
16 FILES += --include "lugo.css"
17 FILES += --exclude "*"
18
19 build:
20         cd src && make all
21
22 test:
23         test -d $(TEST) || mkdir -p $(TEST)
24         rsync -vlptr $(FILES) src/ $(TEST)/
25 #       cd src && for f in *.html; do cp $$f $(TEST)/$$f; done
26
27 install:
28         test -d $(DEST) || mkdir -p $(DEST)
29 ifneq ($(hostname),kyllikki.infodrom.org)
30         # chgrp -R lugowww src && chmod g+w -R src
31 endif
32         rsync -lptr $(FILES) src/ $(DEST)/
33 #       cd src && for f in *.html; do cp $$f $(DEST)/$$f; done
34
35 clean:
36         -rm -f `find -name '*~'` `find -name '.?*.swp'`
37         -cd src && make clean
38 #       -cd Styles && make clean
39
40 rebuild: build install
41         test -x /home/joey/bin/update-lugo && /home/joey/bin/update-lugo
42 #       super lugo