summaryrefslogtreecommitdiff
path: root/doc/reference/Library.xml
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2014-04-26 15:11:58 +0200
committerLuca Falavigna <dktrkranz@debian.org>2014-04-26 15:11:58 +0200
commita3a0ab66f0da855e75e3a0e2acfb8aa106b46510 (patch)
tree5352edff1387c3d7e5a8b49ec56524f085c22782 /doc/reference/Library.xml
parent51fa4e4acb6fc8fc7a2af0fbdc21fd1e8feddb3a (diff)
parent140d836e9cd54fb67b969fd82ef7ed19ba574d40 (diff)
Merge tag 'upstream/2.3.1'
Upstream version 2.3.1
Diffstat (limited to 'doc/reference/Library.xml')
-rw-r--r--doc/reference/Library.xml52
1 files changed, 33 insertions, 19 deletions
diff --git a/doc/reference/Library.xml b/doc/reference/Library.xml
index 19a3e96..b005ff7 100644
--- a/doc/reference/Library.xml
+++ b/doc/reference/Library.xml
@@ -1,6 +1,18 @@
+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+ <!ENTITY % scons SYSTEM "../scons.mod">
+ %scons;
+]>
+
+<section id="sect-Library"
+ xmlns="http://www.scons.org/dbxsd/v1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0/scons.xsd scons.xsd">
+<title>The Library Builder</title>
+
<!--
- Copyright (c) 2001, 2002, 2003 Steven Knight
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -67,16 +79,16 @@ be generated (the rest will disappear!).
<title>Linking With a Library</title>
<programlisting>
- env = Environment(CC = 'gcc',
- LIBS = 'world')
- env.Program('hello.c')
+env = Environment(CC = 'gcc',
+ LIBS = 'world')
+env.Program('hello.c')
</programlisting>
<literallayout>
- % <userinput>scons</userinput>
- gcc -c hello.c -o hello.o
- gcc -c world.c -o world.o
- gcc -o hello hello.o -lworld
+% <userinput>scons</userinput>
+gcc -c hello.c -o hello.o
+gcc -c world.c -o world.o
+gcc -o hello hello.o -lworld
</literallayout>
</section>
@@ -85,20 +97,20 @@ be generated (the rest will disappear!).
<title>Creating a Library</title>
<programlisting>
- env = Environment(CC = 'gcc',
- LIBS = 'world')
- env.Program('hello.c')
- env.Library('world.c')
+env = Environment(CC = 'gcc',
+ LIBS = 'world')
+env.Program('hello.c')
+env.Library('world.c')
</programlisting>
<literallayout>
- % <userinput>scons</userinput>
- gcc -c hello.c -o hello.o
- gcc -c world.c -o world.o
- ar r libworld.a world.o
- ar: creating libworld.a
- ranlib libworld.a
- gcc -o hello hello.o libworld.a
+% <userinput>scons</userinput>
+gcc -c hello.c -o hello.o
+gcc -c world.c -o world.o
+ar r libworld.a world.o
+ar: creating libworld.a
+ranlib libworld.a
+gcc -o hello hello.o libworld.a
</literallayout>
</section>
@@ -150,3 +162,5 @@ is linked, and, of course, C<gcc> will be used to compile both modules:
</para>
</section>
+
+</section>