From 307b324a4268f8e9fec19ac96b810d76912cf132 Mon Sep 17 00:00:00 2001 From: Christian Mauderer Date: Fri, 11 Aug 2017 07:27:12 +0200 Subject: 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 . 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. --- libbsd_waf.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libbsd_waf.py') 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", -- cgit v1.2.3