hostname=$(shell hostname) ifeq ($(hostname),finlandia) DEST = $(HOME)/public_html/new/lists TEST = $(HOME)/public_html/new/lists else ifeq ($(hostname),luonnotar) DEST = /var/www/lists.infodrom.org TEST = $(HOME)/luonnotar_html/new/lists endif endif FILES = --exclude "CVS/" --exclude "*imgdot-1x1-transp-ffffff.gif" --exclude "*imgdot-1x1-transp.gif" ifeq ($(hostname),luonnotar) FILES+= --exclude stats/ endif FILES+= --include "*/" FILES+= --include "*.html" --include "*.shtml" --include "*.php" --include "*.txt" --include "*.ps" FILES+= --include "*.png" --include "*.gif" --include "*.jpg" FILES+= --include "infodrom.css" FILES+= --include "favicon.ico" FILES+= --exclude "*" build: make -C src all 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: install: fix test -d $(DEST) || mkdir -p $(DEST) rsync -lptr $(FILES) src/ $(DEST)/ rsync src/index.php /var/www/lists.infodrom.org/index.php rsync src/search.php3 /var/www/lists.infodrom.org/search.php rsync src/stats/*.php /var/www/lists.infodrom.org/stats/ # 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'` -make -C src clean -make -C Styles clean depend: make -C src rdepend