summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-05-13 03:59:27 +0000
committerBruce Korb <bkorb@gnu.org>2001-05-13 03:59:27 +0000
commitd23b3ec3073c8b4e34e57b87b76f4d021a3825b7 (patch)
tree8a4e0da0d472f5e682cf6ea9c3bea9734b7e098a
parent5b45fd21ef0947c9034a15b245d9bdff7536881c (diff)
downloadlibtool-d23b3ec3073c8b4e34e57b87b76f4d021a3825b7.tar.gz
make a more dramatic demo
-rw-r--r--exe/lt_link.def48
-rw-r--r--exe/ltmacros.tpl29
-rw-r--r--exe/ltmain.mk8
-rw-r--r--exe/ltmain.tpl13
-rw-r--r--exe/ltstr.tpl13
5 files changed, 47 insertions, 64 deletions
diff --git a/exe/lt_link.def b/exe/lt_link.def
index ac672d6b..ecd05b23 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 00000000..b9d746b3
--- /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 815a4329..0f444bdf 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 4120e9bf..c99c3c94 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 9af29937..ea155429 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)) =]