2011-01-03 04:58:42 +00:00
|
|
|
|
|
|
|
ROOT ?= $(PWD)
|
|
|
|
HTTP_PORT ?= 49438
|
2011-01-03 15:04:15 +00:00
|
|
|
HTTP_HOST ?= localhost
|
2011-01-03 04:58:42 +00:00
|
|
|
PHP_FCGI_PORT ?= 49439
|
|
|
|
|
|
|
|
|
|
|
|
serve: nginx.conf
|
|
|
|
nginx -p $(ROOT)/ -c $(ROOT)/$<
|
|
|
|
|
|
|
|
|
|
|
|
serve-php: php.ini
|
|
|
|
php-cgi -c $< -b 127.0.0.1:$(PHP_FCGI_PORT)
|
|
|
|
|
|
|
|
|
|
|
|
nginx.conf: nginx.conf.in
|
2011-01-03 15:04:15 +00:00
|
|
|
chmod 644 $@ ;
|
2011-01-03 04:58:42 +00:00
|
|
|
cat $< | \
|
|
|
|
sed -e 's@__ROOT__@$(ROOT)@g' \
|
|
|
|
-e 's@__HTTP_PORT__@$(HTTP_PORT)@g' \
|
2011-01-03 15:04:15 +00:00
|
|
|
-e 's@__HTTP_HOST__@$(HTTP_HOST)@g' \
|
|
|
|
-e 's@__PHP_FCGI_PORT__@$(PHP_FCGI_PORT)@g' > $@ ;
|
|
|
|
chmod 444 $@
|
2011-01-03 04:58:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
php.ini: php.ini.in
|
2011-01-03 15:04:15 +00:00
|
|
|
chmod 644 $@ ;
|
|
|
|
cat $< | sed -e 's@__ROOT__@$(ROOT)@g' > $@ ;
|
|
|
|
chmod 444 $@
|
2011-01-03 04:58:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: serve
|