mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-24 00:59:56 +08:00
waf: Install arch-specific header files
This commit is contained in:
parent
e846288593
commit
33d82be1e6
@ -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'),
|
||||
|
@ -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,6 +2426,7 @@ 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])
|
||||
if start_dir != None:
|
||||
bld.install_files("${PREFIX}/" + ipath,
|
||||
start_dir.ant_glob(headers[1]),
|
||||
cwd = start_dir,
|
||||
|
@ -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])')
|
||||
|
Loading…
x
Reference in New Issue
Block a user