* [PATCH] build: Allow user to specify ruby executable
@ 2018-05-09 12:38 Thomas Schneider
2018-05-10 21:15 ` Tomi Ollila
2018-05-11 0:06 ` David Bremner
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Schneider @ 2018-05-09 12:38 UTC (permalink / raw)
To: notmuch
This way, one can build for a different Ruby than $PATH/ruby
(e. g. different versions, or Ruby in other paths).
Signed-off-by: Thomas Schneider <qsx@chaotikum.eu>
---
bindings/Makefile.local | 2 +-
configure | 11 ++++++++++-
test/test-lib.sh | 2 +-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/bindings/Makefile.local b/bindings/Makefile.local
index 17b561ca..2ba2775c 100644
--- a/bindings/Makefile.local
+++ b/bindings/Makefile.local
@@ -9,7 +9,7 @@ ifeq ($(HAVE_RUBY_DEV),1)
EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
LIBNOTMUCH="../../lib/$(LINKER_NAME)" \
NOTMUCH_SRCDIR='$(NOTMUCH_SRCDIR)' \
- ruby extconf.rb --vendor
+ $(RUBY) extconf.rb --vendor
$(MAKE) -C $(dir)/ruby
endif
diff --git a/configure b/configure
index b177b141..392213b6 100755
--- a/configure
+++ b/configure
@@ -62,6 +62,7 @@ CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)}
LDFLAGS=${LDFLAGS:-}
XAPIAN_CONFIG=${XAPIAN_CONFIG:-}
PYTHON=${PYTHON:-}
+RUBY=${RUBY:-ruby}
# We don't allow the EMACS or GZIP Makefile variables inherit values
# from the environment as we do with CC and CXX above. The reason is
@@ -118,6 +119,8 @@ Other environment variables can be used to control configure itself,
library. [$XAPIAN_CONFIG]
PYTHON Name of python command to use in
configure and the test suite.
+ RUBY Name of ruby command to use in
+ configure and the test suite.
Additionally, various options can be specified on the configure
command line.
@@ -621,7 +624,7 @@ fi
have_ruby_dev=0
if [ $WITH_RUBY = "1" ] ; then
printf "Checking for ruby development files... "
- if ruby -e "require 'mkmf'"> /dev/null 2>&1; then
+ if ${RUBY} -e "require 'mkmf'"> /dev/null 2>&1; then
printf "Yes.\n"
have_ruby_dev=1
else
@@ -1027,6 +1030,9 @@ WARN_CFLAGS=${WARN_CFLAGS}
# Name of python interpreter
PYTHON = ${python}
+# Name of ruby interpreter
+RUBY = ${RUBY}
+
# The prefix to which notmuch should be installed
# Note: If you change this value here, be sure to ensure that the
# LIBDIR_IN_LDCONFIG value below is still set correctly.
@@ -1234,6 +1240,9 @@ NOTMUCH_HAVE_MAN=$((have_sphinx))
# Name of python interpreter
NOTMUCH_PYTHON=${python}
+# Name of ruby interpreter
+NOTMUCH_RUBY=${RUBY}
+
# Are the ruby development files (and ruby) available? If not skip
# building/testing ruby bindings.
NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev}
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 5b212514..7e064021 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -1003,7 +1003,7 @@ test_python() {
}
test_ruby() {
- MAIL_DIR=$MAIL_DIR ruby -I $NOTMUCH_SRCDIR/bindings/ruby> OUTPUT
+ MAIL_DIR=$MAIL_DIR $NOTMUCH_RUBY -I $NOTMUCH_SRCDIR/bindings/ruby> OUTPUT
}
test_C () {
--
2.17.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] build: Allow user to specify ruby executable
2018-05-09 12:38 [PATCH] build: Allow user to specify ruby executable Thomas Schneider
@ 2018-05-10 21:15 ` Tomi Ollila
2018-05-11 0:06 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: Tomi Ollila @ 2018-05-10 21:15 UTC (permalink / raw)
To: Thomas Schneider, notmuch
On Wed, May 09 2018, Thomas Schneider wrote:
> This way, one can build for a different Ruby than $PATH/ruby
> (e. g. different versions, or Ruby in other paths).
LGTM.
Tomi
>
> Signed-off-by: Thomas Schneider <qsx@chaotikum.eu>
> ---
> bindings/Makefile.local | 2 +-
> configure | 11 ++++++++++-
> test/test-lib.sh | 2 +-
> 3 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/bindings/Makefile.local b/bindings/Makefile.local
> index 17b561ca..2ba2775c 100644
> --- a/bindings/Makefile.local
> +++ b/bindings/Makefile.local
> @@ -9,7 +9,7 @@ ifeq ($(HAVE_RUBY_DEV),1)
> EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
> LIBNOTMUCH="../../lib/$(LINKER_NAME)" \
> NOTMUCH_SRCDIR='$(NOTMUCH_SRCDIR)' \
> - ruby extconf.rb --vendor
> + $(RUBY) extconf.rb --vendor
> $(MAKE) -C $(dir)/ruby
> endif
>
> diff --git a/configure b/configure
> index b177b141..392213b6 100755
> --- a/configure
> +++ b/configure
> @@ -62,6 +62,7 @@ CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)}
> LDFLAGS=${LDFLAGS:-}
> XAPIAN_CONFIG=${XAPIAN_CONFIG:-}
> PYTHON=${PYTHON:-}
> +RUBY=${RUBY:-ruby}
>
> # We don't allow the EMACS or GZIP Makefile variables inherit values
> # from the environment as we do with CC and CXX above. The reason is
> @@ -118,6 +119,8 @@ Other environment variables can be used to control configure itself,
> library. [$XAPIAN_CONFIG]
> PYTHON Name of python command to use in
> configure and the test suite.
> + RUBY Name of ruby command to use in
> + configure and the test suite.
>
> Additionally, various options can be specified on the configure
> command line.
> @@ -621,7 +624,7 @@ fi
> have_ruby_dev=0
> if [ $WITH_RUBY = "1" ] ; then
> printf "Checking for ruby development files... "
> - if ruby -e "require 'mkmf'"> /dev/null 2>&1; then
> + if ${RUBY} -e "require 'mkmf'"> /dev/null 2>&1; then
> printf "Yes.\n"
> have_ruby_dev=1
> else
> @@ -1027,6 +1030,9 @@ WARN_CFLAGS=${WARN_CFLAGS}
> # Name of python interpreter
> PYTHON = ${python}
>
> +# Name of ruby interpreter
> +RUBY = ${RUBY}
> +
> # The prefix to which notmuch should be installed
> # Note: If you change this value here, be sure to ensure that the
> # LIBDIR_IN_LDCONFIG value below is still set correctly.
> @@ -1234,6 +1240,9 @@ NOTMUCH_HAVE_MAN=$((have_sphinx))
> # Name of python interpreter
> NOTMUCH_PYTHON=${python}
>
> +# Name of ruby interpreter
> +NOTMUCH_RUBY=${RUBY}
> +
> # Are the ruby development files (and ruby) available? If not skip
> # building/testing ruby bindings.
> NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev}
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 5b212514..7e064021 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -1003,7 +1003,7 @@ test_python() {
> }
>
> test_ruby() {
> - MAIL_DIR=$MAIL_DIR ruby -I $NOTMUCH_SRCDIR/bindings/ruby> OUTPUT
> + MAIL_DIR=$MAIL_DIR $NOTMUCH_RUBY -I $NOTMUCH_SRCDIR/bindings/ruby> OUTPUT
> }
>
> test_C () {
> --
> 2.17.0
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] build: Allow user to specify ruby executable
2018-05-09 12:38 [PATCH] build: Allow user to specify ruby executable Thomas Schneider
2018-05-10 21:15 ` Tomi Ollila
@ 2018-05-11 0:06 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2018-05-11 0:06 UTC (permalink / raw)
To: Thomas Schneider, notmuch
Thomas Schneider <qsx@chaotikum.eu> writes:
> This way, one can build for a different Ruby than $PATH/ruby
> (e. g. different versions, or Ruby in other paths).
>
> Signed-off-by: Thomas Schneider <qsx@chaotikum.eu>
pushed to master.
d
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-11 0:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-09 12:38 [PATCH] build: Allow user to specify ruby executable Thomas Schneider
2018-05-10 21:15 ` Tomi Ollila
2018-05-11 0:06 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).