SRC := $(wildcard *.spy)
HTML := $(SRC:.spy=.html)

all: $(HTML)

sf: WWW = "-qegprefix=http://spyce.sourceforge.net/cgi-bin/eg/"
sf: all

clean:
	-rm -f *.html
	-rm -f examples/*.pyc

remake: clean all

# all pages depend on the includes
$(HTML): inc/*.spi

$(HTML): $(SRC)
	python ../run_spyceCmd.py $(WWW) -O $(SRC)
	chmod u+x $(SRC)

# generate HTML from spyce files
%.html: %.spy
	python ../run_spyceCmd.py $(WWW) -o $@ $<
	chmod u+rx $@
