Re: [PATCH 2/2] fix (rest of the) out of tree build

2016-11-29 Thread David Bremner
Tomi Ollila  writes:


> +# Like $TEST_DIRECTORY this needs to be absolute as working directories 
> change.
> +SOURCE_DIRECTORY=$(
> + case $NOTMUCH_SRCDIR in /*) cd "$NOTMUCH_SRCDIR" ;;
> +  *) cd "../$NOTMUCH_SRCDIR"
> + esac
> + pwd -P)
> +

I don't understand the second case here.

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


[PATCH 2/2] fix (rest of the) out of tree build

2016-11-25 Thread Tomi Ollila
From: Tomi Ollila 

With working tests (on various Linux systems).
---

V3 of id:1479146030-17083-1-git-send-email-tomi.oll...@iki.fi

 configure   | 6 --
 test/test-lib-common.sh | 7 +++
 test/test-lib.sh| 4 ++--
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 22767c5..03dddce 100755
--- a/configure
+++ b/configure
@@ -348,8 +348,8 @@ int main(void) {
 return 0;
 }
 EOF
-if ${CC} ${CFLAGS} _libversion.c -o _libversion > /dev/null 2>&1 && \
-   ./_libversion > _libversion.sh && . ./_libversion.sh
+if ${CC} ${CFLAGS} -I"$srcdir" _libversion.c -o _libversion > /dev/null 2>&1 \
+   && ./_libversion > _libversion.sh && . ./_libversion.sh
 then
 printf "OK.\n"
 else
@@ -1165,6 +1165,8 @@ cat > sh.config < OUTPUT
 }
 
@@ -1217,7 +1217,7 @@ test_C () {
 exec_file="test${test_count}"
 test_file="${exec_file}.c"
 cat > ${test_file}
-${TEST_CC} ${TEST_CFLAGS} -I${TEST_DIRECTORY} -I${TEST_DIRECTORY}/../lib 
-o ${exec_file} ${test_file} -L${TEST_DIRECTORY}/../lib/ -lnotmuch -ltalloc
+${TEST_CC} ${TEST_CFLAGS} -I${TEST_DIRECTORY} -I${SOURCE_DIRECTORY}/lib -o 
${exec_file} ${test_file} -L${TEST_DIRECTORY}/../lib/ -lnotmuch -ltalloc
 echo "== stdout ==" > OUTPUT.stdout
 echo "== stderr ==" > OUTPUT.stderr
 ./${exec_file} "$@" 1>>OUTPUT.stdout 2>>OUTPUT.stderr
-- 
2.10.0

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