From 856b53c0463597207d64efe8956cd0322551af09 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Fri, 9 Dec 2011 00:54:59 +0100 Subject: [PATCH] Issue 1080 --- playground/relocate/c/a.c | 3 +++ playground/relocate/c/a/a.h | 1 + playground/relocate/c/wscript | 2 +- waflib/extras/relocation.py | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 playground/relocate/c/a/a.h diff --git a/playground/relocate/c/a.c b/playground/relocate/c/a.c index 5bdc2c54..be5b1790 100644 --- a/playground/relocate/c/a.c +++ b/playground/relocate/c/a.c @@ -1 +1,4 @@ +#include "a.h" + int k = 332; + diff --git a/playground/relocate/c/a/a.h b/playground/relocate/c/a/a.h new file mode 100644 index 00000000..dc5422f1 --- /dev/null +++ b/playground/relocate/c/a/a.h @@ -0,0 +1 @@ +int u = 0; diff --git a/playground/relocate/c/wscript b/playground/relocate/c/wscript index 63370c72..b1cc5b21 100644 --- a/playground/relocate/c/wscript +++ b/playground/relocate/c/wscript @@ -7,5 +7,5 @@ def configure(conf): conf.load('relocation compiler_c') def build(bld): - bld.shlib(source='a.c', target='one') + bld.shlib(source='a.c', target='one', includes='a') bld.program(source='main.c', target='two', use='one') diff --git a/waflib/extras/relocation.py b/waflib/extras/relocation.py index ab8dd361..aa758b44 100644 --- a/waflib/extras/relocation.py +++ b/waflib/extras/relocation.py @@ -80,6 +80,6 @@ def apply_incpaths(self): lst = self.to_incnodes(self.to_list(getattr(self, 'includes', [])) + self.env['INCLUDES']) self.includes_nodes = lst bld = self.bld - self.env['INCPATHS'] = [x.is_child_of(bld.srcnode) and x.path_from(bld.srcnode) or x.abspath() for x in lst] + self.env['INCPATHS'] = [x.is_child_of(bld.srcnode) and x.path_from(bld.bldnode) or x.abspath() for x in lst]