Changeset 307b324 in rtems-libbsd for libbsd_waf.py


Ignore:
Timestamp:
Aug 11, 2017, 5:27:12 AM (2 years ago)
Author:
Christian Mauderer <christian.mauderer@…>
Branches:
fd86c091b97759106da7355ce1dd81ebe030e285, f020f08430150c1656a0ad0a1de13699db9b980b
Children:
8d2dbd3
Parents:
097ccba
git-author:
Christian Mauderer <christian.mauderer@…> (08/11/17 05:27:12)
git-committer:
Chris Johns <chrisj@…> (08/19/17 22:35:04)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libbsd_waf.py

    r097ccba r307b324  
    8484    includes += ["mDNSResponder/mDNSPosix"]
    8585    includes += ["testsuite/include"]
     86    includes += ["build-include"]
    8687
    8788    # Collect the libbsd uses
     
    123124        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),
    124125        update_outputs = True)
     126
     127    # copy headers if necessary
     128    header_build_copy_paths = [
     129                              ]
     130    for headers in header_build_copy_paths:
     131        target = os.path.join("build-include", headers[2])
     132        start_dir = bld.path.find_dir(headers[0])
     133        for header in start_dir.ant_glob(os.path.join("**/", headers[1])):
     134            relsourcepath = header.path_from(start_dir)
     135            targetheader = os.path.join(target, relsourcepath)
     136            bld(features = 'subst',
     137                target = targetheader,
     138                source = header,
     139                is_copy = True)
    125140
    126141    # KVM Symbols
Note: See TracChangeset for help on using the changeset viewer.