]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Sometimes, a wrapper script is generated for an executable that,
authorPeter Ekberg <peda@lysator.liu.se>
Mon, 1 Nov 2004 17:25:55 +0000 (17:25 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 1 Nov 2004 17:25:55 +0000 (17:25 +0000)
itself, does not link against an uninstalled library.  It appears
that this can happen if you are building a project where:

  (1) there is a library
  (2) there is an executable that does not, itself, link against
      that library

In this case, notinst_deplibs is empty, and when the wrapper
script is loaded by libtool during ./libtool mode=install, there
is a check for "is notinst_deplibs empty".  In this case, it is,
so libtool reports an error.

I don't think it is wrong to have a wrapper script for an exe that
*technically* doesn't need it.  But instead of checking for
notinst_deplib nonempty as a proxy for "did wrapper script get
sourced into my environment properly" a different var should be
used.

* config/ltmain.m4sh (func_mode_install): set new variable
`generated_by_libtool_version' in wrapper script when using
libtool_install_magic.  When verifying that wrapper script was
properly sourced, check that `generated_by_libtool_version' is
non-empty, instead of using notinst_deplibs.

ChangeLog
config/ltmain.m4sh

index 075b0ee142fa9413bd38c03309c4ee311bb09282..9584de43374ad67255dc3b06b06ad52c31cfbcd0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,32 @@
+2004-11-01  Peter Ekberg  <spam.protected>
+
+       Sometimes, a wrapper script is generated for an executable that,
+       itself, does not link against an uninstalled library.  It appears
+       that this can happen if you are building a project where:
+
+         (1) there is a library
+         (2) there is an executable that does not, itself, link against
+             that library
+
+       In this case, notinst_deplibs is empty, and when the wrapper
+       script is loaded by libtool during ./libtool mode=install, there
+       is a check for "is notinst_deplibs empty".  In this case, it is,
+       so libtool reports an error.
+
+       I don't think it is wrong to have a wrapper script for an exe that
+       *technically* doesn't need it.  But instead of checking for
+       notinst_deplib nonempty as a proxy for "did wrapper script get
+       sourced into my environment properly" a different var should be
+       used.
+
+       * config/ltmain.m4sh (func_mode_install): set new variable
+       `generated_by_libtool_version' in wrapper script when using
+       libtool_install_magic.  When verifying that wrapper script was
+       properly sourced, check that `generated_by_libtool_version' is
+       non-empty, instead of using notinst_deplibs.
+
 2004-11-01  Charles Wilson  <spam.protected>,
-           Peter Ekberg <spam.protected>
+           Peter Ekberg  <spam.protected>
 
        * config/ltmain.m4sh (func_mode_install): On Windows based hosts,
        ensure that import libraries don't get stripped.
index 09449ce8d159ac3e1d08bb4ace30b8d0c5012c81..afa3277ea28120f222383f2ab39020ef2601a466 100644 (file)
@@ -1967,7 +1967,7 @@ func_mode_install ()
          esac
 
          # Check the variables that should have been set.
-         test -z "$notinst_deplibs" && \
+         test -z "$generated_by_libtool_version" && \
            func_fatal_error "invalid libtool wrapper script \`$wrapper'"
 
          finalize=yes
@@ -6003,7 +6003,8 @@ relink_command=\"$relink_command\"
 
 # This environment variable determines our operation mode.
 if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variable:
+  # install mode needs the following variables:
+  generated_by_libtool_version='$macro_version'
   notinst_deplibs='$notinst_deplibs'
 else
   # When we are sourced in execute mode, \$file and \$ECHO are already set.