hostname=$(shell hostname) ifeq ($(hostname),finlandia) DEST = $(HOME)/public_html/new/luonnotar TEST = $(HOME)/public_html/new/luonnotar else ifeq ($(hostname),luonnotar) DEST = /var/www/luonnotar.infodrom.org TEST = $(HOME)/luonnotar_html/new/luonnotar endif endif FILES = --exclude "CVS/" --exclude "*imgdot-1x1-transp-ffffff.gif" --exclude "*imgdot-1x1-transp.gif" --include "*/" FILES+= --include "*.html" --include "*.shtml" --include "*.php3" FILES+= --include "*.png" --include "*.gif" --include "*.jpg" FILES+= --exclude "*" build: make -C src all test: false test -d $(TEST) || mkdir $(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) rsync -lptr $(FILES) src/ $(DEST)/ # cd src && for f in *.html; do cp $$f $(DEST)/$$f; done clean: -rm -f `find -name '*~'` `find -name '.?*.swp'` -make -C src clean -make -C Styles clean depend: make -C src rdepend