aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Neus <[email protected]>2016-06-17 11:36:25 +0200
committerDaniel Neus <[email protected]>2016-06-17 11:36:25 +0200
commit601f8f6d6075ff2f944c11d357f2309da0c4deb1 (patch)
tree6daa1fda2f20794bd48b90ca2cdecbb96ada8024
parent6816c9e71e01432792a997ad9a5d561b9cd94a48 (diff)
add --with-external-includedir to configure.py
-rwxr-xr-xconfigure.py39
1 files changed, 28 insertions, 11 deletions
diff --git a/configure.py b/configure.py
index aeff794a8..754311235 100755
--- a/configure.py
+++ b/configure.py
@@ -308,6 +308,9 @@ def process_command_line(args):
build_group.add_option('--with-build-dir', metavar='DIR', default='',
help='setup the build in DIR')
+ build_group.add_option('--with-external-includedir', metavar='DIR', default='',
+ help='use DIR for external includes')
+
link_methods = ['symlink', 'hardlink', 'copy']
build_group.add_option('--link-method', default=None, metavar='METHOD',
choices=link_methods,
@@ -1177,16 +1180,30 @@ def gen_makefile_lists(var, build_config, options, modules, cc, arch, osinfo):
Form snippets of makefile for building each source file
"""
def build_commands(sources, obj_dir, flags):
- for (obj_file,src) in zip(objectfile_list(sources, obj_dir), sources):
- yield '%s: %s\n\t$(CXX)%s $(%s_FLAGS) %s%s %s %s %s$@\n' % (
- obj_file, src,
- isa_specific_flags(cc, src),
- flags,
- cc.add_include_dir_option,
- build_config.include_dir,
- cc.compile_flags,
- src,
- cc.output_to_option)
+ if options.with_external_includedir:
+ for (obj_file,src) in zip(objectfile_list(sources, obj_dir), sources):
+ yield '%s: %s\n\t$(CXX)%s $(%s_FLAGS) %s%s %s%s %s %s %s$@\n' % (
+ obj_file, src,
+ isa_specific_flags(cc, src),
+ flags,
+ cc.add_include_dir_option,
+ build_config.include_dir,
+ cc.add_include_dir_option,
+ options.with_external_includedir,
+ cc.compile_flags,
+ src,
+ cc.output_to_option)
+ else:
+ for (obj_file,src) in zip(objectfile_list(sources, obj_dir), sources):
+ yield '%s: %s\n\t$(CXX)%s $(%s_FLAGS) %s%s %s %s %s$@\n' % (
+ obj_file, src,
+ isa_specific_flags(cc, src),
+ flags,
+ cc.add_include_dir_option,
+ build_config.include_dir,
+ cc.compile_flags,
+ src,
+ cc.output_to_option)
for t in ['lib', 'cli', 'test']:
@@ -1333,7 +1350,7 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo):
'visibility_attribute': cc.gen_visibility_attribute(options),
# 'botan' or 'botan-1.11'. Used in Makefile and install script
- # This can be made constistent over all platforms in the future
+ # This can be made consistent over all platforms in the future
'libname': 'botan' if options.os == 'windows' else 'botan-%d.%d' % (build_config.version_major, build_config.version_minor),
'lib_link_cmd': cc.so_link_command_for(osinfo.basename, options),