diff options
Diffstat (limited to 'contrib/subversion/gen-make.py')
-rwxr-xr-x | contrib/subversion/gen-make.py | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/contrib/subversion/gen-make.py b/contrib/subversion/gen-make.py index 2b49b5e..2e5557b 100755 --- a/contrib/subversion/gen-make.py +++ b/contrib/subversion/gen-make.py @@ -25,7 +25,9 @@ import os +import traceback import sys + import getopt try: my_getopt = getopt.gnu_getopt @@ -64,6 +66,8 @@ def main(fname, gentype, verfname=None, generator.write() generator.write_sqlite_headers() + generator.write_errno_table() + generator.write_config_keys() if ('--debug', '') in other_options: for dep_type, target_dict in generator.graph.deps.items(): @@ -192,12 +196,6 @@ def _usage_exit(err=None): print(" --enable-nls") print(" add support for gettext localization") print("") - print(" --enable-bdb-in-apr-util") - print(" configure APR-Util to use Berkeley DB") - print("") - print(" --enable-ml") - print(" enable use of ML assembler with zlib") - print("") print(" --disable-shared") print(" only build static libraries") print("") @@ -208,11 +206,18 @@ def _usage_exit(err=None): print(" Use static openssl") print("") print(" --vsnet-version=VER") - print(" generate for VS.NET version VER (2002, 2003, 2005, 2008, 2010 or 2012)") + print(" generate for VS.NET version VER (2002, 2003, 2005, 2008,") + print(" 2010, 2012, 2013 or 2015)") + print(" [only valid in combination with '-t vcproj']") + print("") + print(" -D NAME[=value]") + print(" define NAME macro during compilation") print(" [only valid in combination with '-t vcproj']") print("") print(" --with-apr_memcache=DIR") print(" the apr_memcache sources are in DIR") + print(" --disable-gmock") + print(" do not use Googlemock") sys.exit(1) @@ -221,16 +226,17 @@ class Options: self.list = [] self.dict = {} - def add(self, opt, val): + def add(self, opt, val, overwrite=True): if opt in self.dict: - self.list[self.dict[opt]] = (opt, val) + if overwrite: + self.list[self.dict[opt]] = (opt, val) else: self.dict[opt] = len(self.list) self.list.append((opt, val)) if __name__ == '__main__': try: - opts, args = my_getopt(sys.argv[1:], 'st:', + opts, args = my_getopt(sys.argv[1:], 'st:D:', ['debug', 'release', 'reload', @@ -256,23 +262,17 @@ if __name__ == '__main__': 'enable-purify', 'enable-quantify', 'enable-nls', - 'enable-bdb-in-apr-util', - 'enable-ml', 'disable-shared', 'installed-libs=', 'vsnet-version=', - - # Keep distributions that help by adding a path - # working. On unix this would be filtered by - # configure, but on Windows gen-make.py is used - # directly. - 'with-neon=', - 'without-neon', + 'disable-gmock', ]) if len(args) > 1: _usage_exit("Too many arguments") - except getopt.GetoptError, e: - _usage_exit(str(e)) + except getopt.GetoptError: + typ, val, tb = sys.exc_info() + msg = ''.join(traceback.format_exception_only(typ, val)) + _usage_exit(msg) conf = 'build.conf' skip = 0 @@ -306,9 +306,12 @@ if __name__ == '__main__': gentype = val else: if opt == '--with-httpd': - rest.add('--with-apr', os.path.join(val, 'srclib', 'apr')) - rest.add('--with-apr-util', os.path.join(val, 'srclib', 'apr-util')) - rest.add('--with-apr-iconv', os.path.join(val, 'srclib', 'apr-iconv')) + rest.add('--with-apr', os.path.join(val, 'srclib', 'apr'), + overwrite=False) + rest.add('--with-apr-util', os.path.join(val, 'srclib', 'apr-util'), + overwrite=False) + rest.add('--with-apr-iconv', os.path.join(val, 'srclib', 'apr-iconv'), + overwrite=False) # Remember all options so that --reload and other scripts can use them opt_conf = open('gen-make.opts', 'w') |