]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
make a more dramatic demo
authorAndreas Jaeger <aj@suse.de>
Sun, 13 May 2001 03:59:27 +0000 (03:59 +0000)
committerBruce Korb <bkorb@gnu.org>
Sun, 13 May 2001 03:59:27 +0000 (03:59 +0000)
exe/lt_link.def
exe/ltmacros.tpl [new file with mode: 0644]
exe/ltmain.mk
exe/ltmain.tpl
exe/ltstr.tpl

index ac672d6b7538daf5eda7db90254a91d84032519e..ecd05b2338d87148ef922e31fca508ccb6d01ff8 100644 (file)
@@ -1022,12 +1022,8 @@ is created, otherwise an executable program is created.\n";
          fi
          case $linkmode in
          lib)
-           if test "$deplibs_check_method" != pass_all; then
-             echo
-             echo "*** Warning: This library needs some functionality provided by $deplib."
-             echo "*** I have the capability to make that library automatically link in when"
-             echo "*** you link to this library.  But I can only do this if you have a"
-             echo "*** shared version of the library, which you do not appear to have."
+           if test "$deplibs_check_method" != pass_all; then[++
+           share-to-static-warn  libname = '$deplib' ++]
            else
              echo
              echo "*** Warning: Linking the shared library $output against the"
@@ -1487,12 +1483,8 @@ is created, otherwise an executable program is created.\n";
            # but the system doesn't support it.
 
            # Just print a warning and add the library to dependency_libs so
-           # that the program can be linked against the static library.
-           echo
-           echo "*** Warning: This library needs some functionality provided by $lib."
-           echo "*** I have the capability to make that library automatically link in when"
-           echo "*** you link to this library.  But I can only do this if you have a"
-           echo "*** shared version of the library, which you do not appear to have."
+           # that the program can be linked against the static library.[++
+           share-to-static-warn  libname = '$lib' ++]
            if test "$module" = yes; then
              echo "*** Therefore, libtool will create a static module, that should work "
              echo "*** as long as the dlopening application is linked with the -dlopen flag."
@@ -2067,12 +2059,8 @@ EOF
                if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
                  newdeplibs="$newdeplibs $i"
                else
-                 droppeddeps=yes
-                 echo
-                 echo "*** Warning: This library needs some functionality provided by $i."
-                 echo "*** I have the capability to make that library automatically link in when"
-                 echo "*** you link to this library.  But I can only do this if you have a"
-                 echo "*** shared version of the library, which you do not appear to have."
+                 droppeddeps=yes[++
+                 share-to-static-warn  libname = '$i' ++]
                fi
              else
                newdeplibs="$newdeplibs $i"
@@ -2097,12 +2085,8 @@ EOF
                  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
                    newdeplibs="$newdeplibs $i"
                  else
-                   droppeddeps=yes
-                   echo
-                   echo "*** Warning: This library needs some functionality provided by $i."
-                   echo "*** I have the capability to make that library automatically link in when"
-                   echo "*** you link to this library.  But I can only do this if you have a"
-                   echo "*** shared version of the library, which you do not appear to have."
+                   droppeddeps=yes[++
+                   share-to-static-warn  libname = '$i' ++]
                  fi
                else
                  droppeddeps=yes
@@ -2157,12 +2141,8 @@ EOF
                    done
              done
              if test -n "$a_deplib" ; then
-               droppeddeps=yes
-               echo
-               echo "*** Warning: This library needs some functionality provided by $a_deplib."
-               echo "*** I have the capability to make that library automatically link in when"
-               echo "*** you link to this library.  But I can only do this if you have a"
-               echo "*** shared version of the library, which you do not appear to have."
+               droppeddeps=yes[++
+               share-to-static-warn  libname = '$a_deplib' ++]
              fi
            else
              # Add a -L argument.
@@ -2191,12 +2171,8 @@ EOF
                done
              done
              if test -n "$a_deplib" ; then
-               droppeddeps=yes
-               echo
-               echo "*** Warning: This library needs some functionality provided by $a_deplib."
-               echo "*** I have the capability to make that library automatically link in when"
-               echo "*** you link to this library.  But I can only do this if you have a"
-               echo "*** shared version of the library, which you do not appear to have."
+               droppeddeps=yes[++
+               share-to-static-warn  libname = '$a_deplib' ++]
              fi
            else
              # Add a -L argument.
