2011-01-03 21:40:52 +00:00
|
|
|
|
|
|
|
ROOT ?= $(PWD)
|
|
|
|
HTTP_PORT ?= 49228
|
2011-01-03 22:18:06 +00:00
|
|
|
NGINX_CONF_IN := nginx.conf.in
|
|
|
|
ALL_NGINX_CONF_INPUTS := \
|
|
|
|
$(NGINX_CONF_IN) \
|
|
|
|
$(wildcard perl_requirements.d/*) \
|
|
|
|
$(wildcard perl_locations.d/*)
|
2011-01-03 21:40:52 +00:00
|
|
|
|
|
|
|
|
2011-01-04 01:43:16 +00:00
|
|
|
serve-lighttpd: lighttpd.conf
|
|
|
|
lighttpd -D -f $(ROOT)/$<
|
|
|
|
|
|
|
|
|
2011-01-04 02:27:41 +00:00
|
|
|
serve-nginx: nginx.conf
|
|
|
|
nginx -p $(ROOT)/ -c $(ROOT)/$<
|
|
|
|
|
|
|
|
|
2011-01-03 22:18:06 +00:00
|
|
|
nginx.conf: $(ALL_NGINX_CONF_INPUTS)
|
2011-01-03 21:40:52 +00:00
|
|
|
cat $< | \
|
|
|
|
sed -e 's@__ROOT__@$(ROOT)@g' \
|
|
|
|
-e 's@__HTTP_PORT__@$(HTTP_PORT)@g' > $@
|
|
|
|
|
|
|
|
|
2011-01-04 01:43:16 +00:00
|
|
|
lighttpd.conf: lighttpd.conf.in
|
|
|
|
cat $< | \
|
|
|
|
sed -e 's@__ROOT__@$(ROOT)@g' \
|
|
|
|
-e 's@__HTTP_PORT__@$(HTTP_PORT)@g' > $@
|
|
|
|
|
|
|
|
|
2011-01-03 22:18:06 +00:00
|
|
|
serve-cgiwrap: cgiwrap-fcgi.pl
|
|
|
|
perl $<
|
|
|
|
|
|
|
|
|
|
|
|
cgiwrap-fcgi.pl: cgiwrap-fcgi.pl.in
|
|
|
|
cat $< | sed -e 's@__ROOT__@$(ROOT)@g' > $@
|
|
|
|
|
|
|
|
|
2011-01-04 02:27:41 +00:00
|
|
|
.PHONY: serve-nginx serve-lighttpd serve-cgiwrap
|