[PATCH 1/2] build: fix out-of-tree builds, again

classic Classic list List threaded Threaded
7 messages Options
Jani Nikula Jani Nikula
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2] build: fix out-of-tree builds, again

Broken, again, by yours truly in bc11759dd1fd ("build: switch to
hiding libnotmuch symbols by default"). Reference notmuch.sym via
$(srctree).
---
 lib/Makefile.local | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Makefile.local b/lib/Makefile.local
index 93b08d150067..8aa03891d775 100644
--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -19,7 +19,7 @@ LIBRARY_SUFFIX = so
 LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX)
 SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)
 LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
-LIBRARY_LINK_FLAG = -shared -Wl,--version-script=$(lib)/notmuch.sym,-soname=$(SONAME) $(NO_UNDEFINED_LDFLAGS)
+LIBRARY_LINK_FLAG = -shared -Wl,--version-script=$(srcdir)/$(lib)/notmuch.sym,-soname=$(SONAME) $(NO_UNDEFINED_LDFLAGS)
 ifeq ($(PLATFORM),OPENBSD)
 LIBRARY_LINK_FLAG += -lc
 endif
--
2.11.0

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Jani Nikula Jani Nikula
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] devel: add script to test out-of-tree builds

Something I used for 'git bisect run', but we should really add this
as part of our process.
---
 devel/out-of-tree-build-check.sh | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100755 devel/out-of-tree-build-check.sh

diff --git a/devel/out-of-tree-build-check.sh b/devel/out-of-tree-build-check.sh
new file mode 100755
index 000000000000..cf938ed20f26
--- /dev/null
+++ b/devel/out-of-tree-build-check.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# test out-of-tree builds in a temp directory
+# passes all args to make
+
+set -e
+
+srcdir="$(cd "$(dirname "$0")"/.. && pwd)"
+builddir=$(mktemp -d)
+
+cd $builddir
+
+$srcdir/configure
+make "$@"
+
+cd $notmuch_dir
+rm -rf $builddir
--
2.11.0

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Tomi Ollila-2 Tomi Ollila-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 2/2] devel: add script to test out-of-tree builds

On Sun, Sep 10 2017, Jani Nikula wrote:

> Something I used for 'git bisect run', but we should really add this
> as part of our process.

Thanks for an excellent example why ``set -u`` should be included in
*every* shell script. >;D

Tomi

Sent from N9

> ---
>  devel/out-of-tree-build-check.sh | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>  create mode 100755 devel/out-of-tree-build-check.sh
>
> diff --git a/devel/out-of-tree-build-check.sh b/devel/out-of-tree-build-check.sh
> new file mode 100755
> index 000000000000..cf938ed20f26
> --- /dev/null
> +++ b/devel/out-of-tree-build-check.sh
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +# test out-of-tree builds in a temp directory
> +# passes all args to make
> +
> +set -e
> +
> +srcdir="$(cd "$(dirname "$0")"/.. && pwd)"
> +builddir=$(mktemp -d)
> +
> +cd $builddir
> +
> +$srcdir/configure
> +make "$@"
> +
> +cd $notmuch_dir
> +rm -rf $builddir
> --
> 2.11.0
>
> _______________________________________________
> notmuch mailing list
> [hidden email]
> https://notmuchmail.org/mailman/listinfo/notmuch
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Jani Nikula Jani Nikula
Reply | Threaded
Open this post in threaded view
|

[PATCH v2] devel: add script to test out-of-tree builds

In reply to this post by Jani Nikula
Something I used for 'git bisect run', but we should really add this
as part of our process.

---

v2: add set -u, and remove the useless cd.
---
 devel/out-of-tree-build-check.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100755 devel/out-of-tree-build-check.sh

diff --git a/devel/out-of-tree-build-check.sh b/devel/out-of-tree-build-check.sh
new file mode 100755
index 000000000000..984b4b5f65f5
--- /dev/null
+++ b/devel/out-of-tree-build-check.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# test out-of-tree builds in a temp directory
+# passes all args to make
+
+set -eu
+
+srcdir="$(cd "$(dirname "$0")"/.. && pwd)"
+builddir=$(mktemp -d)
+
+cd $builddir
+
+$srcdir/configure
+make "$@"
+
+rm -rf $builddir
--
2.11.0

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Jani Nikula Jani Nikula
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 2/2] devel: add script to test out-of-tree builds

In reply to this post by Tomi Ollila-2
On Mon, 11 Sep 2017, Tomi Ollila <[hidden email]> wrote:
> On Sun, Sep 10 2017, Jani Nikula wrote:
> Thanks for an excellent example why ``set -u`` should be included in
> *every* shell script. >;D

https://upload.wikimedia.org/wikipedia/commons/3/3b/Paris_Tuileries_Garden_Facepalm_statue.jpg

Fix sent.

Thanks,
Jani.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/2] build: fix out-of-tree builds, again

In reply to this post by Jani Nikula
Jani Nikula <[hidden email]> writes:

> Broken, again, by yours truly in bc11759dd1fd ("build: switch to
> hiding libnotmuch symbols by default"). Reference notmuch.sym via
> $(srctree).

pushed this first patch to master

d
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH v2] devel: add script to test out-of-tree builds

In reply to this post by Jani Nikula
Jani Nikula <[hidden email]> writes:

> Something I used for 'git bisect run', but we should really add this
> as part of our process.

pushed.

d
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch