libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mode usage in Libtool documentation.


From: Boehne, Robert
Subject: Mode usage in Libtool documentation.
Date: Fri, 08 Nov 2002 11:19:48 -0600

Hello,

This patch adds a --mode=* flag to every example in the documentation.

Ok to commit?

ChangeLog entry:

2002-11-08  Robert Boehne  <address@hidden>

        * doc/libtool.texi: Add --mode=* to every example using libtool.


-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  rboehne AT ricardo-us DOT com

Index: doc/libtool.texi
===================================================================
RCS file: /cvsroot/libtool/libtool/doc/libtool.texi,v
retrieving revision 1.128
diff -u -5 -r1.128 libtool.texi
--- doc/libtool.texi    3 Nov 2002 17:35:37 -0000       1.128
+++ doc/libtool.texi    8 Nov 2002 17:06:38 -0000
@@ -499,14 +499,14 @@
 To create library object files for @file{foo.c} and @file{hello.c},
 simply invoke libtool with the standard compilation command as
 arguments (@pxref{Compile mode}):
 
 @example
-a23$ @kbd{libtool gcc -g -O -c foo.c}
+a23$ @kbd{libtool --mode=compile gcc -g -O -c foo.c}
 gcc -g -O -c foo.c
 echo timestamp > foo.lo
-a23$ @kbd{libtool gcc -g -O -c hello.c}
+a23$ @kbd{libtool --mode=compile gcc -g -O -c hello.c}
 gcc -g -O -c hello.c
 echo timestamp > hello.lo
 a23$
 @end example
 
@@ -519,15 +519,15 @@
 On shared library systems, libtool automatically inserts the PIC
 generation flags into the compilation command, so that the library
 object and the standard object differ:
 
 @example
-burger$ @kbd{libtool gcc -g -O -c foo.c}
+burger$ @kbd{libtool --mode=compile gcc -g -O -c foo.c}
 gcc -g -O -c -fPIC -DPIC foo.c
 mv -f foo.o foo.lo
 gcc -g -O -c foo.c >/dev/null 2>&1
-burger$ @kbd{libtool gcc -g -O -c hello.c}
+burger$ @kbd{libtool --mode=compile gcc -g -O -c hello.c}
 gcc -g -O -c -fPIC -DPIC hello.c
 mv -f hello.o hello.lo
 gcc -g -O -c hello.c >/dev/null 2>&1
 burger$
 @end example
@@ -568,11 +568,11 @@
 @samp{.la} suffix instead of a @samp{.a} suffix).  The arguments to libtool are
 the same ones you would use to produce an executable named
 @file{libhello.la} with your compiler (@pxref{Link mode}):
 
 @example
