aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-11-29 12:18:48 -0500
committerJack Lloyd <[email protected]>2017-11-29 15:52:36 -0500
commit9dd419140c06724fa9347e916fcc9d864f2fcf58 (patch)
tree7a4c698fcd014a66aa560135cd120549c1c9876c /configure.py
parent934f904f5e1ea6280eb294cc72bbc525eac53250 (diff)
Add a script to handle `make clean` target
This removes a lot of logic that cannot be shared between the nmake (Windows environment) and gnumake (Unix env) makefiles. Also it cleans up inconsistencies, eg nmake's make distclean did not remove amalgamation files, but gnumake version did.
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/configure.py b/configure.py
index 23cc1f14b..15018a27a 100755
--- a/configure.py
+++ b/configure.py
@@ -2096,6 +2096,9 @@ def create_template_vars(source_paths, build_config, options, modules, cc, arch,
if options.house_curve else ''
}
+ variables['test_exe'] = os.path.join(variables['out_dir'],
+ 'botan-test' + variables['program_suffix'])
+
if options.build_shared_lib:
if osinfo.soname_pattern_base != None:
@@ -2137,6 +2140,9 @@ def create_template_vars(source_paths, build_config, options, modules, cc, arch,
variables['libname'] = 'botand'
else:
variables['libname'] = 'botan'
+
+ variables['lib_basename'] = variables['libname']
+ variables['cli_exe'] = os.path.join(variables['out_dir'], 'botan-cli' + variables['program_suffix'])
else:
variables['botan_pkgconfig'] = os.path.join(build_config.build_dir, PKG_CONFIG_FILENAME)
@@ -2144,6 +2150,9 @@ def create_template_vars(source_paths, build_config, options, modules, cc, arch,
# This can be made consistent over all platforms in the future
variables['libname'] = 'botan-%d' % (Version.major())
+ variables['lib_basename'] = 'lib' + variables['libname']
+ variables['cli_exe'] = os.path.join(variables['out_dir'], 'botan' + variables['program_suffix'])
+
if options.os == 'llvm':
# llvm-link doesn't understand -L or -l flags
variables['link_to_botan'] = '%s/lib%s.a' % (variables['out_dir'], variables['libname'])
@@ -2159,7 +2168,6 @@ def create_template_vars(source_paths, build_config, options, modules, cc, arch,
if variables["makefile_style"] == "gmake":
templates = [
- ('gmake_commands.in', True),
('gmake_dso.in', options.build_shared_lib),
('gmake_coverage.in', options.with_coverage_info),
('gmake_fuzzers.in', options.build_fuzzers)
@@ -3160,14 +3168,16 @@ def main_action_configure_build(info_modules, source_paths, options,
link_headers(build_config.external_headers, 'external',
build_config.external_include_dir)
- with open(os.path.join(build_config.build_dir, 'build_config.json'), 'w') as f:
- json.dump(template_vars, f, sort_keys=True, indent=2)
-
if options.amalgamation:
amalgamation_cpp_files = AmalgamationGenerator(build_config, using_mods, options).generate()
build_config.lib_sources = sorted(amalgamation_cpp_files)
template_vars.update(MakefileListsGenerator(build_config, options, using_mods, cc, arch, osinfo).generate())
+ template_vars['generated_files'] = ' '.join(build_config.lib_sources)
+
+ with open(os.path.join(build_config.build_dir, 'build_config.json'), 'w') as f:
+ json.dump(template_vars, f, sort_keys=True, indent=2)
+
if options.with_bakefile:
gen_bakefile(build_config, options, template_vars['link_to'])