diff options
author | Jack Lloyd <[email protected]> | 2017-12-11 16:25:06 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-11 20:10:54 -0500 |
commit | 6c7b3fc30ede3f78cc91868e496ff9b4476423a6 (patch) | |
tree | d11a0df1cd5fbe7a950ae3572c4d1c049b364e5f /src | |
parent | 48502ed20525e631f5a565877747d0fa1debbfcc (diff) |
Clean up macro generation
Diffstat (limited to 'src')
-rw-r--r-- | src/build-data/buildh.in | 30 | ||||
-rwxr-xr-x | src/scripts/install.py | 2 |
2 files changed, 24 insertions, 8 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index 822a73c44..aeae12cec 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -24,8 +24,13 @@ /* How many bits per limb in a BigInt */ #define BOTAN_MP_WORD_BITS %{mp_bits} -%{unsafe_fuzzer_mode_define} -%{fuzzer_type} + +%{if fuzzer_mode} +#define BOTAN_UNSAFE_FUZZER_MODE +%{endif} +%{if fuzzer_type} +#define BOTAN_FUZZER_IS_%{fuzzer_type} +%{endif} #define BOTAN_INSTALL_PREFIX R"(%{prefix})" #define BOTAN_INSTALL_HEADER_DIR "%{includedir}/botan-%{version_major}" @@ -38,22 +43,33 @@ #endif /* Target identification and feature test macros */ -%{target_os_defines} +%{for os_defines} +#define BOTAN_%{i} +%{endfor} -%{target_cpu_defines} +%{for cc_defines} +#define BOTAN_%{i} +%{endfor} -%{target_compiler_defines} +%{for cpu_defines} +#define BOTAN_%{i} +%{endfor} /* * Module availability definitions */ -%{module_defines} +%{for module_defines} +#define BOTAN_%{i} +%{endfor} /* * Local/misc configuration options (if any) follow */ %{local_config} -%{house_ecc_curve_defines} + +%{for house_ecc_curve_defines} +%{i} +%{endfor} /* * Things you can edit (but probably shouldn't) diff --git a/src/scripts/install.py b/src/scripts/install.py index c6e4ec2cd..d30493ebe 100755 --- a/src/scripts/install.py +++ b/src/scripts/install.py @@ -229,7 +229,7 @@ def main(args): copy_file(cfg['botan_pkgconfig'], prepend_destdir(os.path.join(pkgconfig_dir, os.path.basename(cfg['botan_pkgconfig'])))) - if 'ffi' in cfg['mod_list'].split('\n'): + if 'ffi' in cfg['mod_list']: for ver in cfg['python_version'].split(','): py_lib_path = os.path.join(lib_dir, 'python%s' % (ver), 'site-packages') logging.debug('Installing python module to %s' % (py_lib_path)) |