[gobject-introspection] LD_LIBRARY_PATH exorcism
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gobject-introspection] LD_LIBRARY_PATH exorcism
- Date: Mon, 24 Aug 2009 18:15:05 +0000 (UTC)
commit bacb23155a5fb370493d0ce2fc438ea6c2982a45
Author: Colin Walters <walters verbum org>
Date: Thu Aug 20 18:21:41 2009 -0400
LD_LIBRARY_PATH exorcism
Thanks to commit 6d510b8db, we now no longer need LD_LIBRARY_PATH
to be set for invoking the compiler.
Next, before we were taking the LD_LIBRARY_PATH variable and
turning it into a compile path, presumably to attempt to handle
the cases where we weren't getting the right -L flags. Also
interacting with this was a while ago we weren't really doing
uninstalled libtool libraries correctly, which is probably
how hacks involving LD_LIBRARY_PATH crept into the scanner.
Just require that we're passed the right -L flags, and we
should be doing libtool libraries better now.
gir/Makefile.am | 2 +-
giscanner/scannermain.py | 14 --------------
tests/invoke/Makefile.am | 2 +-
tests/offsets/Makefile.am | 6 ++----
tests/scanner/Makefile.am | 4 ++--
5 files changed, 6 insertions(+), 22 deletions(-)
---
diff --git a/gir/Makefile.am b/gir/Makefile.am
index 3cd4bf7..d136316 100644
--- a/gir/Makefile.am
+++ b/gir/Makefile.am
@@ -206,7 +206,7 @@ girdir = $(GIR_DIR)
dist_gir_DATA = $(GIRSOURCES)
%.typelib: %.gir $(top_builddir)/tools/g-ir-compiler$(EXEEXT)
- LD_LIBRARY_PATH=$(top_builddir)/girepository/.libs:.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} $(DEBUG) $(top_builddir)/tools/g-ir-compiler$(EXEEXT) --includedir=. $(G_IR_COMPILER_OPTS) $< -o $@
+ $(top_builddir)/tools/g-ir-compiler$(EXEEXT) --includedir=. $(G_IR_COMPILER_OPTS) $< -o $@
typelibsdir = $(libdir)/girepository-1.0
typelibs_DATA = $(GIRSOURCES:.gir=.typelib)
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 4b74253..d70eed4 100644
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -247,20 +247,6 @@ def scanner_main(args):
_error("Must specify --program or --library")
libraries = options.libraries
- # FIXME: using LPATH is definitely not portable enough. Using Python's
- # find_library for finding our shared libraries is not a portable enough
- # anyway as it behaves differently depending on the OS
- lpath = os.environ.get('LPATH')
- library_path = ':'.join(options.library_paths)
-
- ld_library_path = os.environ.get('LD_LIBRARY_PATH')
- if ld_library_path:
- library_path = ':'.join([ld_library_path, library_path])
-
- if lpath:
- os.environ['LPATH'] = ':'.join([lpath, library_path])
- else:
- os.environ['LPATH'] = library_path
filenames = []
for arg in args:
if (arg.endswith('.c') or
diff --git a/tests/invoke/Makefile.am b/tests/invoke/Makefile.am
index 2902d51..54c28ff 100644
--- a/tests/invoke/Makefile.am
+++ b/tests/invoke/Makefile.am
@@ -20,7 +20,7 @@ BUILT_SOURCES = testfns-metadata.c
CLEANFILES = testfns-metadata.c
testfns-metadata.c: testfns-1.0.gir $(top_builddir)/tools/g-ir-compiler Makefile
- LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}:$(top_builddir)/girepository/.libs $(CHECK_DEBUG) $(top_builddir)/tools/g-ir-compiler $(srcdir)/testfns-1.0.gir --code -o testfns-metadata.c
+ $(CHECK_DEBUG) $(top_builddir)/tools/g-ir-compiler $(srcdir)/testfns-1.0.gir --code -o testfns-metadata.c
invoke_SOURCES = invoke.c
invoke_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
diff --git a/tests/offsets/Makefile.am b/tests/offsets/Makefile.am
index 62b0d79..1713eb4 100644
--- a/tests/offsets/Makefile.am
+++ b/tests/offsets/Makefile.am
@@ -30,8 +30,7 @@ offsets-1.0.gir: liboffsets.la offsets.h $(SCANNER_BIN) $(SCANNER_LIBS) Makefile
--output $@
%.typelib: %.gir $(top_builddir)/tools/g-ir-compiler$(EXEEXT) Makefile
- LD_LIBRARY_PATH=$(top_builddir)/girepository/.libs:.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} \
- $(top_builddir)/tools/g-ir-compiler --includedir=. --includedir=$(top_builddir)/gir $< -o $@
+ $(top_builddir)/tools/g-ir-compiler --includedir=. --includedir=$(top_builddir)/gir $< -o $@
CLEANFILES += offsets-1.0.gir offsets-1.0.typelib
@@ -53,8 +52,7 @@ CLEANFILES += gitestoffsets.c
############################################################
check-local: offsets-1.0.typelib
- LD_LIBRARY_PATH=$(top_builddir)/girepository/.libs:.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} \
- GI_TYPELIB_PATH=:$(top_builddir)/gir ./gitestoffsets$(EXEEXT) offsets.compiled offsets.introspected
+ GI_TYPELIB_PATH=:$(top_builddir)/gir ./gitestoffsets$(EXEEXT) offsets.compiled offsets.introspected
diff -u offsets.compiled offsets.introspected
CLEANFILES += offsets.compiled offsets.introspected
diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am
index 1317708..a14cf8d 100644
--- a/tests/scanner/Makefile.am
+++ b/tests/scanner/Makefile.am
@@ -143,10 +143,10 @@ post-check:
@true
%.typelib: %.gir $(top_builddir)/tools/g-ir-compiler$(EXEEXT) Makefile
- LD_LIBRARY_PATH=$(top_builddir)/girepository/.libs:.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} $(top_builddir)/tools/g-ir-compiler --includedir=. --includedir=$(top_builddir)/gir $< -o $@
+ $(top_builddir)/tools/g-ir-compiler --includedir=. --includedir=$(top_builddir)/gir $< -o $@
%.tgir: %.typelib $(top_builddir)/tools/g-ir-generate$(EXEEXT) Makefile
- LD_LIBRARY_PATH=$(top_builddir)/girepository/.libs:.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} $(top_builddir)/tools/g-ir-generate --includedir=. --includedir=$(top_builddir)/gir $< -o $@
+ $(top_builddir)/tools/g-ir-generate --includedir=. --includedir=$(top_builddir)/gir $< -o $@
%.tgir.check: %.tgir
@diff -u -U 10 $(srcdir)/$*-expected.tgir $*.tgir; \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]