diff options
author | Bradley Sepos <[email protected]> | 2019-04-13 11:20:18 -0400 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2019-04-13 14:05:21 -0400 |
commit | e757991183c2c2ddda14d23c160c2a0976739341 (patch) | |
tree | 1a5bdd3f81f4aa9eff5b89860f3976d7a9614547 /make | |
parent | 16a4ba113d6281462f76a365d7b540f7c4e149cc (diff) |
make: Fix configure.py conf args for reconfigure.
Diffstat (limited to 'make')
-rw-r--r-- | make/configure.py | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/make/configure.py b/make/configure.py index 9dca7ff0d..7b7d29641 100644 --- a/make/configure.py +++ b/make/configure.py @@ -1246,31 +1246,6 @@ def encodeDistfileConfig(): ## ## create cli parser ## - -## class to hook options and create CONF.args list -class Option( optparse.Option ): - conf_args = [] - - def _conf_record( self, opt, value ): - ## filter out non-applicable options - if re.match( '^--(force|launch).*$', opt ): - return - - ## remove duplicates (last duplicate wins) - for i,arg in enumerate( Option.conf_args ): - if opt == arg[0]: - del Option.conf_args[i] - break - - if value: - Option.conf_args.append( [opt,'%s=%s' % (opt,value)] ) - else: - Option.conf_args.append( [opt,'%s' % (opt)] ) - - def take_action( self, action, dest, opt, value, values, parser ): - self._conf_record( opt, value ) - return optparse.Option.take_action( self, action, dest, opt, value, values, parser ) - def createCLI( cross = None ): cli = argparse.ArgumentParser( usage='%s [OPTIONS...] [TARGETS...]' % os.path.basename(__file__), description='Configure %s build system' % project.name ) @@ -1804,10 +1779,12 @@ int main() ## add configure line for reconfigure purposes doc.addBlank() - args = [] - for arg in Option.conf_args: - args.append( arg[1] ) - doc.add( 'CONF.args', ' '.join(args).replace('$','$$') ) + conf_args = [] + for arg in sys.argv[1:]: + if re.match( '^--(force|launch).*$', arg ): + continue + conf_args.append(arg) + doc.add( 'CONF.args', ' '.join(conf_args).replace('$','$$') ) doc.addBlank() doc.add( 'HB.title', project.title ) |