couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [18/42] git commit: updated refs/heads/master to a4d6cd4
Date Thu, 03 Oct 2013 14:13:31 GMT
teach `couch-config` `--erlang-version`


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/98683d90
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/98683d90
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/98683d90

Branch: refs/heads/master
Commit: 98683d906b4fa447c30ad9b69f9ad555173e74b9
Parents: 0f5aa11
Author: Jan Lehnardt <jan@apache.org>
Authored: Thu Aug 1 17:57:36 2013 +0200
Committer: Jan Lehnardt <jan@apache.org>
Committed: Thu Oct 3 16:08:35 2013 +0200

----------------------------------------------------------------------
 bin/Makefile.am            | 2 ++
 bin/couch-config.tpl.in    | 5 +++++
 bin/erlang-version.escript | 3 +++
 configure.ac               | 6 ++++++
 license.skip               | 1 +
 5 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/98683d90/bin/Makefile.am
----------------------------------------------------------------------
diff --git a/bin/Makefile.am b/bin/Makefile.am
index c1913d0..65f9ab5 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -95,6 +95,7 @@ couch-config: couch-config.tpl
 	    -e "s|%package_author_name%|@package_author_name@|g" \
 	    -e "s|%package_name%|@package_name@|g" \
 	    -e "s|%version%|@version@|g" \
+	    -e "s|%erlangversion%|@erlangversion@|g" \
 	    -e "s|%couchdb_command_name%|$(couchdb_command_name)|g" > \
 	$@ < $<
 	chmod +x $@
@@ -118,6 +119,7 @@ couch-config_dev: couch-config.tpl
 	    -e "s|%package_author_name%|@package_author_name@|g" \
 	    -e "s|%package_name%|@package_name@|g" \
 	    -e "s|%version%|@version@|g" \
+	    -e "s|%erlangversion%|@erlangversion@|g" \
 	    -e "s|%couchdb_command_name%|$(abs_top_builddir)/utils/run|g" > \
 	$@ < $<
 	chmod +x $@

http://git-wip-us.apache.org/repos/asf/couchdb/blob/98683d90/bin/couch-config.tpl.in
----------------------------------------------------------------------
diff --git a/bin/couch-config.tpl.in b/bin/couch-config.tpl.in
index 22a886d..7db9b2a 100644
--- a/bin/couch-config.tpl.in
+++ b/bin/couch-config.tpl.in
@@ -22,6 +22,7 @@ viewdir="%localstatelibdir%"
 confdir="%localconfdir%"
 urifile="%localstaterundir%/couch.uri"
 logdir="%localstatelogdir%"
+erlangversion="%erlangversion%"
 
 version () {
     cat << EOF
@@ -60,6 +61,7 @@ Options:
   --log-dir         log directory
   --uri-file        daemon sockets file 
   --couch-version   version of Apache CouchDB
+  --erlang-version  version of Erlang that CouchDB was built with
   --version         version of $basename
   --help            Print usage
 
@@ -108,6 +110,9 @@ do
         --couch-version)
             echo $couchversion
             ;;
+        --erlang-version)
+            echo $erlangversion
+            ;;
         --version)
             version
             exit 0

http://git-wip-us.apache.org/repos/asf/couchdb/blob/98683d90/bin/erlang-version.escript
----------------------------------------------------------------------
diff --git a/bin/erlang-version.escript b/bin/erlang-version.escript
new file mode 100644
index 0000000..66aae1c
--- /dev/null
+++ b/bin/erlang-version.escript
@@ -0,0 +1,3 @@
+
+main(_) ->
+  io:format("~s~n", [erlang:system_info(otp_release)]).

http://git-wip-us.apache.org/repos/asf/couchdb/blob/98683d90/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index bb3ef38..9b980fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,6 +123,7 @@ else
 fi
 
 AC_PATH_PROG([ERL], [erl])
+AC_PATH_PROG([ESCRIPT], [escript])
 
 AS_IF([test x${ERL} = x], [
     AC_MSG_ERROR([Could not find the `erl' executable. Is Erlang installed?])
@@ -650,6 +651,9 @@ else
     fi
 fi
 
+ERL_VERSION_COMMAND="${ESCRIPT} bin/erlang-version.escript"
+erlangversion=`${ERL_VERSION_COMMAND}`
+
 AC_ARG_VAR([ERL], [path to the `erl' executable])
 AC_ARG_VAR([ERLC], [path to the `erlc' executable])
 
@@ -688,6 +692,8 @@ AC_SUBST([locallibdir], [${libdir}/${package_identifier}])
 AC_SUBST([localstatelibdir], [${localstatedir}/lib/${package_identifier}])
 AC_SUBST([localstatelogdir], [${localstatedir}/log/${package_identifier}])
 AC_SUBST([localstaterundir], [${localstatedir}/run/${package_identifier}])
+AC_SUBST([erlangversion], [${erlangversion}])
+
 
 # On Windows we install directly into our erlang distribution.
 if test x${IS_WINDOWS} = xTRUE; then

http://git-wip-us.apache.org/repos/asf/couchdb/blob/98683d90/license.skip
----------------------------------------------------------------------
diff --git a/license.skip b/license.skip
index fd7b040..f214b0f 100644
--- a/license.skip
+++ b/license.skip
@@ -24,6 +24,7 @@
 ^bin/Makefile.in
 ^bin/couchdb.1
 ^bin/couchjs.1
+^bin/erlang-version.escript
 ^build-aux/.*
 ^config..*
 ^configure


Mime
View raw message