Document support for address lookup
[infodrom.org/www.infodrom.org] / Makefile
index 1a15a57..143971a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,41 +1,55 @@
-DEST = /var/lib/webspace/www.infodrom.ffis.de
-#DEST = /var/lib/webspace/www.infodrom.ffis.de/new
-# kyllikki:
-#DEST = /var/www/www.infodrom.ffis.de/
-
-TEST = $(HOME)/public_html/infodrom
-TEST = /var/lib/webspace/www.infodrom.ffis.de/new
-
-FILES = --exclude "CVS/" --exclude "*imgdot-1x1-transp.gif" --include "*/"
-FILES+= --include "*.jpg" --include "*.html" --include "*.shtml" --include "*.php3" --include "*.gif"
-FILES+= --include "*.png"
+hostname=$(shell hostname)
+
+ifeq ($(hostname),finlandia)
+DEST = $(HOME)/public_html/new/infodrom
+TEST = $(HOME)/public_html/new/infodrom
+else
+ifeq ($(hostname),luonnotar)
+DEST = /var/www/www.infodrom.org
+TEST = $(HOME)/luonnotar_html/new/infodrom
+endif
+endif
+
+FILES = --exclude "CVS/" --exclude "*imgdot-1x1-transp-ffffff.gif" --exclude "*imgdot-1x1-transp.gif"
+ifeq ($(hostname),luonnotar)
+FILES+= --exclude Mail-Archive/ --exclude Infodrom/mailstats/
+endif
+FILES+= --include "*/"
+FILES+= --include "*.html" --include "*.shtml" --include "*.php" --include "*.txt"  --include "*.ps"
+FILES+= --include "*.png" --include "*.gif" --include "*.jpg" --include "*.js"
+FILES+= --include "Debian/support/debian.de/channel.xml"
+FILES+= --include "projects/gerstenstaft/quote.txt"
+FILES+= --include "*.css"
+FILES+= --include "favicon.ico"
 FILES+= --exclude "*"
 
 build:
-       cd src && make all
+       make -C src all
 
 test:
-       test -d $(TEST) || mkdir $(TEST)
+       test -d $(TEST) || mkdir -p $(TEST)
        rsync -lptr $(FILES) src/ $(TEST)/
 #      cd src && for f in *.html; do cp $$f $(TEST)/$$f; done
 
 fix:
-#       for f in src/index.*.php3; do \
-#         sed '1,/width="40"/ s/width="40"/width="250"/' < $$f > tmp; \
-#         mv -f tmp $$f; \
-#         sed '1,/width="40"/ s/width="40"/width="400"/' < $$f > tmp; \
-#         mv -f tmp $$f; \
-#       done
 
 install: fix
-       test -d $(DEST) || mkdir $(DEST)
+       test -d $(DEST) || mkdir -p $(DEST)
        rsync -lptr $(FILES) src/ $(DEST)/
+       install -m 644 src/Debian/lists-lookup.php3 $(DEST)/Debian/lists-lookup.php
+       install -m 644 src/search.php3 $(DEST)/search.php
+       test ! -d /var/www/www.infodrom.org/Mail-Archive || rsync src/Mail-Archive/index.php /var/www/www.infodrom.org/Mail-Archive/index.php
+       test ! -d /var/www/www.infodrom.org/Infodrom/mailstats || rsync src/Infodrom/mailstats/index.php /var/www/www.infodrom.org/Infodrom/mailstats/index.php
+
 #      cd src && for f in *.html; do cp $$f $(DEST)/$$f; done
+ifeq ($(hostname),finlandia)
+       -cp src/imgdot-1x1-transp-ffffff.gif $(DEST)/gifs/imgdot-1x1-transp.gif
+endif
 
 clean:
        -rm -f `find -name '*~'` `find -name '.?*.swp'`
-       -cd src && make clean
-       -cd Styles && make clean
+       -make -C src clean
+       -make -C Styles clean
 
 depend:
-       cd src && make rdepend
+       make -C src rdepend