aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-24 00:13:03 +0000
committerlloyd <[email protected]>2009-11-24 00:13:03 +0000
commitd63be26ac979c878b80598f04748c647990a02d0 (patch)
treef4a610f5e400727f7c162dc2a76c007f1beac149 /configure.py
parent9a5f77d29bb28761d1053b47fb91dafc4b7bda6f (diff)
Clean up how the templates_to_proc variable is set up using a generator.
Only create the InnoSetup file on Windows. Only create pkg-config and botan-config on non-Windows.
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py30
1 files changed, 19 insertions, 11 deletions
diff --git a/configure.py b/configure.py
index 7cb083adf..274620e60 100755
--- a/configure.py
+++ b/configure.py
@@ -1110,17 +1110,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: