aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2017-04-07 09:31:33 +0200
committerSimon Warta <[email protected]>2017-04-07 09:31:33 +0200
commite188210ccf4ab576386bfd0546b4c46392bc64bf (patch)
tree314ed33e80354532ff3dea82827239197765a17b /configure.py
parentaa09f41f7f29582450d09eee842421f419ec5128 (diff)
Extract _generate_headers()
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/configure.py b/configure.py
index bd9beca29..e38165df0 100755
--- a/configure.py
+++ b/configure.py
@@ -2371,7 +2371,7 @@ class AmalgamationGenerator(object):
# Return set such that we can also iterate over result in the NA case
return set()
- def generate(self):
+ def _generate_headers(self):
pub_header_amalag = AmalgamationHeader(self._build_paths.public_headers)
header_name = '%s.h' % (AmalgamationGenerator.filename_prefix)
logging.info('Writing amalgamation header to %s' % (header_name))
@@ -2382,6 +2382,12 @@ class AmalgamationGenerator(object):
logging.info('Writing amalgamation header to %s' % (header_int_name))
internal_headers.write_to_file(header_int_name, "BOTAN_AMALGAMATION_INTERNAL_H__")
+ header_files = [header_name, header_int_name]
+ included_in_headers = pub_header_amalag.all_std_includes | internal_headers.all_std_includes
+ return header_files, included_in_headers
+
+ def generate(self):
+ amalgamation_headers, included_in_headers = self._generate_headers()
# target to filepath map
amalgamation_sources = {}
@@ -2400,8 +2406,8 @@ class AmalgamationGenerator(object):
for target, f in amalgamation_files.items():
AmalgamationHeader.write_banner(f)
f.write('\n')
- f.write('#include "%s"\n' % (header_name))
- f.write('#include "%s"\n' % (header_int_name))
+ for header in amalgamation_headers:
+ f.write('#include "%s"\n' % (header))
f.write('\n')
for isa in self._isas_for_target(target):
@@ -2412,7 +2418,7 @@ class AmalgamationGenerator(object):
# target to include header map
headers_written = {}
for target, _ in amalgamation_sources.items():
- headers_written[target] = pub_header_amalag.all_std_includes | internal_headers.all_std_includes
+ headers_written[target] = included_in_headers.copy()
for mod in sorted(self._modules):
tgt = self._target_for_module(mod)