-a23$ @kbd{libtool gcc -g -O -o libhello.la foo.o hello.o}
+a23$ @kbd{libtool --mode=link gcc -g -O -o libhello.la foo.o hello.o}
 libtool: cannot build libtool library `libhello.la' from non-libtool \
                 objects
 a23$
 @end example
 
@@ -591,11 +591,11 @@
 installed (in this case, @file{/usr/local/lib})@footnote{If you don't
 specify an @code{rpath}, then libtool builds a libtool convenience
 archive, not a shared library (@pxref{Static libraries}).}:
 
 @example
-a23$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \
+a23$ @kbd{libtool --mode=link gcc -g -O -o libhello.la foo.lo hello.lo \
                 -rpath /usr/local/lib -lm}
 mkdir @value{objdir}
 ar cru @value{objdir}/libhello.a foo.o hello.o
 ranlib @value{objdir}/libhello.a
 creating libhello.la
@@ -603,11 +603,11 @@
 @end example
 
 Now, let's try the same trick on the shared library platform:
 
 @example
-burger$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \
+burger$ @kbd{libtool --mode=link gcc -g -O -o libhello.la foo.lo hello.lo \
                 -rpath /usr/local/lib -lm}
 mkdir @value{objdir}
 ld -Bshareable -o @value{objdir}/libhello.so.0.0 foo.lo hello.lo -lm
 ar cru @value{objdir}/libhello.a foo.o hello.o
 ranlib @value{objdir}/libhello.a
@@ -666,11 +666,11 @@
 @file{../intl/libintl.la}.  This is a design decision to eliminate any
 ambiguity when linking against uninstalled shared libraries.}
 (@pxref{Link mode}):
 
 @example
-a23$ @kbd{libtool gcc -g -O -o hell main.o libhello.la -lm}
+a23$ @kbd{libtool --mode=link gcc -g -O -o hell main.o libhello.la -lm}
 gcc -g -O -o hell main.o ./@value{objdir}/libhello.a -lm
 a23$
 @end example
 
 That looks too simple to be true.  All libtool did was transform
@@ -678,11 +678,11 @@
 that @samp{a23} has no shared libraries.
 
 On @samp{burger} the situation is different:
 
 @example
-burger$ @kbd{libtool gcc -g -O -o hell main.o libhello.la -lm}
+burger$ @kbd{libtool --mode=link gcc -g -O -o hell main.o libhello.la -lm}
 gcc -g -O -o @value{objdir}/hell main.o -L./@value{objdir} -R/usr/local/lib 
-lhello -lm
 creating hell
 burger$
 @end example
 
@@ -700,11 +700,11 @@
 path, you won't be able to run @code{test}.  However, if you use libtool
 to link the already-installed libtool library, it will do The Right
 Thing (TM) for you:
 
 @example
-burger$ @kbd{libtool gcc -g -O -o test test.o /usr/local/lib/libhello.la}
+burger$ @kbd{libtool --mode=link gcc -g -O -o test test.o 
/usr/local/lib/libhello.la}
 gcc -g -O -o @value{objdir}/test test.o -Wl,--rpath
 -Wl,/usr/local/lib /usr/local/lib/libhello.a -lm
 creating test
 burger$
 @end example
@@ -821,11 +821,11 @@
 properly set the library path and run the debugger.  Fortunately, we can
 forget all about the @address@hidden directory, and just run it on
 the executable wrapper (@pxref{Execute mode}):
 
 @example
-burger$ @kbd{libtool gdb hell}
+burger$ @kbd{libtool --mode=execute gdb hell}
 GDB is free software and you are welcome to distribute copies of it
  under certain conditions; type "show copying" to see the conditions.
 There is no warranty for GDB; type "show warranty" for details.
 GDB 4.16 (i386-unknown-netbsd), (C) 1996 Free Software Foundation, Inc.
 (gdb) @kbd{break main}
@@ -867,11 +867,11 @@
 Libtool installation is quite simple, as well.  Just use the
 @code{install} or @code{cp} command that you normally would
 (@pxref{Install mode}):
 
 @example
-a23# @kbd{libtool cp libhello.la /usr/local/lib/libhello.la}
+a23# @kbd{libtool --mode=install cp libhello.la /usr/local/lib/libhello.la}
 cp libhello.la /usr/local/lib/libhello.la
 cp @value{objdir}/libhello.a /usr/local/lib/libhello.a
 ranlib /usr/local/lib/libhello.a
 a23#
 @end example
@@ -882,11 +882,11 @@
 (@pxref{Dlopened modules}).
 
 Here is the shared library example:
 
 @example
-burger# @kbd{libtool install -c libhello.la /usr/local/lib/libhello.la}
+burger# @kbd{libtool --mode=install install -c libhello.la 
/usr/local/lib/libhello.la}
 install -c @value{objdir}/libhello.so.0.0 /usr/local/lib/libhello.so.0.0
 install -c libhello.la /usr/local/lib/libhello.la
 install -c @value{objdir}/libhello.a /usr/local/lib/libhello.a
 ranlib /usr/local/lib/libhello.a
 burger#
@@ -905,15 +905,15 @@
 @samp{-rpath} flag you used to build it.
 
 @cindex postinstallation
 @cindex installation, finishing
 @cindex libraries, finishing installation
-Then, running @samp{libtool -n --finish @var{libdir}} can give you
+Then, running @samp{libtool -n --mode=finish @var{libdir}} can give you
 further hints on what to do (@pxref{Finish mode}):
 
 @example
-burger# @kbd{libtool -n --finish /usr/local/lib}
+burger# @kbd{libtool -n --mode=finish /usr/local/lib}
 PATH="$PATH:/sbin" ldconfig -m /usr/local/lib
 -----------------------------------------------------------------
 Libraries have been installed in:
    /usr/local/lib
 
@@ -985,11 +985,11 @@
 @code{ranlib} commands (or the corresponding GNU automake
 @samp{_LIBRARIES} rules).  You can even install a convenience library
 (but you probably don't want to) using libtool:
 
 @example
-burger$ @kbd{libtool ./install-sh -c libhello.a /local/lib/libhello.a}
+burger$ @kbd{libtool  --mode=install ./install-sh -c libhello.a 
/local/lib/libhello.a}
 ./install-sh -c libhello.a /local/lib/libhello.a
 ranlib /local/lib/libhello.a
 burger$
 @end example
 
@@ -2401,11 +2401,11 @@
 @address@hidden option to the link line when you create your
 library.  To make an example of our
 @file{libhello} that depends on @file{libm}:
 
 @example
-burger$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \
+burger$ @kbd{libtool --mode=link gcc -g -O -o libhello.la foo.lo hello.lo \
                 -rpath /usr/local/lib -lm}
 burger$
 @end example
 
 When you link a program against @file{libhello}, you don't need to
@@ -2498,11 +2498,11 @@
 For example, if we wanted to build a shared library, @file{libhello},
 that would later be dlopened by an application, we would add
 @samp{-module} to the other link flags:
 
 @example
-burger$ @kbd{libtool gcc -module -o libhello.la foo.lo \
+burger$ @kbd{libtool gcc --mode=link -module -o libhello.la foo.lo \
                 hello.lo -rpath /usr/local/lib -lm}
 burger$
 @end example
 
 If symbols from your @emph{executable} are needed to satisfy unresolved
@@ -2510,11 +2510,11 @@
 @samp{-export-dynamic}.
 You should use @samp{-export-dynamic} while linking the executable that calls
 dlopen:
 
 @example
-burger$ @kbd{libtool gcc -export-dynamic -o hell-dlopener main.o}
+burger$ @kbd{libtool gcc --mode=link -export-dynamic -o hell-dlopener main.o}
 burger$
 @end example
 
 @node Dlpreopening
 @section Dlpreopening

reply via email to

[Prev in Thread] Current Thread [Next in Thread]