aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorDaniel Neus <[email protected]>2016-06-28 17:53:49 +0200
committerDaniel Neus <[email protected]>2016-06-28 17:53:49 +0200
commitcc9e06a433e2d0d4995ffd5e75e701954dc994fd (patch)
tree8077525960566ed518ed23026950af6910098f6e /configure.py
parentb85d5831364495af8bed5ec709f22c489159ebc0 (diff)
improve with_external_includedir handling in configure.py
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py36
1 files changed, 11 insertions, 25 deletions
diff --git a/configure.py b/configure.py
index 754311235..95fc32c23 100755
--- a/configure.py
+++ b/configure.py
@@ -1180,31 +1180,17 @@ 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):
- 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)
-
+ includes = cc.add_include_dir_option + build_config.include_dir
+ includes+= ' ' + cc.add_include_dir_option + options.with_external_includedir if options.with_external_includedir 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$@\n' % (
+ obj_file, src,
+ isa_specific_flags(cc, src),
+ flags,
+ includes,
+ cc.compile_flags,
+ src,
+ cc.output_to_option)
for t in ['lib', 'cli', 'test']:
obj_key = '%s_objs' % (t)