diff options
author | lloyd <[email protected]> | 2009-11-29 13:14:33 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-11-29 13:14:33 +0000 |
commit | 70ba49797c45db0c28a803341570f7d832c16e7d (patch) | |
tree | 246070d469b4df6528e85e61b05a9b892ba08736 /configure.py | |
parent | 68500fd6d481ebbb2474ca20d233cae80ec1a8eb (diff) | |
parent | 4a94c35f8c9b73666a53a14a9b0a2ee50a742e89 (diff) |
propagate from branch 'net.randombit.botan' (head ac4d8fecb28374d06094da3457aa1e23f77dfa52)
to branch 'net.randombit.botan.c++0x' (head 00f0eecf3374a14b6ab907bd235488f902608de4)
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/configure.py b/configure.py index 956fdb333..f44b106ab 100755 --- a/configure.py +++ b/configure.py @@ -37,9 +37,9 @@ class BuildConfigurationInformation(object): """ version_major = 1 version_minor = 9 - version_patch = 3 - version_so_patch = 3 - version_suffix = '' + version_patch = 4 + version_so_patch = 4 + version_suffix = '-dev' version_string = '%d.%d.%d%s' % ( version_major, version_minor, version_patch, version_suffix) @@ -551,10 +551,15 @@ class CompilerInfo(object): """ Return the machine specific ABI flags """ - def mach_abi_link_flags(self, osname, arch, submodel): + def mach_abi_link_flags(self, osname, arch, submodel, debug_p): + + def all(): + if debug_p: + return 'all-debug' + return 'all' abi_link = set() - for what in ['all', osname, arch, submodel]: + for what in [all(), osname, arch, submodel]: if self.mach_abi_linking.get(what) != None: abi_link.add(self.mach_abi_linking.get(what)) @@ -768,6 +773,11 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): return os.path.join(options.with_build_dir, path) return path + def only_if_shared(option): + if options.build_shared_lib: + return option + return '' + return { 'version_major': build_config.version_major, 'version_minor': build_config.version_minor, @@ -798,17 +808,17 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): 'mp_bits': choose_mp_bits(), - 'cc': cc.binary_name + cc.mach_abi_link_flags(options.os, - options.arch, - options.cpu), + 'cc': cc.binary_name + cc.mach_abi_link_flags( + options.os, options.arch, options.cpu, options.debug_build), 'lib_opt': cc.library_opt_flags(options.debug_build), 'mach_opt': cc.mach_opts(options.arch, options.cpu), 'check_opt': cc.check_opt_flags, 'lang_flags': cc.lang_flags + options.extra_flags, 'warn_flags': cc.warning_flags, - 'shared_flags': cc.shared_flags, - 'dll_import_flags': cc.dll_import_flags, + + 'shared_flags': only_if_shared(cc.shared_flags), + 'dll_import_flags': only_if_shared(cc.dll_import_flags), 'so_link': cc.so_link_command_for(osinfo.basename), @@ -1074,17 +1084,25 @@ def setup_build(build_config, options, template_vars): makefile_template: template_vars['makefile_path'] } - for (template, sink) in [('buildh.in', 'build.h'), - ('botan-config.in', 'botan-config'), - ('botan.pc.in', build_config.pkg_config_file()), - ('botan.doxy.in', 'botan.doxy'), - ('innosetup.in', 'botan.iss')]: - templates_to_proc[os.path.join(options.build_data, template)] = \ - os.path.join(build_config.build_dir, sink) - - if options.boost_python: - template = os.path.join(options.makefile_dir, 'python.in') - templates_to_proc[template] = 'Makefile.python' + def templates_to_use(): + yield (options.build_data, 'buildh.in', 'build.h') + yield (options.build_data, 'botan.doxy.in', 'botan.doxy') + + if options.os != 'windows': + yield (options.build_data, 'botan.pc.in', build_config.pkg_config_file()) + yield (options.build_data, 'botan-config.in', 'botan-config') + + if options.os == 'windows': + yield (options.build_data, 'innosetup.in', 'botan.iss') + + if options.boost_python: + yield (options.makefile_dir, 'python.in', 'Makefile.python') + + for (template_dir, template, sink) in templates_to_use(): + source = os.path.join(template_dir, template) + if template_dir == options.build_data: + sink = os.path.join(build_config.build_dir, sink) + templates_to_proc[source] = sink for (template, sink) in templates_to_proc.items(): try: |