[Groonga-commit] groonga/groonga [master] httpd: get srcdir from argument instead of shell variables

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jan 17 12:21:31 JST 2013


Kouhei Sutou	2013-01-17 12:21:31 +0900 (Thu, 17 Jan 2013)

  New Revision: f9f51d14f775e3bdc9216e3a812b3f11ab95114e
  https://github.com/groonga/groonga/commit/f9f51d14f775e3bdc9216e3a812b3f11ab95114e

  Log:
    httpd: get srcdir from argument instead of shell variables

  Modified files:
    src/httpd/Makefile.am
    src/httpd/configure

  Modified: src/httpd/Makefile.am (+1 -5)
===================================================================
--- src/httpd/Makefile.am    2013-01-17 12:10:01 +0900 (5412fcd)
+++ src/httpd/Makefile.am    2013-01-17 12:21:31 +0900 (f01be40)
@@ -9,11 +9,7 @@ NGINX_MAKEFILE_DEPEND_FILES =			\
 	$(srcdir)/nginx-module/config
 
 $(NGINX_MAKEILE): $(NGINX_MAKEFILE_DEPEND_FILES)
-	top_srcdir="$(top_srcdir)"			\
-	  top_builddir="$(top_builddir)"		\
-	  abs_top_srcdir="$(abs_top_srcdir)"		\
-	  abs_top_builddir="$(abs_top_builddir)"	\
-	  ./configure `../../config.status --config`
+	./configure --srcdir="$(srcdir)" `../../config.status --config`
 
 # nginx's Makefile specify 'build' as the default rule.
 # This isn't compatible with the 'all' default rule generated by Automake

  Modified: src/httpd/configure (+17 -1)
===================================================================
--- src/httpd/configure    2013-01-17 12:10:01 +0900 (5998ef5)
+++ src/httpd/configure    2013-01-17 12:21:31 +0900 (64705ca)
@@ -4,6 +4,22 @@ set -x
 set -e
 set -u
 
+srcdir="."
+builddir="."
+for argument in "$@"; do
+    case "$argument" in
+	--srcdir=*)
+	    srcdir="$(echo "${argument}" | sed -e 's/--srcdir=//')"
+	    ;;
+    esac
+done
+
+top_srcdir="${srcdir}/../.."
+top_builddir="${builddir}/../.."
+
+abs_top_srcdir="$(cd "${top_srcdir}" && pwd)"
+abs_top_builddir="$(cd "${top_builddir}" && pwd)"
+
 nginx_version=$(cat "${top_srcdir}/nginx_version")
 relative_nginx_directory="vendor/nginx-${nginx_version}"
 nginx_directory="${top_srcdir}/${relative_nginx_directory}"
@@ -24,7 +40,7 @@ if [ "${found_libdir_in_search_path}" = "no" ]; then
   export GROONGA_HTTPD_RPATH="${libdir}"
 fi
 
-if [ -n "${abs_top_srcdir}" -a "${abs_top_srcdir}/src/httpd" != "$(pwd)" ]; then
+if [ "${abs_top_srcdir}/src/httpd" != "$(pwd)" ]; then
   nginx_directory_in_build_directory="${abs_top_builddir}/${nginx_directory}"
   rm -rf "${nginx_directory_in_build_directory}"
   cp -rp \
-------------- next part --------------
HTML����������������������������...
Descargar 



More information about the Groonga-commit mailing list
Back to archive index