voting/rules.common
James Henstridge b699719911 go back to evilsedhack for php files, since PHP is evil. Should fix this
2005-05-23  James Henstridge  <james@jamesh.id.au>

	* rules.common (%.php): go back to evilsedhack for php files,
	since PHP is evil.  Should fix this when we can get the XSLT
	working for the PHP scripts we have.
2005-05-23 07:17:00 +00:00

25 lines
678 B
Text

# Site-structural variables
SITE = $(notdir $(subst $(shell echo $(urlpath) | sed "s,/$$,,"),,$(CURDIR)))
pagedir = $(prefix)/$(SITE)/$(urlpath)
# Boring make stuff
BUILT_SOURCES = $(page_SCRIPTS)
CLEANFILES = $(BUILT_SOURCES)
# Interesting target stuff
%.html %.shtml: %.wml $(top_srcdir)/include/add-header.xsl
@xsltproc -html --stringparam root $(HTTP_PREFIX)/$(SITE) \
$(top_srcdir)/include/add-header.xsl $< > $@
# XSLT mangles PHP because PHP is evil ...
%.php3 %.php %.phtml: %.wml $(top_srcdir)/include/evilsedhack
@$(top_srcdir)/include/evilsedhack $< $(HTTP_PREFIX)/$(SITE) > $@
.htaccess: htaccess
@sed -e "s,@SITE@,$(HTTP_PREFIX)/$(SITE)," $< > $@