diff options
Diffstat (limited to 'doc/user/parseconfig.xml')
-rw-r--r-- | doc/user/parseconfig.xml | 69 |
1 files changed, 48 insertions, 21 deletions
diff --git a/doc/user/parseconfig.xml b/doc/user/parseconfig.xml index 8f767e2..205416b 100644 --- a/doc/user/parseconfig.xml +++ b/doc/user/parseconfig.xml @@ -1,6 +1,27 @@ +<?xml version='1.0'?> +<!DOCTYPE sconsdoc [ + <!ENTITY % scons SYSTEM "../scons.mod"> + %scons; + + <!ENTITY % builders-mod SYSTEM "../generated/builders.mod"> + %builders-mod; + <!ENTITY % functions-mod SYSTEM "../generated/functions.mod"> + %functions-mod; + <!ENTITY % tools-mod SYSTEM "../generated/tools.mod"> + %tools-mod; + <!ENTITY % variables-mod SYSTEM "../generated/variables.mod"> + %variables-mod; +]> + +<section id="sect-parseconfig" + 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>Finding Installed Library Information: the &ParseConfig; Function</title> + <!-- - Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation + 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 @@ -61,12 +82,14 @@ </para> - <programlisting> - env = Environment() - env['CPPPATH'] = ['/lib/compat'] - env.ParseConfig("pkg-config x11 --cflags --libs") - print env['CPPPATH'] - </programlisting> + <scons_example name="parseconfig_ex1"> + <file name="SConstruct" printme="1"> +env = Environment() +env['CPPPATH'] = ['/lib/compat'] +env.ParseConfig("pkg-config x11 --cflags --libs") +print env['CPPPATH'] + </file> + </scons_example> <para> @@ -82,15 +105,15 @@ no longer reports back an include directory. Since this is just for example anyway, we're just hard-coding the output. - <scons_output example="ParseConfig1"> + <scons_output example="parseconfig_ex1" suffix="1"> <scons_output_command>scons -Q</scons_output_command> </scons_output> --> <screen> - % <userinput>scons -Q</userinput> - ['/lib/compat', '/usr/X11/include'] - scons: `.' is up to date. +% <userinput>scons -Q</userinput> +['/lib/compat', '/usr/X11/include'] +scons: `.' is up to date. </screen> <para> @@ -111,12 +134,14 @@ </para> - <programlisting> - env = Environment() - env.ParseConfig("pkg-config x11 --cflags --libs") - env.ParseConfig("pkg-config x11 --cflags --libs") - print env['CPPPATH'] - </programlisting> + <scons_example name="parseconfig_ex2"> + <file name="SConstruct" printme="1"> +env = Environment() +env.ParseConfig("pkg-config x11 --cflags --libs") +env.ParseConfig("pkg-config x11 --cflags --libs") +print env['CPPPATH'] + </file> + </scons_example> <!-- This is how we used to generate the screen output below, but @@ -124,13 +149,15 @@ no longer reports back an include directory. Since this is just for example anyway, we're just hard-coding the output. - <scons_output example="ParseConfig2"> + <scons_output example="parseconfig_ex2" suffix="1"> <scons_output_command>scons -Q</scons_output_command> </scons_output> --> <screen> - % <userinput>scons -Q</userinput> - ['/usr/X11/include'] - scons: `.' is up to date. +% <userinput>scons -Q</userinput> +['/usr/X11/include'] +scons: `.' is up to date. </screen> + +</section> |