From: Andreas Jaeger Date: Sun, 13 May 2001 03:59:27 +0000 (+0000) Subject: make a more dramatic demo X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d23b3ec3073c8b4e34e57b87b76f4d021a3825b7;p=thirdparty%2Flibtool.git make a more dramatic demo --- diff --git a/exe/lt_link.def b/exe/lt_link.def index ac672d6b7..ecd05b233 100644 --- a/exe/lt_link.def +++ b/exe/lt_link.def @@ -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 index 000000000..b9d746b30 --- /dev/null +++ b/exe/ltmacros.tpl @@ -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 =] diff --git a/exe/ltmain.mk b/exe/ltmain.mk index 815a43296..0f444bdfe 100644 --- a/exe/ltmain.mk +++ b/exe/ltmain.mk @@ -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 diff --git a/exe/ltmain.tpl b/exe/ltmain.tpl index 4120e9bf1..c99c3c943 100644 --- a/exe/ltmain.tpl +++ b/exe/ltmain.tpl @@ -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. diff --git a/exe/ltstr.tpl b/exe/ltstr.tpl index 9af299378..ea1554295 100644 --- a/exe/ltstr.tpl +++ b/exe/ltstr.tpl @@ -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)) =]