[gjs] build: Only force shared libraries if necessary
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] build: Only force shared libraries if necessary
- Date: Mon, 25 Jan 2016 04:33:23 +0000 (UTC)
commit a3b220718d974a58ba7f05257d6c390cd8fd2508
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Jan 24 18:47:25 2016 -0800
build: Only force shared libraries if necessary
The libtool argument -rpath /nowhere is the (bizarrely) recommended way
to force generation of a shared library even if Automake thinks you
should not have a shared library. This happens when your library is part
of the check or noinst target.
We only need to force a shared library if --enable-installed-tests is not
given to configure. Normally the extra -rpath does not matter in the case
of --enable-installed tests, but OS X's linker chokes if a second -rpath
argument is given.
This change makes sure the -rpath argument is only added when necessary.
https://bugzilla.gnome.org/show_bug.cgi?id=737702
Makefile-insttest.am | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/Makefile-insttest.am b/Makefile-insttest.am
index 08c86e5..799084a 100644
--- a/Makefile-insttest.am
+++ b/Makefile-insttest.am
@@ -42,6 +42,9 @@ jsunit-resources.c: $(srcdir)/installed-tests/js/jsunit.gresources.xml $(jsunit_
BUILT_SOURCES += jsunit-resources.h jsunit-resources.c
CLEANFILES += jsunit-resources.h jsunit-resources.c
+common_test_ldflags = -avoid-version
+common_test_libadd = $(GJS_LIBS)
+
privlibdir = $(pkglibdir)
privlib_LTLIBRARIES =
check_LTLIBRARIES =
@@ -49,13 +52,11 @@ if BUILDOPT_INSTALL_TESTS
privlib_LTLIBRARIES += libregress.la libwarnlib.la libgimarshallingtests.la
else
check_LTLIBRARIES += libregress.la libwarnlib.la libgimarshallingtests.la
-endif
-
# This rpath /nowhere thing is the libtool upstream recommended way to
# force generation of shared libraries, which we need in order for the
# tests to work uninstalled.
-common_test_ldflags = -avoid-version -rpath /nowhere
-common_test_libadd = $(GJS_LIBS)
+common_test_ldflags += -rpath /nowhere
+endif
nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
libregress_la_CPPFLAGS = $(AM_CPPFLAGS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]