diff options
author | Christian Mauderer <christian.mauderer@embedded-brains.de> | 2017-08-11 07:27:12 +0200 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2017-08-20 08:35:04 +1000 |
commit | 307b324a4268f8e9fec19ac96b810d76912cf132 (patch) | |
tree | e8d251392b7d372e624401b14da4ccb6ca325b35 /libbsd_waf.py | |
parent | 097ccba6b0926f0615622769e5d269e359307065 (diff) |
waf_generator: Copy headers if necessary.
There are some cases, where a header is installed into a directory with
a different name then it's source directory. In that case, the build
might fail because the header is not found. One example would be the
<openssl/opensslv.h>. The source for this file is in
freebsd/crypto/openssl/crypto/opensslv.h.
To allow the build to work in such cases too, copy such files into a
temporary location in the build tree.
Diffstat (limited to 'libbsd_waf.py')
-rw-r--r-- | libbsd_waf.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libbsd_waf.py b/libbsd_waf.py index aee2e7ad..8bc2b348 100644 --- a/libbsd_waf.py +++ b/libbsd_waf.py @@ -83,6 +83,7 @@ def build(bld): includes += ["mDNSResponder/mDNSShared"] includes += ["mDNSResponder/mDNSPosix"] includes += ["testsuite/include"] + includes += ["build-include"] # Collect the libbsd uses libbsd_use = [] @@ -123,6 +124,20 @@ def build(bld): rule = "sed -e 's/@NET_CFG_SELF_IP@/%s/' -e 's/@NET_CFG_NETMASK@/%s/' -e 's/@NET_CFG_PEER_IP@/%s/' -e 's/@NET_CFG_GATEWAY_IP@/%s/' < ${SRC} > ${TGT}" % (net_cfg_self_ip, net_cfg_netmask, net_cfg_peer_ip, net_cfg_gateway_ip), update_outputs = True) + # copy headers if necessary + header_build_copy_paths = [ + ] + for headers in header_build_copy_paths: + target = os.path.join("build-include", headers[2]) + start_dir = bld.path.find_dir(headers[0]) + for header in start_dir.ant_glob(os.path.join("**/", headers[1])): + relsourcepath = header.path_from(start_dir) + targetheader = os.path.join(target, relsourcepath) + bld(features = 'subst', + target = targetheader, + source = header, + is_copy = True) + # KVM Symbols bld(target = "rtemsbsd/rtems/rtems-kernel-kvm-symbols.c", source = "rtemsbsd/rtems/generate_kvm_symbols", |