[rtems-libbsd commit] waf: Install arch-specific header files
Sebastian Huber
sebh at rtems.org
Mon Oct 23 07:27:51 UTC 2017
Module: rtems-libbsd
Branch: master
Commit: 33d82be1e6858f8ec82dd85e5cfcba7679bf0586
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=33d82be1e6858f8ec82dd85e5cfcba7679bf0586
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jun 27 08:34:53 2017 +0200
waf: Install arch-specific header files
---
builder.py | 1 +
libbsd_waf.py | 10 ++++++----
waf_generator.py | 9 ++++++---
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/builder.py b/builder.py
index 5903777..ddf4df0 100755
--- a/builder.py
+++ b/builder.py
@@ -223,6 +223,7 @@ def headerPaths():
# local path wildcard dest path
return [('rtemsbsd/include', '**/*.h', ''),
+ ('rtemsbsd/\' + bld.env.RTEMS_ARCH + \'/include', '**/*.h', ''),
('rtemsbsd/mghttpd', 'mongoose.h', 'mghttpd'),
('freebsd/include', '**/*.h', ''),
('freebsd/sys/bsm', '**/*.h', 'bsm'),
diff --git a/libbsd_waf.py b/libbsd_waf.py
index 65ad934..0855d85 100644
--- a/libbsd_waf.py
+++ b/libbsd_waf.py
@@ -2345,6 +2345,7 @@ def build(bld):
# Installs.
bld.install_files("${PREFIX}/" + rtems.arch_bsp_lib_path(bld.env.RTEMS_VERSION, bld.env.RTEMS_ARCH_BSP), ["libbsd.a"])
header_paths = [('rtemsbsd/include', '**/*.h', ''),
+ ('rtemsbsd/' + bld.env.RTEMS_ARCH + '/include', '**/*.h', ''),
('rtemsbsd/mghttpd', 'mongoose.h', 'mghttpd'),
('freebsd/include', '**/*.h', ''),
('freebsd/sys/bsm', '**/*.h', 'bsm'),
@@ -2425,10 +2426,11 @@ def build(bld):
for headers in header_paths:
ipath = os.path.join(rtems.arch_bsp_include_path(bld.env.RTEMS_VERSION, bld.env.RTEMS_ARCH_BSP), headers[2])
start_dir = bld.path.find_dir(headers[0])
- bld.install_files("${PREFIX}/" + ipath,
- start_dir.ant_glob(headers[1]),
- cwd = start_dir,
- relative_trick = True)
+ if start_dir != None:
+ bld.install_files("${PREFIX}/" + ipath,
+ start_dir.ant_glob(headers[1]),
+ cwd = start_dir,
+ relative_trick = True)
# Tests
test_arphole = ['testsuite/arphole/test_main.c']
diff --git a/waf_generator.py b/waf_generator.py
index 9e9501e..481b4fe 100755
--- a/waf_generator.py
+++ b/waf_generator.py
@@ -181,6 +181,9 @@ class YaccFragmentComposer(builder.BuildSystemFragmentComposer):
d['includes'] = self.includes
return ['yacc', path, ('default', None)], d
+def headerPathSpec(headerPath):
+ return '(\'%s\', \'%s\', \'%s\')' % (headerPath[0], headerPath[1], headerPath[2])
+
# Module Manager - Collection of Modules
class ModuleManager(builder.ModuleManager):
@@ -644,10 +647,10 @@ class ModuleManager(builder.ModuleManager):
self.add(' # Installs. ')
self.add(' bld.install_files("${PREFIX}/" + rtems.arch_bsp_lib_path(bld.env.RTEMS_VERSION, bld.env.RTEMS_ARCH_BSP), ["libbsd.a"])')
headerPaths = builder.headerPaths()
- self.add(' header_paths = [%s,' % (str(headerPaths[0])))
+ self.add(' header_paths = [%s,' % (headerPathSpec(headerPaths[0])))
for hp in headerPaths[1:-1]:
- self.add(' %s,' % (str(hp)))
- self.add(' %s]' % (str(headerPaths[-1])))
+ self.add(' %s,' % (headerPathSpec(hp)))
+ self.add(' %s]' % (headerPathSpec(headerPaths[-1])))
self.add(' for headers in header_paths:')
self.add(' ipath = os.path.join(rtems.arch_bsp_include_path(bld.env.RTEMS_VERSION, bld.env.RTEMS_ARCH_BSP), headers[2])')
self.add(' start_dir = bld.path.find_dir(headers[0])')
More information about the vc
mailing list