Re: [PATCH 1/3] configure: add ${NOTMUCH_SRCDIR} -- absolute path to notmuch source

2017-03-12 Thread David Bremner
Tomi Ollila  writes:

> The ${srcdir} -- usually relative path to notmuch source -- works fine
> in current ./configure and all makefiles. To have simple access to
> notmuch source in tests and out of tree builds holding absolute path to
> the source directory is useful.

series pushed to master.

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/3] configure: add ${NOTMUCH_SRCDIR} -- absolute path to notmuch source

2017-03-12 Thread Tomi Ollila
The ${srcdir} -- usually relative path to notmuch source -- works fine
in current ./configure and all makefiles. To have simple access to
notmuch source in tests and out of tree builds holding absolute path to
the source directory is useful.
---

Fixed version of series starting with
id:1480769604-11307-1-git-send-email-tomi.oll...@iki.fi

diff to that one:

: -if [ "$srcdir" != "." ] && [ "$srcdir" != "$NOTMUCH_SRCDIR" ]; then
: +if [ "$srcdir" != "." ]; then

That one broke OOT build when using absolute path (and is now pretty
obvious)... That change is not needed here (and should not have been
there in the first place...)

 configure | 8 
 1 file changed, 8 insertions(+)

diff --git a/configure b/configure
index e16a9b7..bcfa416 100755
--- a/configure
+++ b/configure
@@ -19,7 +19,12 @@ To work around this problem you may try to execute:
 # Store original IFS value so it can be changed (and restored) in many places.
 readonly DEFAULT_IFS="$IFS"
 
+# The top-level directory for the source. This ./configure and all Makefiles
+# are good with ${srcdir} usually being relative. Some components (e.g. tests)
+# are executed in subdirectories and for those it is simpler to use
+# ${NOTMUCH_SRCDIR} which holds absolute path to the source.
 srcdir=$(dirname "$0")
+NOTMUCH_SRCDIR=$(cd "$srcdir" && pwd)
 
 subdirs="util compat lib parse-time-string completion doc emacs"
 subdirs="${subdirs} performance-test test test/test-databases"
@@ -913,6 +918,7 @@ cat > Makefile.config < sh.config 

[PATCH 1/3] configure: add ${NOTMUCH_SRCDIR} -- absolute path to notmuch source

2016-12-03 Thread Tomi Ollila
The ${srcdir} -- usually relative path to notmuch source -- works fine
in current ./configure and all makefiles. To have simple access to
notmuch source in tests and out of tree builds holding absolute path to
the source directory is useful.
---
 configure | 8 
 1 file changed, 8 insertions(+)

Version 3 of id:1480099848-17636-1-git-send-email-...@guru.guru-group.fi
now adding variable holding absolute path to notmuch source to *.config
files in ./configure

diff --git a/configure b/configure
index 72db26d..174b24a 100755
--- a/configure
+++ b/configure
@@ -19,7 +19,12 @@ To work around this problem you may try to execute:
 # Store original IFS value so it can be changed (and restored) in many places.
 readonly DEFAULT_IFS="$IFS"
 
+# The top-level directory for the source. This ./configure and all Makefiles
+# are good with ${srcdir} usually being relative. Some components (e.g. tests)
+# are executed in subdirectories and for those it is simpler to use
+# ${NOTMUCH_SRCDIR} which holds absolute path to the source.
 srcdir=$(dirname "$0")
+NOTMUCH_SRCDIR=$(cd "$srcdir" && pwd)
 
 subdirs="util compat lib parse-time-string completion doc emacs"
 subdirs="${subdirs} performance-test test test/test-databases"
@@ -927,6 +932,7 @@ cat > Makefile.config < sh.config