files=$(shell ls [0-9]*.php | sed -e 's/php/html/g' -e 's|^|html/|')
php=php
INCLUDES=global.inc pres.inc
html: all
all: dirs html/index.html index.php $(files)
index.php: 0.php
ln -sf 0.php index.php
dirs:
mkdir -p html
-cp -f *.html *.jpg *.gif *.png *.css html/
html/index.html: 0.php
ln -sf 0.html html/index.html
%.html: ../%.php ../%.content $(INCLUDES)
$(php) -q $< | sed -e 's/\.php/\.html/g' > $*.html
.PHONY: all