libtool-commit
[Top][All Lists]
Advanced

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

branch master updated: libtool: Fix documentation for demo compile mode


From: Ileana Dumitrescu
Subject: branch master updated: libtool: Fix documentation for demo compile mode commands
Date: Wed, 20 Mar 2024 11:54:08 -0400

This is an automated email from the git hooks/post-receive script.

ildumi pushed a commit to branch master
in repository libtool.

The following commit(s) were added to refs/heads/master by this push:
     new 98ed9b7b libtool: Fix documentation for demo compile mode commands
98ed9b7b is described below

commit 98ed9b7b51fba00e36b0f8a76cf7a5a2e5c5105e
Author: Ileana Dumitrescu <ileanadumitrescu95@gmail.com>
AuthorDate: Wed Mar 20 17:48:51 2024 +0200

    libtool: Fix documentation for demo compile mode commands
    
    The demo compile mode commands in Chapter 3 fail to compile since
    the source files include a header file that is not in the header search
    list. The config.h file is in the local folder. Before this fix, the
    compile mode commands would return errors like below:
    
    main.c:1:10: fatal error: config.h: No such file or directory
        1 | #include <config.h>
          |          ^~~~~~~~~~
    compilation terminated.
    
    The '-I' option has been added to the gcc commands to specify that the
    local folder should be searched for header files.
    
    * doc/libtool.texi: Add option to demo compile mode commands
---
 doc/libtool.texi | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/doc/libtool.texi b/doc/libtool.texi
index c3253e04..0a57a5e1 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -481,7 +481,7 @@ To create an object file from a source file, the compiler 
is invoked
 with the @option{-c} flag (and any other desired flags):
 
 @example
-burger$ @kbd{gcc -g -O -c main.c}
+burger$ @kbd{gcc -I. -g -O -c main.c}
 burger$
 @end example
 
@@ -493,8 +493,8 @@ static library is as simple as creating object files that 
are linked to
 form an executable:
 
 @example
-burger$ @kbd{gcc -g -O -c foo.c}
-burger$ @kbd{gcc -g -O -c hello.c}
+burger$ @kbd{gcc -I. -g -O -c foo.c}
+burger$ @kbd{gcc -I. -g -O -c hello.c}
 burger$
 @end example
 
@@ -521,10 +521,10 @@ simply invoke libtool with the standard compilation 
command as
 arguments (@pxref{Compile mode}):
 
 @example
-a23$ @kbd{libtool --mode=compile gcc -g -O -c foo.c}
-gcc -g -O -c foo.c -o foo.o
-a23$ @kbd{libtool --mode=compile gcc -g -O -c hello.c}
-gcc -g -O -c hello.c -o hello.o
+a23$ @kbd{libtool --mode=compile gcc -I. -g -O -c foo.c}
+gcc -I. -g -O -c foo.c -o foo.o
+a23$ @kbd{libtool --mode=compile gcc -I. -g -O -c hello.c}
+gcc -I. -g -O -c hello.c -o hello.o
 a23$
 @end example
 
@@ -553,10 +553,10 @@ additional PIC object by inserting the appropriate PIC 
generation
 flags into the compilation command:
 
 @example
-burger$ @kbd{libtool --mode=compile gcc -g -O -c foo.c}
+burger$ @kbd{libtool --mode=compile gcc -I. -g -O -c foo.c}
 mkdir @value{objdir}
-gcc -g -O -c foo.c  -fPIC -DPIC -o @value{objdir}/foo.o
-gcc -g -O -c foo.c -o foo.o >/dev/null 2>&1
+gcc -I. -g -O -c foo.c  -fPIC -DPIC -o @value{objdir}/foo.o
+gcc -I. -g -O -c foo.c -o foo.o >/dev/null 2>&1
 burger$
 @end example
 
@@ -589,9 +589,9 @@ inside @samp{#ifdef PIC} for example), you can turn off 
suppression by
 passing the @option{-no-suppress} option to libtool's compile mode:
 
 @example
-burger$ @kbd{libtool --mode=compile gcc -no-suppress -g -O -c hello.c}
-gcc -g -O -c hello.c  -fPIC -DPIC -o @value{objdir}/hello.o
-gcc -g -O -c hello.c -o hello.o
+burger$ @kbd{libtool --mode=compile gcc -no-suppress -I. -g -O -c hello.c}
+gcc -I. -g -O -c hello.c  -fPIC -DPIC -o @value{objdir}/hello.o
+gcc -I. -g -O -c hello.c -o hello.o
 burger$
 @end example
 



reply via email to

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