Bug 779388: fix configure.py --help by making names in specialargs match properly (p=stan, r=fklockii, push=fklockii).
authorFelix Klock II <fklockii@adobe.com>
Tue, 31 Jul 2012 18:46:11 -0700
changeset 7514 5e07a25d4308d08f228359683f2b6150322244d5
parent 7513 923f84e5f25c56d355889a6628499f523016d390
child 7515 7c1dc225585efffb07c324ddb5e8a25e8a9c5b10
push id4253
push userfklockii@adobe.com
push dateWed, 01 Aug 2012 02:00:44 +0000
reviewersfklockii
bugs779388, 1094872
Bug 779388: fix configure.py --help by making names in specialargs match properly (p=stan, r=fklockii, push=fklockii). {{mercurial fca60dd56b720c21cffb920c4070c35bcf05cba9}} CL@1094872
build/getopt.py
configure.py
--- a/build/getopt.py
+++ b/build/getopt.py
@@ -52,23 +52,25 @@ import re
 class Options:
     def __init__(self, argv = sys.argv):
         self._args = {}
         self.target = None
         self.host = None
         self.ignore_unknown_flags = False
         self.help = False
         self._allargs = {}
-        self.mac_sdk_version = None
-        self.mac_xcode_version = None
+        self.mac_sdk = None
+        self.mac_xcode = None
         self.arm_arch = "armv7-a"
 
         # These arguments don't go in _allargs, and they aren't standard
         # --enable/--disable switches. The getHelp method needs a list of these
         # special arguments.
+        # The argument names must correspond exactly to the property initializations
+        # above or "--help" will not work.
         self._specialargs = (               \
                 "target",                   \
                 "host",                     \
                 "ignore_unknown_flags",     \
                 "mac_sdk",                  \
                 "mac_xcode",                \
                 "arm_arch"                  \
                 )
@@ -82,22 +84,22 @@ class Options:
 
             m = _host.search(arg)
             if m:
                 self.host = m.group(1)
                 continue
 
             m = _sdk.search(arg)
             if m:
-                self.mac_sdk_version = m.group(1)
+                self.mac_sdk = m.group(1)
                 continue
 
             m = _xcode.search(arg)
             if m:
-                self.mac_xcode_version = m.group(1)
+                self.mac_xcode = m.group(1)
                 continue
 
             m = _arm_arch.search(arg)
             if m:
                 self.arm_arch = m.group(1)
                 continue
 
             if _ignore.search(arg) is not None:
--- a/configure.py
+++ b/configure.py
@@ -462,17 +462,17 @@ if the_os == "darwin":
     MMGC_DEFINES.update({'TARGET_API_MAC_CARBON': 1,
                          'DARWIN': 1,
                          '_MAC': None,
                          'AVMPLUS_MAC': None,
                          'TARGET_RT_MAC_MACHO': 1})
     APP_CXXFLAGS += "-fpascal-strings -faltivec -fasm-blocks "
 
     # If an sdk is selected align OS and gcc/g++ versions to it
-    os_ver,sdk_path = _setSDKParams(o.mac_sdk_version, os_ver, o.mac_xcode_version)
+    os_ver,sdk_path = _setSDKParams(o.mac_sdk, os_ver, o.mac_xcode)
     APP_CXXFLAGS += "-mmacosx-version-min=%s -isysroot %s " % (os_ver,sdk_path)
     config.subst("MACOSX_DEPLOYMENT_TARGET",os_ver)
 
     if cpu == 'ppc64':
         APP_CXXFLAGS += "-arch ppc64 "
         APP_CFLAGS += "-arch ppc64 "
         OS_LDFLAGS += "-arch ppc64 "
     elif cpu == 'x86_64':