[PATCH] Don't install config files for unused modules

Brian M. Waters brianmwaters at gmail.com
Tue Oct 30 00:03:38 UTC 2012


Hello,

This patch fixes a slightly annoying behavior whereby "make install"
causes configuration files for charset, fastcgi, uwsgi and scgi
modules to be installed, even if those modules have been excluded from
the build.

Thanks!
Brian Waters

Index: auto/install
===================================================================
--- auto/install	(revision 4894)
+++ auto/install	(working copy)
@@ -109,15 +109,30 @@

 	test -d '\$(DESTDIR)$NGX_CONF_PREFIX' \
 		|| mkdir -p '\$(DESTDIR)$NGX_CONF_PREFIX'
+END

+if [ $HTTP_CHARSET = YES ]; then
+
+    cat << END                                                >> $NGX_MAKEFILE
+
 	cp conf/koi-win '\$(DESTDIR)$NGX_CONF_PREFIX'
 	cp conf/koi-utf '\$(DESTDIR)$NGX_CONF_PREFIX'
 	cp conf/win-utf '\$(DESTDIR)$NGX_CONF_PREFIX'
+END

+fi
+
+cat << END                                                    >> $NGX_MAKEFILE
+
 	test -f '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types' \
 		|| cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX'
 	cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types.default'
+END

+if [ $HTTP_FASTCGI = YES ]; then
+
+    cat << END                                                >> $NGX_MAKEFILE
+
 	test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params' \
 		|| cp conf/fastcgi_params '\$(DESTDIR)$NGX_CONF_PREFIX'
 	cp conf/fastcgi_params \
@@ -126,17 +141,36 @@
 	test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf' \
 		|| cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX'
 	cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf.default'
+END

+fi
+
+if [ $HTTP_UWSGI = YES ]; then
+
+    cat << END                                                >> $NGX_MAKEFILE
+
 	test -f '\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params' \
 		|| cp conf/uwsgi_params '\$(DESTDIR)$NGX_CONF_PREFIX'
 	cp conf/uwsgi_params \
 		'\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params.default'
+END

+fi
+
+if [ $HTTP_SCGI = YES ]; then
+
+    cat << END                                                >> $NGX_MAKEFILE
+
 	test -f '\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params' \
 		|| cp conf/scgi_params '\$(DESTDIR)$NGX_CONF_PREFIX'
 	cp conf/scgi_params \
 		'\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params.default'
+END

+fi
+
+cat << END                                                    >> $NGX_MAKEFILE
+
 	test -f '\$(DESTDIR)$NGX_CONF_PATH' \
 		|| cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PATH'
 	cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PREFIX/nginx.conf.default'



More information about the nginx-devel mailing list