diff --git a/exe/ltmacros.tpl b/exe/ltmacros.tpl
new file mode 100644 (file)
index 0000000..b9d746b
--- /dev/null
@@ -0,0 +1,29 @@
+[= AutoGen5 Template in=ltmain.in =]
+[=
+
+DEFINE test-or-exit
+
+=]if ([=test=]) > /dev/null 2>&1 ; then[=
+  invert "  :\nelse"=]
+  $echo "$modename: [=msg=]" 1>&2
+  $echo "$help" 1>&2
+  exit 1
+fi[=
+
+ENDDEF  =][=
+
+
+DEFINE share-to-static-warn
+
+=]
+cat 1>&2 <<_EOF_
+*** Warning: This library needs some functionality provided by [=libname=].
+*** I can automatically link to that library when you link
+*** to this library, but I can only do this if you have a shared
+*** version of the library.  You do not appear to have one.[=
+
+#  Right here would be a *really* good place to to add some hints
+   about where to look to find info about making a shared version ... =]
+_EOF_[=
+
+ENDDEF  =]
index 815a432965f975507340b7d9267c59204f234e43..0f444bdfec15777a8562bdee39219948253e066e 100644 (file)
@@ -19,8 +19,8 @@ STRDEFS = ltstr.def \
        lt_base.def      lt_clean.def     lt_compile.def   lt_execute.def \
        lt_finish.def    lt_install.def   lt_link.def
 
-ltmain.in : $(STRDEFS) ltmain.tpl
-       autogen -T ltmain.tpl ltstr.def
+ltmain.in : $(STRDEFS) ltmain.tpl ltmacros.tpl
+       autogen -T ltmain.tpl -l ltmacros.tpl ltstr.def
 
 ltopts.c : ltopts.def
        autogen ltopts.def
@@ -28,8 +28,8 @@ ltopts.c : ltopts.def
 ltopts.o : ltopts.c
        $(CC) -c -o ltopts.o -I/usr/local/include ltopts.c
 
-ltstr.c : $(STRDEFS) ltstr.tpl
-       autogen -T ltstr.tpl ltstr.def
+ltstr.c : $(STRDEFS) ltstr.tpl ltmacros.tpl
+       autogen -T ltstr.tpl -l ltmacros.tpl ltstr.def
 
 gen : ltmain.in ltstr.c ltopts.c
 
index 4120e9bf1a9378d2a21c330e56f2a5ec3cc6e0dc..c99c3c94345bda13d5ed28ffb630c35b6a734847 100644 (file)
@@ -1,16 +1,5 @@
 [= AutoGen5 Template in=ltmain.in =]
-[=( dne "# " "# " )=][=
-
-DEFINE test-or-exit
-
-=]if ([=test=]) > /dev/null 2>&1 ; then[=
-  invert "  :\nelse"=]
-  $echo "$modename: [=msg=]" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-fi[=
-
-ENDDEF  =]
+[=( dne "# " "# " )=]
 #
 # ltmain.sh - Provide generalized library-building support services.
 # NOTE: Changing this file will not affect anything until you rerun ltconfig.
index 9af29937888639fff3b8e323c7fa62df8ffc541e..ea1554295a42a0c6c11847e2480b721eaca0412d 100644 (file)
@@ -2,22 +2,11 @@
 [=( dne " *  " "/*  " )=]
  *
  *  Strings that, when written from 'C', must be the same as
- *  the strings typed in the definition files.
+ *  the strings typed in the definition and template files.
  */[=
 
 IF (== (suffix) "h") =][=
 
-DEFINE test-or-exit
-
-=]if ([=test=]) > /dev/null 2>&1 ; then[=
-  invert "  :\nelse"=]
-  $echo "$modename: [=msg=]" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-fi[=
-
-ENDDEF  =][=
-
   (define guard (string-append "HDRGRD_" (string-upcase!
                 (string->c-name! (out-name)) )))
   (define hdr-name (out-name)) =]