You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
561 B
33 lines
561 B
14 years ago
|
|
||
|
ROOT ?= $(PWD)
|
||
|
HTTP_PORT ?= 49438
|
||
14 years ago
|
HTTP_HOST ?= localhost
|
||
14 years ago
|
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
|
||
14 years ago
|
chmod 644 $@ ;
|
||
14 years ago
|
cat $< | \
|
||
|
sed -e 's@__ROOT__@$(ROOT)@g' \
|
||
|
-e 's@__HTTP_PORT__@$(HTTP_PORT)@g' \
|
||
14 years ago
|
-e 's@__HTTP_HOST__@$(HTTP_HOST)@g' \
|
||
|
-e 's@__PHP_FCGI_PORT__@$(PHP_FCGI_PORT)@g' > $@ ;
|
||
|
chmod 444 $@
|
||
14 years ago
|
|
||
|
|
||
|
php.ini: php.ini.in
|
||
14 years ago
|
chmod 644 $@ ;
|
||
|
cat $< | sed -e 's@__ROOT__@$(ROOT)@g' > $@ ;
|
||
|
chmod 444 $@
|
||
14 years ago
|
|
||
|
|
||
|
.PHONY: serve
|