summaryrefslogtreecommitdiff
path: root/engine/SCons/Script
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-11-16 05:58:13 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-11-16 05:58:13 +0100
commit6a570afd28bccdb118edde36488ba9834494d6c7 (patch)
tree162100eb912a704d570559c85484ae6d6943fc76 /engine/SCons/Script
parent72c39ad485d174c2e8e1fef34b8e9e392a94458a (diff)
Imported Upstream version 2.4.1upstream/2.4.1
Diffstat (limited to 'engine/SCons/Script')
-rw-r--r--engine/SCons/Script/Interactive.py2
-rw-r--r--engine/SCons/Script/Main.py5
-rw-r--r--engine/SCons/Script/SConsOptions.py4
-rw-r--r--engine/SCons/Script/SConscript.py6
-rw-r--r--engine/SCons/Script/__init__.py28
5 files changed, 32 insertions, 13 deletions
diff --git a/engine/SCons/Script/Interactive.py b/engine/SCons/Script/Interactive.py
index afcde0c..afb35af 100644
--- a/engine/SCons/Script/Interactive.py
+++ b/engine/SCons/Script/Interactive.py
@@ -20,7 +20,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Script/Interactive.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+__revision__ = "src/engine/SCons/Script/Interactive.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
__doc__ = """
SCons interactive mode
diff --git a/engine/SCons/Script/Main.py b/engine/SCons/Script/Main.py
index 6684fbd..d1ed77a 100644
--- a/engine/SCons/Script/Main.py
+++ b/engine/SCons/Script/Main.py
@@ -34,7 +34,7 @@ deprecated_python_version = (2, 7, 0)
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Script/Main.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+__revision__ = "src/engine/SCons/Script/Main.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
import SCons.compat
@@ -484,6 +484,9 @@ def GetOption(name):
def SetOption(name, value):
return OptionsParser.values.set_option(name, value)
+def PrintHelp(file=None):
+ OptionsParser.print_help(file=file)
+
#
class Stats(object):
def __init__(self):
diff --git a/engine/SCons/Script/SConsOptions.py b/engine/SCons/Script/SConsOptions.py
index 7e458aa..6d02b0a 100644
--- a/engine/SCons/Script/SConsOptions.py
+++ b/engine/SCons/Script/SConsOptions.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/SConsOptions.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+__revision__ = "src/engine/SCons/Script/SConsOptions.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
import optparse
import re
@@ -268,7 +268,7 @@ class SConsOptionParser(optparse.OptionParser):
preserve_unknown_options = False
def error(self, msg):
- # overriden OptionValueError exception handler
+ # overridden OptionValueError exception handler
self.print_usage(sys.stderr)
sys.stderr.write("SCons Error: %s\n" % msg)
sys.exit(2)
diff --git a/engine/SCons/Script/SConscript.py b/engine/SCons/Script/SConscript.py
index ead6f2e..2d66f5c 100644
--- a/engine/SCons/Script/SConscript.py
+++ b/engine/SCons/Script/SConscript.py
@@ -28,7 +28,7 @@ files.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import division
-__revision__ = "src/engine/SCons/Script/SConscript.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+__revision__ = "src/engine/SCons/Script/SConscript.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
import SCons
import SCons.Action
@@ -499,9 +499,9 @@ class SConsEnvironment(SCons.Environment.Base):
name = self.subst(name)
return SCons.Script.Main.GetOption(name)
- def Help(self, text):
+ def Help(self, text, append=False):
text = self.subst(text, raw=1)
- SCons.Script.HelpFunction(text)
+ SCons.Script.HelpFunction(text, append=append)
def Import(self, *vars):
try:
diff --git a/engine/SCons/Script/__init__.py b/engine/SCons/Script/__init__.py
index c21882f..f9c4e51 100644
--- a/engine/SCons/Script/__init__.py
+++ b/engine/SCons/Script/__init__.py
@@ -34,13 +34,14 @@ it goes here.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+__revision__ = "src/engine/SCons/Script/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
import time
start_time = time.time()
import collections
import os
+import StringIO
import sys
# Special chicken-and-egg handling of the "--debug=memoizer" flag:
@@ -107,6 +108,7 @@ QuestionTask = Main.QuestionTask
#SConscriptSettableOptions = Main.SConscriptSettableOptions
AddOption = Main.AddOption
+PrintHelp = Main.PrintHelp
GetOption = Main.GetOption
SetOption = Main.SetOption
Progress = Main.Progress
@@ -258,12 +260,25 @@ def _Set_Default_Targets(env, tlist):
#
help_text = None
-def HelpFunction(text):
+def HelpFunction(text, append=False):
global help_text
- if SCons.Script.help_text is None:
- SCons.Script.help_text = text
- else:
- help_text = help_text + text
+ if help_text is None:
+ if append:
+ s = StringIO.StringIO()
+ PrintHelp(s)
+ help_text = s.getvalue()
+ s.close()
+ else:
+ help_text = ""
+#
+# Was in original patch but this text is arbitrary and breaks tests
+# so I removed it (Deegan)
+# help_text = help_text + "\nLocal Build Variables:\n" + text
+# else:
+# help_text = help_text + text
+
+ help_text= help_text + text
+
#
# Will be non-zero if we are reading an SConscript file.
@@ -318,6 +333,7 @@ GlobalDefaultEnvironmentFunctions = [
'Ignore',
'Install',
'InstallAs',
+ 'InstallVersionedLib',
'Literal',
'Local',
'ParseDepends',