]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* demo/Makefile.am: Don't extract configuration variables directly
authorAlexandre Oliva <aoliva@redhat.com>
Sat, 2 Sep 2000 23:56:42 +0000 (23:56 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Sat, 2 Sep 2000 23:56:42 +0000 (23:56 +0000)
from the libtool script, since it breaks with multiple
configurations.  Use $(LIBTOOL) --config instead.

ChangeLog
demo/Makefile.am

index 9809ceea557eb95aaa285ddacc4e30dc2a4b4817..fefb10e55069180aa2d3dd8a505df9266982f3d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2000-09-02  Alexandre Oliva  <aoliva@redhat.com>
 
+       * demo/Makefile.am: Don't extract configuration variables directly
+       from the libtool script, since it breaks with multiple
+       configurations.  Use $(LIBTOOL) --config instead.
+
        * tests/link-2.test: Create hell.lo in the format expected by
        libtool.
 
index bbf435dc3f0056482bf81dc33baefee01b1ca15a..afc7e8f3ac8808e0a2dc172de326b75ac81d7cea 100644 (file)
@@ -60,7 +60,7 @@ CLEANFILES = $(hardcode_tests)
 
 # Unfortunately, in order to test libtool thoroughly, we need access
 # to its private directory.
-objdir = `sed -n -e 's/^objdir=\(.*\)$$/\1/p' ../libtool`
+objdir = `$(LIBTOOL) --config | sed -n -e 's/^objdir=\(.*\)$$/\1/p'`
 
 # The following rules are only for the libtool demo and tests.
 # Regenerate our acinclude.m4 only if it doesn't exist.
@@ -72,6 +72,7 @@ $(srcdir)/acinclude.m4:
 # Test programs to see what gets hardcoded.
 .PHONY: hardcode
 hardcode: $(hardcode_tests)
+SET_HARDCODE_FLAGS = eval `$(LIBTOOL) --config | egrep -e '^(hardcode_.*|wl)='`
 hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
        @rm -f hc-direct
        @echo "You may ignore any linking errors from the following command:"
@@ -80,14 +81,14 @@ hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
          for lib in $$library_names; do \
            shlib="./$(objdir)/$$lib"; \
          done; \
-         eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
+         $(SET_HARDCODE_FLAGS); \
          libdir=$(libdir); \
          flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
          echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \
          eval "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $(LIBM) $$flag || echo unsupported > $@"
 
 hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
-       @eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
+       @$(SET_HARDCODE_FLAGS); \
          libdir=`pwd`/$(objdir); \
          flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
          if test -z "$$flag"; then \
@@ -102,7 +103,8 @@ hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
 hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
        @rm -f hc-libpath
        @echo "You may ignore any linking errors from the following command:"
-       @eval `egrep -e '^(shlibpath_var|hardcode_.*|wl)=' libtool`; \
+       @$(SET_HARDCODE_FLAGS); \
+         eval `$(LIBTOOL) --config | grep '^shlibpath_var='`; \
          libdir=$(libdir); \
          flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
          echo "$$shlibpath_var=./$(objdir) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \
@@ -110,7 +112,7 @@ hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
 
 hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES)
        @rm -f hc-minusL
-       @eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
+       @$(SET_HARDCODE_FLAGS); \
          libdir=$(libdir); \
          flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
          echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \