2010-12-30 02:17:41 +00:00
|
|
|
|
|
|
|
ROOT ?= $(PWD)
|
|
|
|
HTTP_PORT ?= 49448
|
|
|
|
PHP_FCGI_PORT ?= 49449
|
|
|
|
|
|
|
|
|
|
|
|
serve: nginx.conf
|
|
|
|
nginx -p $(ROOT)/ -c $(ROOT)/$<
|
|
|
|
|
|
|
|
|
2010-12-31 18:48:40 +00:00
|
|
|
serve-php: php.ini
|
|
|
|
php-cgi -c $< -b 127.0.0.1:$(PHP_FCGI_PORT)
|
2010-12-30 02:17:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
nginx.conf: nginx.conf.in
|
|
|
|
cat $< | \
|
|
|
|
sed -e 's@__ROOT__@$(ROOT)@g' \
|
|
|
|
-e 's@__HTTP_PORT__@$(HTTP_PORT)@g' \
|
|
|
|
-e 's@__PHP_FCGI_PORT__@$(PHP_FCGI_PORT)@g' > $@
|
|
|
|
|
|
|
|
|
2010-12-31 18:48:40 +00:00
|
|
|
php.ini: php.ini.in
|
|
|
|
cat $< | sed -e 's@__ROOT__@$(ROOT)@g' > $@
|
|
|
|
|
|
|
|
|
2010-12-30 02:17:41 +00:00
|
|
|
.PHONY: serve
|