]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* demo/Makefile.am (hc-direct, hc-libpath, hc-minusL): link with
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Fri, 19 Mar 1999 18:43:22 +0000 (18:43 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Fri, 19 Mar 1999 18:43:22 +0000 (18:43 +0000)
$$hardcode_libdir_flag_spec, if available, with libdir=$(libdir),
to make sure the hardcode_* variables will produce the expected
results even in the presence of a hardcoding flag; depend on
libhello.la having been installed already
(hc-libflag): link with the installed library, but try to
hard-code the uninstalled one
* doc/libtool.texi: document the changes

ChangeLog
demo/Makefile.am
doc/libtool.texi

index dfe7536ec850a8b964be1014705cac4b05907888..eec33371055fe0ffeb3579b8347b21ece121abea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * demo/Makefile.am (hc-direct, hc-libpath, hc-minusL): link with
+       $$hardcode_libdir_flag_spec, if available, with libdir=$(libdir),
+       to make sure the hardcode_* variables will produce the expected
+       results even in the presence of a hardcoding flag; depend on
+       libhello.la having been installed already
+       (hc-libflag): link with the installed library, but try to
+       hard-code the uninstalled one
+       * doc/libtool.texi: document the changes
+
        * tests/*.test: when a test fails, skip tests that depend on it.
        If a certain configuration is not supported, skip all its tests.
 
index 8b5413b391fad02978cd2b0491f5323af3690012..1df6fec29517bade04b1fa37a1c27ba32553d643 100644 (file)
@@ -65,7 +65,7 @@ $(srcdir)/acinclude.m4:
 # Test programs to see what gets hardcoded.
 .PHONY: hardcode
 hardcode: $(hardcode_tests)
-hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES)
+hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
        @rm -f hc-direct
        @echo "You may ignore any linking errors from the following command:"
        @shlib=./$(objdir)/libhello.a; \
@@ -73,41 +73,41 @@ hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES)
          for lib in $$library_names; do \
            shlib="./$(objdir)/$$lib"; \
          done; \
-         echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib -lm || echo unsupported > $@"; \
-         eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib -lm || echo unsupported > $@"
-
-# We need to create an alias for $(objdir) so that this test works regardless
-# of $hardcode_minus_L
-hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES)
-       rm -rf hc-libflag _hclibs
-       mkdir _hclibs
-       objdir=$(objdir); cd _hclibs && for lib in ../$$objdir/libhello*; do \
-         $(LN_S) $$lib `echo "$$lib" | sed 's%^.*/%%'` || exit 1; \
-       done
-       @eval `egrep -e '^(hardcode_.*|wl)=' ../libtool`; \
+         eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
+         libdir=$(libdir); \
+         flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
+         echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib -lm $$flag || echo unsupported > $@"; \
+         eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib -lm $$flag || echo unsupported > $@"
+
+hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
+       @eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
          libdir=`pwd`/$(objdir); \
          flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
          if test -z "$$flag"; then \
            echo "echo unsupported > $@"; \
            echo unsupported > $@ || status="$$?"; \
          else \
-           echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L./_hclibs -lhello -lm"; \
-           $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L./_hclibs -lhello -lm || status="$$?"; \
+           echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello -lm"; \
+           $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello -lm || status="$$?"; \
          fi; \
-         echo "rm -rf _hclibs"; \
-         rm -rf _hclibs; \
          exit $$status
 
-hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES)
+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=' ../libtool`; \
-         echo "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello -lm || echo unsupported > $@"; \
-         eval "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello -lm || echo unsupported > $@"
+       @eval `egrep -e '^(shlibpath_var|hardcode_.*|wl)=' libtool`; \
+         libdir=$(libdir); \
+         flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
+         echo "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello -lm $$flag || echo unsupported > $@"; \
+         eval "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello -lm $$flag || echo unsupported > $@"
 
 hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES)
        @rm -f hc-minusL
-       $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello -lm
+       @eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
+         libdir=$(libdir); \
+         flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
+         echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello -lm $$flag || echo unsupported > $@"; \
+         eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello -lm $$flag || echo unsupported > $@"
 
 $(OBJECTS): libtool
 libtool: $(LIBTOOL_DEPS)
index be24a308c22fe4e1cf30b5d86af73e75a7a6a2ec..d787c87b1ce2b252890d91cf833b4ddf92649050 100644 (file)
@@ -3731,12 +3731,16 @@ or if they need to be relinked.
 @defvar hardcode_direct
 Set to @samp{yes} or @samp{no}, depending on whether the linker
 hardcodes directories if a library is directly specified on the command
-line (such as @samp{@var{dir}/lib@var{name}.a}).
+line (such as @samp{@var{dir}/lib@var{name}.a}) when
+@var{hardcode_libdir_flag_spec} is specified.
 @end defvar
 
 @defvar hardcode_libdir_flag_spec
 Flag to hardcode a @var{libdir} variable into a binary, so that the
 dynamic linker searches @var{libdir} for shared libraries at runtime.
+If it is empty, libtool will try to use some other hardcoding mechanism.
+If everything else fails, it will fallback to
+@samp{hardcode_action=relink}.
 @end defvar
 
 @defvar hardcode_libdir_separator
@@ -3748,15 +3752,15 @@ arguments to that flag.
 @defvar hardcode_minus_L
 Set to @samp{yes} or @samp{no}, depending on whether the linker
 hardcodes directories specified by @samp{-L} flags into the resulting
-executable.
+executable when @var{hardcode_libdir_flag_spec} is specified.
 @end defvar
 
 @defvar hardcode_shlibpath_var
 Set to @samp{yes} or @samp{no}, depending on whether the linker
 hardcodes directories by writing the contents of @samp{$shlibpath_var}
-into the resulting executable.  Set to @samp{unsupported} if directories
-specified by @samp{$shlibpath_var} are searched at run time, but not at
-link time.
+into the resulting executable when @var{hardcode_libdir_flag_spec} is
+specified.  Set to @samp{unsupported} if directories specified by
+@samp{$shlibpath_var} are searched at run time, but not at link time.
 @end defvar
 
 @defvar host