2003-11-02 05:06:55 +00:00
|
|
|
# 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
|
|
|
|
|
2005-05-23 07:17:00 +00:00
|
|
|
%.html %.shtml: %.wml $(top_srcdir)/include/add-header.xsl
|
2005-05-20 02:21:43 +00:00
|
|
|
@xsltproc -html --stringparam root $(HTTP_PREFIX)/$(SITE) \
|
|
|
|
$(top_srcdir)/include/add-header.xsl $< > $@
|
2003-11-02 05:06:55 +00:00
|
|
|
|
2005-05-23 07:17:00 +00:00
|
|
|
# XSLT mangles PHP because PHP is evil ...
|
|
|
|
%.php3 %.php %.phtml: %.wml $(top_srcdir)/include/evilsedhack
|
|
|
|
@$(top_srcdir)/include/evilsedhack $< $(HTTP_PREFIX)/$(SITE) > $@
|
|
|
|
|
|
|
|
|
2003-11-02 05:06:55 +00:00
|
|
|
.htaccess: htaccess
|
|
|
|
@sed -e "s,@SITE@,$(HTTP_PREFIX)/$(SITE)," $< > $@
|