From 9be7b07c0c453792c750e0842e81eb8cb9dbffc2 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Sun, 27 Jun 2010 18:33:04 +0000 Subject: Issue 5062: XML fixes in the User's Guide. (Dirk Baechle) --- doc/user/builders-commands.in | 2 +- doc/user/builders-writing.in | 6 ++---- doc/user/builders-writing.xml | 2 -- doc/user/command-line.in | 4 ++-- doc/user/command-line.xml | 7 +++++-- doc/user/depends.in | 2 +- doc/user/environments.in | 18 ++++++++++-------- doc/user/environments.xml | 6 ++++-- doc/user/factories.in | 2 +- doc/user/hierarchy.in | 2 +- doc/user/java.in | 4 ++-- doc/user/main.xml | 4 ++-- doc/user/misc.in | 8 ++++---- doc/user/misc.xml | 2 +- doc/user/output.in | 2 +- doc/user/preface.in | 4 ++-- doc/user/repositories.in | 4 ++-- doc/user/repositories.xml | 4 ++-- doc/user/sconf.in | 4 ++-- doc/user/sconf.xml | 2 +- doc/user/simple.in | 4 ++-- doc/user/tasks.in | 4 ++-- doc/user/troubleshoot.in | 8 ++++---- src/CHANGES.txt | 4 ++++ 24 files changed, 58 insertions(+), 51 deletions(-) diff --git a/doc/user/builders-commands.in b/doc/user/builders-commands.in index d824052..d0aae61 100644 --- a/doc/user/builders-commands.in +++ b/doc/user/builders-commands.in @@ -72,7 +72,7 @@ env = Environment() - env.Command('foo.out', 'foo.in', "sed 's/x/y/' < $SOURCE > $TARGET") + env.Command('foo.out', 'foo.in', "sed 's/x/y/' < $SOURCE > $TARGET") foo.in diff --git a/doc/user/builders-writing.in b/doc/user/builders-writing.in index 2410831..1da45a5 100644 --- a/doc/user/builders-writing.in +++ b/doc/user/builders-writing.in @@ -823,7 +823,6 @@ This functionality could be invoked as in the following example: cat - @@ -842,7 +841,6 @@ This functionality could be invoked as in the following example: MY_EMITTER = modify2) env1.Foo('file1') env2.Foo('file2') - @@ -931,7 +929,7 @@ This functionality could be invoked as in the following example: - + def TOOL_ADD_HEADER(env): """A Tool to add a header from $HEADER to the source file""" add_header = Builder(action=['echo "$HEADER" > $TARGET', @@ -998,7 +996,7 @@ This functionality could be invoked as in the following example: - + from SCons.Script import * # for Execute and Mkdir def build_id(): """Return a build ID (stub version)""" diff --git a/doc/user/builders-writing.xml b/doc/user/builders-writing.xml index 99dfc94..21aa656 100644 --- a/doc/user/builders-writing.xml +++ b/doc/user/builders-writing.xml @@ -703,7 +703,6 @@ This functionality could be invoked as in the following example: import os env1['ENV']['PATH'] = env2['ENV']['PATH'] + os.pathsep + os.getcwd() env2['ENV']['PATH'] = env2['ENV']['PATH'] + os.pathsep + os.getcwd() - @@ -722,7 +721,6 @@ This functionality could be invoked as in the following example: MY_EMITTER = modify2) env1.Foo('file1') env2.Foo('file2') - diff --git a/doc/user/command-line.in b/doc/user/command-line.in index 6fb8299..abf8953 100644 --- a/doc/user/command-line.in +++ b/doc/user/command-line.in @@ -221,7 +221,7 @@ - if not GetOption('help'): SConscript('src/SConscript', export='env') @@ -2195,7 +2195,7 @@ Second, the contents of the &DEFAULT_TARGETS; list change - in response to calls to the &Default: function, + in response to calls to the &Default; function, as you can see from the following &SConstruct; file: diff --git a/doc/user/command-line.xml b/doc/user/command-line.xml index 4b75eba..5ed8ed8 100644 --- a/doc/user/command-line.xml +++ b/doc/user/command-line.xml @@ -214,7 +214,10 @@ - + + if not GetOption('help'): + SConscript('src/SConscript', export='env') + @@ -2107,7 +2110,7 @@ Second, the contents of the &DEFAULT_TARGETS; list change - in response to calls to the &Default;: function, + in response to calls to the &Default; function, as you can see from the following &SConstruct; file: diff --git a/doc/user/depends.in b/doc/user/depends.in index 7191fa2..4428a63 100644 --- a/doc/user/depends.in +++ b/doc/user/depends.in @@ -386,7 +386,7 @@ - So configured, &SCons will still behave like + So configured, &SCons; will still behave like it does when using Decider('MD5'): diff --git a/doc/user/environments.in b/doc/user/environments.in index 6672ea7..f767676 100644 --- a/doc/user/environments.in +++ b/doc/user/environments.in @@ -347,7 +347,7 @@ environment, of directory names, suffixes, etc. The external environment is the set of variables in the user's environment - at the time the user runs &SCons. + at the time the user runs &SCons;. These variables are available within the &SConscript; files through the Python os.environ dictionary. See , below. @@ -406,7 +406,7 @@ environment, of directory names, suffixes, etc. Unlike &Make;, &SCons; does not automatically copy or import values between different environments - (with the exception of explicit clones of &consenvs, + (with the exception of explicit clones of &consenvs;, which inherit values from their parent). This is a deliberate design choice to make sure that builds are, @@ -638,7 +638,7 @@ environment, of directory names, suffixes, etc. for key in ['OBJSUFFIX', 'LIBSUFFIX', 'PROGSUFFIX']: print "key = %s, value = %s" % (key, dict[key]) - + @@ -779,18 +779,20 @@ environment, of directory names, suffixes, etc. If a problem occurs when expanding a construction variable, by default it is expanded to '' (a null string), and will not cause scons to fail. - + + env = Environment() - print "value is:", env.subst( '->$MISSING<-' ) + print "value is:", env.subst( '->$MISSING<-' ) scons -Q - + + This default behaviour can be changed using the &AllowSubstExceptions; function. When a problem occurs with a variable expansion it generates @@ -810,7 +812,7 @@ environment, of directory names, suffixes, etc. AllowSubstExceptions() env = Environment() - print "value is:", env.subst( '->$MISSING<-' ) + print "value is:", env.subst( '->$MISSING<-' ) @@ -830,7 +832,7 @@ environment, of directory names, suffixes, etc. AllowSubstExceptions(IndexError, NameError, ZeroDivisionError) env = Environment() - print "value is:", env.subst( '->${1 / 0}<-' ) + print "value is:", env.subst( '->${1 / 0}<-' ) diff --git a/doc/user/environments.xml b/doc/user/environments.xml index 6970a92..b2a8505 100644 --- a/doc/user/environments.xml +++ b/doc/user/environments.xml @@ -779,7 +779,8 @@ environment, of directory names, suffixes, etc. If a problem occurs when expanding a construction variable, by default it is expanded to '' (a null string), and will not cause scons to fail. - + + env = Environment() print "value is:", env.subst( '->$MISSING<-' ) @@ -790,7 +791,8 @@ environment, of directory names, suffixes, etc. value is: -><- scons: `.' is up to date. - + + This default behaviour can be changed using the &AllowSubstExceptions; function. When a problem occurs with a variable expansion it generates diff --git a/doc/user/factories.in b/doc/user/factories.in index 4451807..cbe313a 100644 --- a/doc/user/factories.in +++ b/doc/user/factories.in @@ -209,7 +209,7 @@ Of course, like all of these &Action; factories, - the &Delete factory also expands + the &Delete; factory also expands &cv-link-TARGET; and &cv-link-SOURCE; variables appropriately. For example: diff --git a/doc/user/hierarchy.in b/doc/user/hierarchy.in index 4286556..d70633d 100644 --- a/doc/user/hierarchy.in +++ b/doc/user/hierarchy.in @@ -688,7 +688,7 @@ make no difference to the build. Sometimes, you would like to be able to use information from a subsidiary - &SConscript file in some way. + &SConscript; file in some way. For example, suppose that you want to create one library from source files diff --git a/doc/user/java.in b/doc/user/java.in index e1675c1..4561a4c 100644 --- a/doc/user/java.in +++ b/doc/user/java.in @@ -390,7 +390,7 @@ You can generate C header and source files for implementing native methods, by using the &b-link-JavaH; Builder. - There are several ways of using the &JavaH Builder. + There are several ways of using the &JavaH; Builder. One typical invocation might look like: @@ -636,7 +636,7 @@ As it did with the &b-link-JavaH; Builder, &SCons; remembers the class directory and passes it as the option - to &rmic: + to &rmic;: diff --git a/doc/user/main.xml b/doc/user/main.xml index df287a7..5bf274a 100644 --- a/doc/user/main.xml +++ b/doc/user/main.xml @@ -122,10 +122,10 @@ Revision &buildrevision; (&builddate;) - 2004, 2005, 2006, 2007, 2008 + 2004, 2005, 2006, 2007, 2008, 2009, 2010 - 2004, 2005, 2006, 2007, 2008 + 2004, 2005, 2006, 2007, 2008, 2009, 2010 Steven Knight diff --git a/doc/user/misc.in b/doc/user/misc.in index 437d4fe..e7ab480 100644 --- a/doc/user/misc.in +++ b/doc/user/misc.in @@ -82,7 +82,7 @@ - And then &SCons will exit with the following error + And then &SCons; will exit with the following error message when a user runs it with an unsupported earlier version of Python: @@ -151,7 +151,7 @@ - And then &SCons will exit with the following error + And then &SCons; will exit with the following error message when a user runs it with an unsupported earlier version of &SCons;: @@ -274,13 +274,13 @@ - exists - + exists + diff --git a/doc/user/misc.xml b/doc/user/misc.xml index 3cd3de7..05fe62e 100644 --- a/doc/user/misc.xml +++ b/doc/user/misc.xml @@ -263,7 +263,7 @@ headers = [ 'nonesuch.h', 'config.h', 'private.h', 'dist.h'] for hdr in headers: print '%-12s' % ('%s:' % hdr), FindFile(hdr, includes) - + % scons -Q diff --git a/doc/user/output.in b/doc/user/output.in index ca2034a..1383fc0 100644 --- a/doc/user/output.in +++ b/doc/user/output.in @@ -490,7 +490,7 @@ over how to print each evaluated node by passing a Python function (or other Python callable) - to the &Progress function. + to the &Progress; function. Your function will be called for each evaluated node, allowing you to diff --git a/doc/user/preface.in b/doc/user/preface.in index a76fa1c..6f3140b 100644 --- a/doc/user/preface.in +++ b/doc/user/preface.in @@ -104,7 +104,7 @@ There are a few overriding principles - we try to live up to in designing and implementing &SCons: + we try to live up to in designing and implementing &SCons;: @@ -418,7 +418,7 @@ - If you want to receive announcements about &SCons, + If you want to receive announcements about &SCons;, join the low-volume &scons-announce; mailing list. diff --git a/doc/user/repositories.in b/doc/user/repositories.in index d4ed418..33de530 100644 --- a/doc/user/repositories.in +++ b/doc/user/repositories.in @@ -210,9 +210,9 @@ in the repository trees, though, it will be unable to find the #include files. If, for example, the &hello_c; file in - our previous example includes the &hello.h; + our previous example includes the &hello_h; in its current directory, - and the &hello.h; only exists in the repository: + and the &hello_h; only exists in the repository: diff --git a/doc/user/repositories.xml b/doc/user/repositories.xml index 766d8bc..2600381 100644 --- a/doc/user/repositories.xml +++ b/doc/user/repositories.xml @@ -193,9 +193,9 @@ in the repository trees, though, it will be unable to find the #include files. If, for example, the &hello_c; file in - our previous example includes the &hello;.h; + our previous example includes the &hello_h; in its current directory, - and the &hello;.h; only exists in the repository: + and the &hello_h; only exists in the repository: diff --git a/doc/user/sconf.in b/doc/user/sconf.in index 8ac4530..584a82e 100644 --- a/doc/user/sconf.in +++ b/doc/user/sconf.in @@ -31,7 +31,7 @@ figuring out what libraries or header files are available on the local system. This section describes how to use - this &SCons feature. + this &SCons; feature. @@ -446,7 +446,7 @@ when removing targets doesn't hurt anything, it's usually unnecessary. You can avoid this by using the - &GetOption(); method to + &GetOption; method to check whether the (clean) option has been invoked on the command line: diff --git a/doc/user/sconf.xml b/doc/user/sconf.xml index b6e02eb..f5db744 100644 --- a/doc/user/sconf.xml +++ b/doc/user/sconf.xml @@ -446,7 +446,7 @@ when removing targets doesn't hurt anything, it's usually unnecessary. You can avoid this by using the - &GetOption;(); method to + &GetOption; method to check whether the (clean) option has been invoked on the command line: diff --git a/doc/user/simple.in b/doc/user/simple.in index 9594501..8a25be5 100644 --- a/doc/user/simple.in +++ b/doc/user/simple.in @@ -360,7 +360,7 @@ One important way in which the &SConstruct; file is not exactly like a normal Python script, - and is more like a &Makefile, + and is more like a &Makefile;, is that the order in which the &SCons; functions are called in the &SConstruct; file @@ -453,7 +453,7 @@ Notice also that &SCons; built the &goodbye; program first, - even though the "reading &SConscript" output + even though the "reading &SConscript;" output shows that we called Program('hello.c') first in the &SConstruct; file. diff --git a/doc/user/tasks.in b/doc/user/tasks.in index de42cd1..79787a6 100644 --- a/doc/user/tasks.in +++ b/doc/user/tasks.in @@ -99,14 +99,14 @@ env.Append(CPPPATH = "#") ## Header example env.Append(BUILDERS = - {'Copy1' : Builder(action = 'cat < $SOURCE > $TARGET', + {'Copy1' : Builder(action = 'cat < $SOURCE > $TARGET', suffix='.h', src_suffix='.bar')}) env.Copy1('test.bar') # produces test.h from test.bar. env.Program('app','main.cpp') # indirectly depends on test.bar ## Source file example env.Append(BUILDERS = - {'Copy2' : Builder(action = 'cat < $SOURCE > $TARGET', + {'Copy2' : Builder(action = 'cat < $SOURCE > $TARGET', suffix='.cpp', src_suffix='.bar2')}) foo = env.Copy2('foo.bar2') # produces foo.cpp from foo.bar2. env.Program('app2',['main2.cpp'] + foo) # compiles main2.cpp and foo.cpp into app2. diff --git a/doc/user/troubleshoot.in b/doc/user/troubleshoot.in index 3e0bfdb..392caf6 100644 --- a/doc/user/troubleshoot.in +++ b/doc/user/troubleshoot.in @@ -34,7 +34,7 @@ &SCons; is no different. This appendix contains a number of different ways in which you can - get some additional insight into &SCons' behavior. + get some additional insight into &SCons;' behavior. @@ -410,12 +410,12 @@ - The --tree option only prints + The --tree option only prints the dependency graph for the specified targets (or the default target(s) if none are specified on the command line). So if you specify a target like f2.o on the command line, - the --tree option will only + the --tree option will only print the dependency graph for that file: @@ -722,7 +722,7 @@ - For example, the following &SConstruct file: + For example, the following &SConstruct; file: diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 847c01d..831546f 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -7,6 +7,10 @@ RELEASE 2.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE + From Dirk Baechle: + + - XML fixes in User's Guide. + From Joe Zuntz: - Fixed a case-sensitivity problem with Fortran modules. -- cgit v0.12