summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2023-05-15 20:47:10 -1000
committerKinseyMoore <48726349+KinseyMoore@users.noreply.github.com>2023-05-16 10:24:21 -0500
commit8b5807705faf8c9545b0cd349050efaae80ee8d1 (patch)
tree952a5bb5849b39d7325bb144d140a7cf83b1739c
parentnetservices.py: Spelling correction (diff)
downloadrtems-net-services-8b5807705faf8c9545b0cd349050efaae80ee8d1.tar.bz2
bsd/ntp: Install only the RTEMS specific headers
-rw-r--r--netservices.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/netservices.py b/netservices.py
index 9616c10..73dfe46 100644
--- a/netservices.py
+++ b/netservices.py
@@ -226,9 +226,16 @@ def build(bld):
source=ntp_source_files,
includes=ntp_incl + [os.path.join(net_root, 'ntp')],
cflags=cflags,
- defines=[net_def, 'HAVE_CONFIG_H=1'] + ntpq_defines + bld.env.NTP_DEFINES,
+ defines=[net_def, 'HAVE_CONFIG_H=1'] + ntpq_defines +
+ bld.env.NTP_DEFINES,
use=[net_use])
bld.install_files("${PREFIX}/" + arch_lib_path, ["libntp.a"])
+ ntp_rtems_inc = bld.path.find_dir('bsd/rtemsbsd/include')
+ if ntp_rtems_inc != None:
+ bld.install_files(os.path.join("${PREFIX}", arch_lib_path, "include"),
+ ntp_rtems_inc.ant_glob('**/**.h'),
+ cwd=ntp_rtems_inc,
+ relative_trick=True)
ttcp_incl = inc + ['ttcp/include']
@@ -243,20 +250,6 @@ def build(bld):
use=[net_use])
bld.install_files("${PREFIX}/" + arch_lib_path, ["libttcp.a"])
- def install_headers(root_path):
- for root, dirs, files in os.walk(root_path):
- for name in files:
- ext = os.path.splitext(name)[1]
- src_root = os.path.split(root)
- path = os.path.join(src_root[0], src_root[1])
- if ext == '.h':
- subpath = removeprefix(removeprefix(path, root_path), "/")
- bld.install_files(
- os.path.join("${PREFIX}", arch_lib_path, "include",
- subpath), os.path.join(path, name))
-
- [install_headers(path) for path in ntp_incl]
-
libs = ['rtemstest']
ntp_test_incl = ntp_incl + ['testsuites']