[Git][NTPsec/ntpsec][ntpc] Deleted 1 commit: wscript: add/(ab)use --clients-only option 1/x
James Browning
gitlab at mg.gitlab.com
Thu Sep 17 09:44:25 UTC 2020
James Browning pushed to branch ntpc at NTPsec / ntpsec
WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below.
Deleted commits:
47dcbd01 by James Browning at 2020-09-12T18:21:25-07:00
wscript: add/(ab)use --clients-only option 1/x
- - - - -
5 changed files:
- libntp/wscript
- tests/wscript
- wafhelpers/bin_test.py
- wafhelpers/options.py
- wscript
Changes:
=====================================
libntp/wscript
=====================================
@@ -40,14 +40,15 @@ def build(ctx):
if not ctx.env.HAVE_STRLCAT or not ctx.env.HAVE_STRLCPY:
libntp_source_sharable += ["strl_obsd.c"]
- # C library
- ctx(
- features="c cstlib",
- includes=[ctx.bldnode.parent.abspath(), "../include"],
- source=libntp_source + libntp_source_sharable,
- target="ntp",
- use="CRYPTO SSL",
- )
+ if not ctx.env['client-only']:
+ # C library
+ ctx(
+ features="c cstlib",
+ includes=[ctx.bldnode.parent.abspath(), "../include"],
+ source=libntp_source + libntp_source_sharable,
+ target="ntp",
+ use="CRYPTO SSL",
+ )
if ctx.env['ntpc'] == 'ffi':
# Loadable FFI stub
=====================================
tests/wscript
=====================================
@@ -55,15 +55,16 @@ def build(ctx):
"libntp/ymd2yd.c"
] + common_source
- ctx.ntp_test(
- features="c cprogram test",
- target="test_libntp",
- install_path=None,
- defines=unity_config + ["TEST_LIBNTP=1"],
- includes=[ctx.bldnode.parent.abspath(), "../include", "unity", "common"],
- use="unity ntp parse M PTHREAD CRYPTO RT SOCKET NSL",
- source=libntp_source,
- )
+ if not ctx.env['client-only']:
+ ctx.ntp_test(
+ features="c cprogram test",
+ target="test_libntp",
+ install_path=None,
+ defines=unity_config + ["TEST_LIBNTP=1"],
+ includes=[ctx.bldnode.parent.abspath(), "../include", "unity", "common"],
+ use="unity ntp parse M PTHREAD CRYPTO RT SOCKET NSL",
+ source=libntp_source,
+ )
if ctx.env.REFCLOCK_GENERIC or ctx.env.REFCLOCK_TRIMBLE:
# libparse available/required with generic and Trimble refclocks
@@ -103,16 +104,17 @@ def build(ctx):
"ntpd/nts_extens.c",
]
- ctx.ntp_test(
- defines=unity_config + ["TEST_NTPD=1"],
- features="c cprogram test",
- includes=[ctx.bldnode.parent.abspath(), "../include", "unity", "../ntpd", "common", "../libaes_siv"],
- install_path=None,
- source=ntpd_source,
- target="test_ntpd",
- use="ntpd_lib libntpd_obj unity ntp aes_siv "
- "M PTHREAD CRYPTO RT SOCKET NSL",
- )
+ if not ctx.env['client-only']:
+ ctx.ntp_test(
+ defines=unity_config + ["TEST_NTPD=1"],
+ features="c cprogram test",
+ includes=[ctx.bldnode.parent.abspath(), "../include", "unity", "../ntpd", "common", "../libaes_siv"],
+ install_path=None,
+ source=ntpd_source,
+ target="test_ntpd",
+ use="ntpd_lib libntpd_obj unity ntp aes_siv "
+ "M PTHREAD CRYPTO RT SOCKET NSL",
+ )
testpylib.get_bld().mkdir()
=====================================
wafhelpers/bin_test.py
=====================================
@@ -14,9 +14,6 @@ verStr = ntp.util.stdversion()
cmd_map = {
("main/ntpclients/ntpleapfetch", "--version"): "ntpleapfetch %s\n"
% verStr,
- ("main/ntpd/ntpd", "--version"): "ntpd %s\n" % verStr,
- ("main/ntpfrob/ntpfrob", "-V"): "ntpfrob %s\n" % verStr,
- ("main/ntptime/ntptime", "-V"): "ntptime %s\n" % verStr
}
cmd_map_python = {
("main/ntpclients/ntpdig", "--version"): "ntpdig %s\n" % verStr,
@@ -87,8 +84,16 @@ def run(cmd, reg, pythonic):
def cmd_bin_test(ctx, config):
"""Run a suite of binary tests."""
+ global cmd_map
fails = 0
+ if not ctx.env['client-only']:
+ cmd_map.update({
+ ("main/ntpd/ntpd", "--version"): "ntpd %s\n" % verStr,
+ ("main/ntpfrob/ntpfrob", "-V"): "ntpfrob %s\n" % verStr,
+ ("main/ntptime/ntptime", "-V"): "ntptime %s\n" % verStr
+ })
+
if ctx.env['PYTHON_ARGPARSE']:
cmd_map_python.update(cmd_map_python_argparse)
=====================================
wafhelpers/options.py
=====================================
@@ -35,6 +35,10 @@ def options_cmd(ctx, config):
default='ffi', choices=['ext', 'ffi', 'none'],
help="""Choose which Python library to build.\n
ext, ffi, or none. defaults to ffi.""", nargs=1)
+ grp.add_option('--clients-only', action='store',
+ default='no', choices=['no', 'yes'], nargs=1,
+ help="""Whether to only build/install clients/pylib.\n
+no or yes. default to no.""")
grp = ctx.add_option_group("NTP cross compile options")
grp.add_option('--cross-compiler', type='string',
=====================================
wscript
=====================================
@@ -120,6 +120,7 @@ def configure(ctx):
opt_map[opt] = ctx.env.OPT_STORE[flag]
ctx.env['ntpc'] = ctx.options.enable_pylib
+ ctx.env['client-only'] = ctx.options.clients_only == 'yes'
ctx.env['ntpcver'] = '1.1.0'
msg("--- Configuring host ---")
@@ -1003,6 +1004,7 @@ def build(ctx):
ctx.load('rtems_trace', tooldir='wafhelpers/')
if ctx.variant == "host":
+ # if ctx.variant == "host" and not ctx.env['client-only']:
ctx.recurse("ntpd")
return
@@ -1021,17 +1023,20 @@ def build(ctx):
# Finish purging ntp.ntpc
ctx.add_group()
- if ctx.env.REFCLOCK_GENERIC or ctx.env.REFCLOCK_TRIMBLE:
- # required by the generic and Trimble refclocks
- ctx.recurse("libparse")
+ if not ctx.env['client-only']:
+ if ctx.env.REFCLOCK_GENERIC or ctx.env.REFCLOCK_TRIMBLE:
+ # required by the generic and Trimble refclocks
+ ctx.recurse("libparse")
ctx.recurse("libntp")
- ctx.recurse("libaes_siv")
- ctx.recurse("ntpd")
- ctx.recurse("ntpfrob")
- ctx.recurse("ntptime")
+ if not ctx.env['client-only']:
+ ctx.recurse("libaes_siv")
+ ctx.recurse("ntpd")
+ ctx.recurse("ntpfrob")
+ ctx.recurse("ntptime")
ctx.recurse("pylib")
- ctx.recurse("attic")
- ctx.recurse("etc")
+ if not ctx.env['client-only']:
+ ctx.recurse("attic")
+ ctx.recurse("etc")
ctx.recurse("tests")
if ctx.env['PYTHON_ARGPARSE']:
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/47dcbd010cdeadeac4cd6cb741545a4925d10177
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/47dcbd010cdeadeac4cd6cb741545a4925d10177
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20200917/ed85552d/attachment-0001.htm>
More information about the vc
mailing list