Quiet -Wunused-function warnings in ntp_config.c building ntpdsim.
Quiet -Warray-bounds warning in ntpdc.c.
Fix make distcheck failure due to leftover version.Po files.
Use silent rules for Autogen invocations.
Remove other write permissions, e.g. chmod o-w
Add missing comma in configure.ac syscall() test.
Remove remnant of the no-longer-used Google Test framework.
bk: 64232f23qxznx2T5WGUGfpYTDa90jw
--- /dev/null
+$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
+ $(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+
+FRC.scm-rev:
+ @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
+ always out-of-date causing targets which depend on it to also \
+ be outdated so their rules to fire each time they are built.
+
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-ntp_configure_cache_version=20230313
+ntp_configure_cache_version=20230326
# When the cache version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
NTP_PROG_CC
NTP_COMPILER
-dnl # Do we need CXX for anything besides google test?
-dnl AC_PROG_CXX
AC_PROG_YACC
dnl AC_PROG_CC_C_O # called by NTP_COMPILER
AX_C99_STRUCT_INIT
[[
extern int syscall (int, ...);
]]
- )]
+ )],
[ntp_cv_decl_syscall=yes],
[ntp_cv_decl_syscall=no]
)]
NTP_UNITYBUILD
-dnl gtest is needed for our tests subdirs. It would be nice if we could
-dnl require a C++ compiler only if we will use gtest, but AC_PROG_CXX
-dnl can't be conditionalized.
-NTP_GOOGLETEST
-
NTP_PROBLEM_TESTS
###
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
endif
vphack:
- test -e info_trimble.c || ln -s $(srcdir)/info_trimble.c .
+ $(AM_V_at)test -e info_trimble.c || ln -s $(srcdir)/info_trimble.c .
vphack_after:
- test -L info_trimble.c || ( \
+ $(AM_V_at)test -L info_trimble.c || ( \
mv info_trimble.c $(srcdir)/info_trimble.c && \
ln -s $(srcdir)/info_trimble.c . \
)
AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB.
-LDADD = version.o libntpd.a $(LIBPARSE)
+LDADD = libntpd.a $(LIBPARSE)
AM_YFLAGS = -d -t -r all
if SAVECONFIG_ENABLED
endif
vphack:
- test -e ntp_parser.c || ln -s $(srcdir)/ntp_parser.c .
- test -e ntp_parser.h || ln -s $(srcdir)/ntp_parser.h .
+ $(AM_V_at)test -e ntp_parser.c || ln -s $(srcdir)/ntp_parser.c .
+ $(AM_V_at)test -e ntp_parser.h || ln -s $(srcdir)/ntp_parser.h .
#
# ylwrap script which invokes Bison replaces ntp_parser.h
#
vphack_after:
- test -L ntp_parser.h || ( \
+ $(AM_V_at)test -L ntp_parser.h || ( \
mv ntp_parser.h $(srcdir)/ntp_parser.h && \
ln -s $(srcdir)/ntp_parser.h . \
)
man8_MANS=
man_MANS= ntpd.$(NTPD_MS)
-# ntpdsim.1 is a remnant along with all the ntpdsim-opts.* files, the
-# simulator currently uses ntpd-opts.[ch]. This also means there is no
-# longer a reason to have ntpdbase-opts.def split off of ntpd-opts.def.
-
LDADD_NTPD_COMMON = $(LDADD_LIBNTP) $(LIBOPTS_LDADD) $(PTHREAD_LIBS)
LDADD_NTPD_COMMON += $(LIBM) $(LDADD_NTP) $(LSCF)
ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_NTPD_COMMON) $(LDADD_LIBUTIL)
DISTCLEANFILES = \
keyword-gen \
- .version \
- version.c \
config.log \
$(man5_MANS) \
$(man_MANS) \
psl1save.conf+ \
psl2save.conf \
psl2save.conf+ \
+ .version \
+ version.c \
+ ntpd-version.c \
+ sim-version.c \
$(EXTRA_PROGRAMS) \
$(NULL)
check-local: $(MAKE_CHECK_Y2K) $(CHECK_SAVECONFIG)
test -z "$(MAKE_CHECK_Y2K)" || ./$(MAKE_CHECK_Y2K)
-ntpd_SOURCES = \
+# ntpd_ntpdsim_SRCS use #ifdef SIM and are included in both
+
+ntpd_ntpdsim_SRCS = \
ntp_config.c \
ntp_keyword.h \
ntp_io.c \
ntpd-opts.h \
$(NULL)
+ntpd_SOURCES = \
+ $(ntpd_ntpdsim_SRCS) \
+ $(NULL)
+
+nodist_ntpd_SOURCES = \
+ ntpd-version.c \
+ $(NULL)
+
ntpdsim_SOURCES = \
- $(ntpd_SOURCES) \
+ $(ntpd_ntpdsim_SRCS) \
ntp_prio_q.c \
ntpsim.c \
$(NULL)
+nodist_ntpdsim_SOURCES = \
+ sim-version.c \
+ $(NULL)
+
# libntpd_a_SOURCES do not use #ifdef SIM
libntpd_a_SOURCES = \
$(NULL)
k-g-u-submake: keyword-gen
- ./keyword-gen $(srcdir)/ntp_parser.h > k-g.out
- @grep -v diff_ignore_line < k-g.out > cmp1
- @grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp2
- @cmp cmp1 cmp2 > /dev/null || \
+ $(AM_V_at)./keyword-gen $(srcdir)/ntp_parser.h > k-g.out
+ $(AM_V_at)grep -v diff_ignore_line < k-g.out > cmp1
+ $(AM_V_at)grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp2
+ $(AM_V_at)cmp cmp1 cmp2 > /dev/null || \
{ mv -f k-g.out $(srcdir)/ntp_keyword.h && \
echo 'Generated changed ntp_keyword.h.' ;}
- @[ ! -f k-g.out ] || \
+ $(AM_V_at)[ ! -f k-g.out ] || \
{ rm k-g.out && echo 'ntp_keyword.h is up to date.' ;}
@rm cmp1 cmp2
@echo 'keyword-gen and ntp_keyword.h are up to date.' > $@
$(srcdir)/keyword-gen-utd: $(srcdir)/keyword-gen.c $(srcdir)/ntp_parser.h
- $(MAKE) $(AM_MAKEFLAGS) k-g-u-submake # avoid explicit dependency
- grep diff_ignore_line $(srcdir)/ntp_keyword.h > k-g-u
- mv -f k-g-u $@
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) k-g-u-submake # avoid explicit dependency
+ $(AM_V_at)grep diff_ignore_line $(srcdir)/ntp_keyword.h > k-g-u
+ $(AM_V_at)mv -f k-g-u $@
$(srcdir)/ntp_keyword.h: $(srcdir)/keyword-gen-utd
@: do-nothing action to avoid default SCCS get
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpd-opts.c: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) ntpd-opts.def
###
$(srcdir)/ntpd.1ntpdman: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdman -Tagman-cmd.tpl ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdman -Tagman-cmd.tpl ntpd-opts.def
$(srcdir)/ntpd.man.in: $(srcdir)/ntpd.1ntpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdman > $(srcdir)/ntpd.man.in+
###
$(srcdir)/ntpd.1ntpdmdoc: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdmdoc -Tagmdoc-cmd.tpl ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdmdoc -Tagmdoc-cmd.tpl ntpd-opts.def
$(srcdir)/ntpd.mdoc.in: $(srcdir)/ntpd.1ntpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdmdoc > $(srcdir)/ntpd.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntp.conf.texi: $(srcdir)/ntp.conf.def $(std_def_list)
- $(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.conf.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.conf.def
$(srcdir)/invoke-ntp.keys.menu: $(srcdir)/invoke-ntp.keys.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntp.keys.texi: $(srcdir)/ntp.keys.def $(std_def_list)
- $(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.keys.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.keys.def
$(srcdir)/ntp.conf.html: $(srcdir)/ntp.conf.texi $(srcdir)/invoke-ntp.conf.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.conf.html ntp.conf.texi || true )
###
$(srcdir)/ntp.conf.5man: $(srcdir)/ntp.conf.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5man -Tagman-cmd.tpl ntp.conf.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5man -Tagman-cmd.tpl ntp.conf.def
$(srcdir)/ntp.conf.man.in: $(srcdir)/ntp.conf.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5man > $(srcdir)/ntp.conf.man.in+
###
$(srcdir)/ntp.conf.5mdoc: $(srcdir)/ntp.conf.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-cmd.tpl ntp.conf.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-cmd.tpl ntp.conf.def
$(srcdir)/ntp.conf.mdoc.in: $(srcdir)/ntp.conf.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5mdoc > $(srcdir)/ntp.conf.mdoc.in+
###
$(srcdir)/ntp.keys.5man: $(srcdir)/ntp.keys.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5man -Tagman-file.tpl ntp.keys.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5man -Tagman-file.tpl ntp.keys.def
$(srcdir)/ntp.keys.man.in: $(srcdir)/ntp.keys.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5man > $(srcdir)/ntp.keys.man.in+
###
$(srcdir)/ntp.keys.5mdoc: $(srcdir)/ntp.keys.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-file.tpl ntp.keys.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-file.tpl ntp.keys.def
$(srcdir)/ntp.keys.mdoc.in: $(srcdir)/ntp.keys.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5mdoc > $(srcdir)/ntp.keys.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpd.texi: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpd-opts.def
$(top_srcdir)/scripts/build/check--help $@
-$(PROGRAMS): $(LDADD)
-
check-saveconfig: complete.conf compsave.conf
-diff -u complete.conf compsave.conf
cmp complete.conf compsave.conf && echo stamp > $@
../libparse/libparse.a:
cd ../libparse && $(MAKE) $(AM_MAKEFLAGS) check-libparse
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+ntpd-version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpd
+ $(AM_V_at)mv -f version.c $@
-version.c: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpd
+sim-version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdsim
+ $(AM_V_at)@mv -f version.c $@
$(srcdir)/Makefile.am:
@: do-nothing
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libopts.mf
include $(top_srcdir)/check-libntp.mf
+include $(top_srcdir)/check-scm-rev.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
static void free_config_monitor(config_tree *);
static void free_config_nic_rules(config_tree *);
static void free_config_other_modes(config_tree *);
-static void free_config_peers(config_tree *);
static void free_config_phone(config_tree *);
static void free_config_reset_counters(config_tree *);
static void free_config_rlimit(config_tree *);
static void free_config_tos(config_tree *);
static void free_config_trap(config_tree *);
static void free_config_ttl(config_tree *);
-static void free_config_unpeers(config_tree *);
static void free_config_vars(config_tree *);
#ifdef SIM
static void free_config_sim(config_tree *);
-#endif
+#else /* !SIM follows */
+static void free_config_peers(config_tree *);
+static void free_config_unpeers(config_tree *);
+static int is_sane_resolved_address(sockaddr_u *peeraddr, int hmode);
+#endif /* !SIM */
static void destroy_address_fifo(address_fifo *);
#define FREE_ADDRESS_FIFO(pf) \
do { \
#endif /* FREE_CFG_T */
static void destroy_restrict_node(restrict_node *my_node);
-static int is_sane_resolved_address(sockaddr_u *peeraddr, int hmode);
static void save_and_apply_config_tree(int/*BOOL*/ from_file);
static void destroy_int_fifo(int_fifo *);
#define FREE_INT_FIFO(pf) \
static void config_rlimit(config_tree *);
static void config_system_opts(config_tree *);
static void config_tinker(config_tree *);
-static int config_tos_clock(config_tree *);
static void config_tos(config_tree *);
static void config_vars(config_tree *);
static void config_mdnstries(config_tree *);
static void config_phone(config_tree *);
static void config_setvar(config_tree *);
+static int config_tos_clock(config_tree *);
static void config_ttl(config_tree *);
static void config_trap(config_tree *);
static void config_fudge(config_tree *);
static void config_reset_counters(config_tree *);
static u_char get_correct_host_mode(int token);
static int peerflag_bits(peer_node *);
-#endif /* !SIM */
#ifdef WORKER
static void peer_name_resolved(int, int, void *, const char *, const char *,
static void trap_name_resolved(int, int, void *, const char *, const char *,
const struct addrinfo *,
const struct addrinfo *);
-#endif
+#endif /* WORKER */
+#endif /* !SIM */
enum gnn_type {
t_UNK, /* Unknown */
free_config_fudge(ptree);
free_config_device(ptree);
free_config_vars(ptree);
- free_config_peers(ptree);
- free_config_unpeers(ptree);
free_config_nic_rules(ptree);
free_config_reset_counters(ptree);
#ifdef SIM
free_config_sim(ptree);
-#endif
+#else /* !SIM follows */
+ free_config_peers(ptree);
+ free_config_unpeers(ptree);
+#endif /* !SIM */
free_auth_node(ptree);
free(ptree);
}
#endif /* FREE_CFG_T */
-
+#ifndef SIM
/* Configure low-level clock-related parameters. Return TRUE if the
* clock might need adjustment like era-checking after the call, FALSE
* otherwise.
return ret;
}
+#endif /* SIM */
static void
config_tos(
}
}
}
-#endif /* !SIM */
static void
config_mdnstries(
mdnstries = ptree->mdnstries;
#endif /* HAVE_DNSREGISTRATION */
}
+#endif /* !SIM */
#ifdef FREE_CFG_T
static void
sockaddr_u addr_sock;
address_node *addr_node;
struct refclockstat clock_stat;
+ char refid_str[5];
int err_flag;
curr_fudge = HEAD_PFIFO(ptree->fudge);
case T_Refid:
clock_stat.haveflags |= CLK_HAVEVAL2;
/* strncpy() does exactly what we want here: */
- strncpy((char*)&clock_stat.fudgeval2,
- curr_opt->value.s, 4);
+ strncpy(refid_str, curr_opt->value.s,
+ sizeof refid_str - 1);
+ memcpy(&clock_stat.fudgeval2, refid_str,
+ sizeof clock_stat.fudgeval2);
break;
case T_Flag1:
#endif /* FREE_CFG_T */
+#ifndef SIM
/* Define a function to check if a resolved address is sane.
* If yes, return 1, else return 0;
*/
}
-#ifndef SIM
static u_char
get_correct_host_mode(
int token
}
}
}
-#endif /* !SIM */
+
/*
* peer_name_resolved()
#endif /* FREE_CFG_T */
-#ifndef SIM
static void
config_unpeers(
config_tree *ptree
# endif
}
}
-#endif /* !SIM */
/*
}
}
#endif /* FREE_CFG_T */
+#endif /* !SIM */
#ifndef SIM
NULL =
BUILT_SOURCES =
-CLEANFILES =
+DISTCLEANFILES =
bin_PROGRAMS = $(NTPDATE_DB)
libexec_PROGRAMS = $(NTPDATE_DL)
AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
-LDADD = version.o ../libntp/libntp.a
+LDADD = ../libntp/libntp.a
ntpdate_LDADD = $(LDADD) $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LIBOPTS_LDADD)
ntpdate_LDADD += $(LIBM) $(LDADD_NTP)
-DISTCLEANFILES= .version version.c stamp-v
+CLEANFILES = .version version.c
noinst_HEADERS= ntpdate.h
-$(PROGRAMS): $(LDADD)
+ntpdate_SOURCES = ntpdate.c
+nodist_ntpdate_SOURCES = version.c
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntpdate_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdate
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdate
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libntp.mf
+include $(top_srcdir)/check-scm-rev.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
-ntpdc_LDADD = version.o $(LIBOPTS_LDADD)
+ntpdc_LDADD = $(LIBOPTS_LDADD)
ntpdc_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
ntpdc_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS)
ntpdc_LDADD += $(LDADD_NTP)
# ntpdc-layout doesn't need any additional libraries at all
ntpdc_layout_LDADD=
-DISTCLEANFILES= .version version.c config.log $(man_MANS)
-CLEANFILES= check-layout layout.here nl.c ntpdc-layout
+DISTCLEANFILES = \
+ $(man_MANS) \
+ config.log \
+ $(NULL)
+
+CLEANFILES = \
+ check-layout \
+ layout.here \
+ nl.c \
+ ntpdc-layout \
+ .version \
+ version.c \
+ $(NULL)
+
noinst_HEADERS= ntpdc.h
ETAGS_ARGS= Makefile.am
EXTRA_DIST= \
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) ntpdc-opts.def
###
$(srcdir)/ntpdc.1ntpdcman: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdcman -Tagman-cmd.tpl ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdcman -Tagman-cmd.tpl ntpdc-opts.def
$(srcdir)/ntpdc.man.in: $(srcdir)/ntpdc.1ntpdcman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcman > $(srcdir)/ntpdc.man.in+
###
$(srcdir)/ntpdc.1ntpdcmdoc: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdcmdoc -Tagmdoc-cmd.tpl ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdcmdoc -Tagmdoc-cmd.tpl ntpdc-opts.def
$(srcdir)/ntpdc.mdoc.in: $(srcdir)/ntpdc.1ntpdcmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcmdoc > $(srcdir)/ntpdc.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpdc.texi: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpdc-opts.def
$(top_srcdir)/scripts/build/check--help $@
$(srcdir)/ntpdc.html: $(srcdir)/invoke-ntpdc.texi $(srcdir)/ntpdc.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpdc.html ntpdc.texi || true )
ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h
+nodist_ntpdc_SOURCES = version.c
ntpdc-layout.o: nl.c
layout.here: ntpdc-layout
- ./ntpdc-layout > $@
+ $(AM_V_at)./ntpdc-layout > $@
check-layout: ntpdc-layout $(srcdir)/layout.std layout.here
- cmp $(srcdir)/layout.std layout.here && echo stamp > $@
+ $(AM_V_at)cmp $(srcdir)/layout.std layout.here && echo stamp > $@
-$(PROGRAMS): version.o
-
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdc
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdc
# I ran nl_in.c (attached, to be installed into ntpdc) through
# $(CC) -E nl_in.c | nl.pl > nl.c
nl.c: nl_in.c nl.pl Makefile.am ../config.h ../include/ntp_request.h ntpdc.h
- $(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
+ $(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > $@
+
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libopts.mf
include $(top_srcdir)/check-libntp.mf
+include $(top_srcdir)/check-scm-rev.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
reqsize = (reqsize + 3) & ~3;
} else
reqsize = req_pkt_size;
- ptstamp = (void *)((char *)&qpkt + reqsize);
- ptstamp--;
+ ptstamp = (void *)((char *)&qpkt + reqsize - sizeof *ptstamp);
get_systime(&ts);
L_ADD(&ts, &delay_time);
HTONL_FP(&ts, ptstamp);
AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
-ntpq_LDADD = version.o $(LIBOPTS_LDADD)
+ntpq_LDADD = $(LIBOPTS_LDADD)
ntpq_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
ntpq_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS)
ntpq_LDADD += $(LDADD_NTP)
libntpq_a_CFLAGS += -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
libntpq_a_CPPFLAGS = $(AM_CPPFLAGS)
-CLEANFILES =
-DISTCLEANFILES = .version version.c config.log $(man_MANS)
-ETAGS_ARGS = Makefile.am
+CLEANFILES = .version version.c
+DISTCLEANFILES = config.log $(man_MANS)
+ETAGS_ARGS = Makefile.am
+
EXTRA_DIST = \
invoke-ntpq.menu \
invoke-ntpq.texi \
$(top_srcdir)/sntp/include/ntp.lic \
$(top_srcdir)/sntp/include/version.def \
$(NULL)
-ntpq_SOURCES= ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h
+
+ntpq_SOURCES = ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h
+nodist_ntpq_SOURCES = version.c
libntpq_a_SOURCES = libntpq.c libntpq.h libntpq_subs.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpq-opts.c: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) ntpq-opts.def
###
$(srcdir)/ntpq.1ntpqman: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpqman -Tagman-cmd.tpl ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpqman -Tagman-cmd.tpl ntpq-opts.def
$(srcdir)/ntpq.man.in: $(srcdir)/ntpq.1ntpqman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqman > $(srcdir)/ntpq.man.in+
###
$(srcdir)/ntpq.1ntpqmdoc: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpqmdoc -Tagmdoc-cmd.tpl ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpqmdoc -Tagmdoc-cmd.tpl ntpq-opts.def
$(srcdir)/ntpq.mdoc.in: $(srcdir)/ntpq.1ntpqmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqmdoc > $(srcdir)/ntpq.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpq.texi: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpq-opts.def
$(top_srcdir)/scripts/build/check--help $@
$(srcdir)/ntpq.html: $(srcdir)/invoke-ntpq.texi $(srcdir)/ntpq.texi $(top_srcdir)/sntp/include/version.texi
###
-$(PROGRAMS): version.o
-
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpq
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpq
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libopts.mf
include $(top_srcdir)/check-libntp.mf
+include $(top_srcdir)/check-scm-rev.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpsnmpd-opts.c: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) ntpsnmpd-opts.def
###
$(srcdir)/ntpsnmpd.1ntpsnmpdman: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsnmpdman -Tagman-cmd.tpl ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsnmpdman -Tagman-cmd.tpl ntpsnmpd-opts.def
$(srcdir)/ntpsnmpd.man.in: $(srcdir)/ntpsnmpd.1ntpsnmpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdman > $(srcdir)/ntpsnmpd.man.in+
###
$(srcdir)/ntpsnmpd.1ntpsnmpdmdoc: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsnmpdmdoc -Tagmdoc-cmd.tpl ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsnmpdmdoc -Tagmdoc-cmd.tpl ntpsnmpd-opts.def
$(srcdir)/ntpsnmpd.mdoc.in: $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc > $(srcdir)/ntpsnmpd.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpsnmpd.texi: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsnmpd-opts.def
$(top_srcdir)/scripts/build/check--help $@
$(srcdir)/ntpsnmpd.html: $(srcdir)/invoke-ntpsnmpd.texi $(srcdir)/ntpsnmpd.texi $(top_srcdir)/sntp/include/version.texi
plot_summary: $(srcdir)/plot_summary-opts
$(srcdir)/plot_summary-opts: plot_summary-opts.def $(OPTTPL)
- $(run_ag) plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) plot_summary-opts.def
### Nroff
$(srcdir)/plot_summary.1plot_summaryman: $(srcdir)/plot_summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1plot_summaryman -Tagman-cmd.tpl plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1plot_summaryman -Tagman-cmd.tpl plot_summary-opts.def
$(srcdir)/plot_summary.man.in: $(srcdir)/plot_summary.1plot_summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summaryman > $(srcdir)/plot_summary.man.in+
### Mdoc
$(srcdir)/plot_summary.1plot_summarymdoc: $(srcdir)/plot_summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1plot_summarymdoc -Tagmdoc-cmd.tpl plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1plot_summarymdoc -Tagmdoc-cmd.tpl plot_summary-opts.def
$(srcdir)/plot_summary.mdoc.in: $(srcdir)/plot_summary.1plot_summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summarymdoc > $(srcdir)/plot_summary.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-plot_summary.texi: plot_summary-opts $(srcdir)/plot_summary-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section plot_summary-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
summary: $(srcdir)/summary-opts
$(srcdir)/summary-opts: summary-opts.def $(OPTTPL)
- $(run_ag) summary-opts.def
+ $(AM_V_GEN)$(run_ag) summary-opts.def
### Nroff
$(srcdir)/summary.1summaryman: $(srcdir)/summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1summaryman -Tagman-cmd.tpl summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1summaryman -Tagman-cmd.tpl summary-opts.def
$(srcdir)/summary.man.in: $(srcdir)/summary.1summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summaryman > $(srcdir)/summary.man.in+
### Mdoc
$(srcdir)/summary.1summarymdoc: $(srcdir)/summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1summarymdoc -Tagmdoc-cmd.tpl summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1summarymdoc -Tagmdoc-cmd.tpl summary-opts.def
$(srcdir)/summary.mdoc.in: $(srcdir)/summary.1summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summarymdoc > $(srcdir)/summary.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-summary.texi: summary-opts $(srcdir)/summary-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section summary-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section summary-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
calc_tickadj: $(srcdir)/calc_tickadj-opts
$(srcdir)/calc_tickadj-opts: $(srcdir)/calc_tickadj-opts.def
- $(run_ag) calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) calc_tickadj-opts.def
### Nroff
$(srcdir)/calc_tickadj.1calc_tickadjman: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
$(srcdir)/calc_tickadj.man.in: $(srcdir)/calc_tickadj.1calc_tickadjman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjman > $(srcdir)/calc_tickadj.man.in+
### Mdoc
$(srcdir)/calc_tickadj.1calc_tickadjmdoc: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
$(srcdir)/calc_tickadj.mdoc.in: $(srcdir)/calc_tickadj.1calc_tickadjmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjmdoc > $(srcdir)/calc_tickadj.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-calc_tickadj.texi: $(srcdir)/calc_tickadj-opts $(srcdir)/calc_tickadj-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
ntp-wait: $(srcdir)/ntp-wait-opts
$(srcdir)/ntp-wait-opts: $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) ntp-wait-opts.def
### Nroff
$(srcdir)/ntp-wait.1ntp-waitman: $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntp-waitman -Tagman-cmd.tpl ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntp-waitman -Tagman-cmd.tpl ntp-wait-opts.def
$(srcdir)/ntp-wait.man.in: $(srcdir)/ntp-wait.1ntp-waitman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitman > $(srcdir)/ntp-wait.man.in+
### Mdoc
$(srcdir)/ntp-wait.1ntp-waitmdoc: $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntp-waitmdoc -Tagmdoc-cmd.tpl ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntp-waitmdoc -Tagmdoc-cmd.tpl ntp-wait-opts.def
$(srcdir)/ntp-wait.mdoc.in: $(srcdir)/ntp-wait.1ntp-waitmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitmdoc > $(srcdir)/ntp-wait.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntp-wait.texi: ntp-wait-opts $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-wait-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
ntpsweep: $(srcdir)/ntpsweep-opts
$(srcdir)/ntpsweep-opts: ntpsweep-opts.def $(std_def_list)
- $(run_ag) ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) ntpsweep-opts.def
### Nroff
$(srcdir)/ntpsweep.1ntpsweepman: ntpsweep-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsweepman -Tagman-cmd.tpl ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsweepman -Tagman-cmd.tpl ntpsweep-opts.def
$(srcdir)/ntpsweep.man.in: ntpsweep.1ntpsweepman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepman > $(srcdir)/ntpsweep.man.in+
### Mdoc
$(srcdir)/ntpsweep.1ntpsweepmdoc: ntpsweep-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsweepmdoc -Tagmdoc-cmd.tpl ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsweepmdoc -Tagmdoc-cmd.tpl ntpsweep-opts.def
$(srcdir)/ntpsweep.mdoc.in: ntpsweep.1ntpsweepmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepmdoc > $(srcdir)/ntpsweep.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpsweep.texi: ntpsweep-opts ntpsweep-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsweep-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
ntptrace: $(srcdir)/ntptrace-opts
$(srcdir)/ntptrace-opts: $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) ntptrace-opts.def
### Nroff
$(srcdir)/ntptrace.1ntptraceman: $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntptraceman -Tagman-cmd.tpl ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntptraceman -Tagman-cmd.tpl ntptrace-opts.def
$(srcdir)/ntptrace.man.in: $(srcdir)/ntptrace.1ntptraceman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptraceman > $(srcdir)/ntptrace.man.in+
### Mdoc
$(srcdir)/ntptrace.1ntptracemdoc: $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntptracemdoc -Tagmdoc-cmd.tpl ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntptracemdoc -Tagmdoc-cmd.tpl ntptrace-opts.def
$(srcdir)/ntptrace.mdoc.in: $(srcdir)/ntptrace.1ntptracemdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptracemdoc > $(srcdir)/ntptrace.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntptrace.texi: ntptrace-opts $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntptrace-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
@: do-nothing action to avoid default SCCS get
$(srcdir)/update-leap-opts: update-leap-opts.def $(std_def_list)
- $(run_ag) update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) update-leap-opts.def
### Man
$(srcdir)/update-leap.1update-leapman: $(srcdir)/update-leap-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def
$(srcdir)/update-leap.man.in: $(srcdir)/update-leap.1update-leapman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapman > $(srcdir)/update-leap.man.in+
### Mdoc
$(srcdir)/update-leap.1update-leapmdoc: $(srcdir)/update-leap-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def
$(srcdir)/update-leap.mdoc.in: $(srcdir)/update-leap.1update-leapmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapmdoc > $(srcdir)/update-leap.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-update-leap.texi: $(srcdir)/update-leap-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
AM_LDFLAGS = $(LDFLAGS_NTP)
AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
-LDADD = version.o
-LDADD += libsntp.a
+LDADD = libsntp.a
LDADD += $(LIBOPTS_LDADD)
LDADD += $(LDADD_LIBEVENT)
LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
utilities.c \
$(NULL)
-sntp_SOURCES = \
- sntp.c \
+sntp_SOURCES = \
+ sntp.c \
+ $(NULL)
+
+nodist_sntp_SOURCES = \
+ version.c \
$(NULL)
noinst_HEADERS = \
$(NULL)
DISTCLEANFILES = \
- .version \
- version.c \
config.log \
$(man_MANS) \
$(NULL)
libtool \
$(srcdir)/sntp-opts.c \
$(srcdir)/sntp-opts.h \
- check-scm-rev \
$(srcdir)/include/version.def \
$(srcdir)/m4/version.m4 \
$(srcdir)/include/version.texi \
$(NULL)
CLEANFILES = \
- built-sources-only \
check-COPYRIGHT-submake \
+ .version \
+ version.c \
$(NULL)
man1_MANS=
install-data-local: install-html
FRC:
- @: do-nothing action to prevent default SCCS get
- @: FRC "force" depends on nothing and is not a file, so is
- @: always out-of-date causing targets which depend on it to
- @: similarly always be outdated causing their rules to fire
- @: each time they or a dependent is built.
-
-$(PROGRAMS): version.o
+ @: FRC "force" depends on nothing and is not a file, so is always
+ @: out-of-date causing targets which depend on it to also be
+ @: outdated so their rules to fire each time they are built.
## We probably need something about libevent, too
## That is probably not possible since LDADD_LIBEVENT may be
## non-file "-levent_core".
-version.c: $(sntp_OBJECTS) ../libntp/libntp.a Makefile $(srcdir)/scm-rev
- env CSET=`cat $(srcdir)/scm-rev` $(top_builddir)/../scripts/build/mkver sntp
+version.c: Makefile $(srcdir)/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(srcdir)/scm-rev` $(top_builddir)/../scripts/build/mkver sntp
check-autogen-version.def: FRC
@cd $(srcdir) \
check-scm-rev: $(srcdir)/scm-rev
@: do-nothing
-$(srcdir)/scm-rev:
- -bk root $(srcdir) >/dev/null 2>&1 && \
- cd $(srcdir)/.. && \
- x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
- y=`cat sntp/scm-rev 2>/dev/null` || true && \
+$(srcdir)/scm-rev: FRC
+ $(AM_V_at)-bk root $(srcdir) >/dev/null 2>&1 && \
+ cd $(srcdir)/.. && \
+ x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
+ y=`cat sntp/scm-rev 2>/dev/null` || true && \
case "$$x" in ''|$$y) ;; *) echo $$x > sntp/scm-rev ;; esac
$(srcdir)/m4/version.m4: $(srcdir)/../packageinfo.sh
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) sntp-opts.def
+ $(AM_V_GEN)$(run_ag) sntp-opts.def
###
$(srcdir)/sntp.1sntpman: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1sntpman -Tagman-cmd.tpl sntp-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1sntpman -Tagman-cmd.tpl sntp-opts.def
$(srcdir)/sntp.man.in: $(srcdir)/sntp.1sntpman $(srcdir)/scripts/mansec2subst.sed
sed -f $(srcdir)/scripts/mansec2subst.sed $(srcdir)/sntp.1sntpman > $(srcdir)/sntp.man.in+
###
$(srcdir)/sntp.1sntpmdoc: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1sntpmdoc -Tagmdoc-cmd.tpl sntp-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1sntpmdoc -Tagmdoc-cmd.tpl sntp-opts.def
$(srcdir)/sntp.mdoc.in: $(srcdir)/sntp.1sntpmdoc $(srcdir)/scripts/mansec2subst.sed
sed -f $(srcdir)/scripts/mansec2subst.sed $(srcdir)/sntp.1sntpmdoc > $(srcdir)/sntp.mdoc.in+
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-sntp.texi: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section sntp-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section sntp-opts.def
$(top_srcdir)/../scripts/build/check--help $@
$(srcdir)/sntp.html: $(srcdir)/invoke-sntp.texi $(srcdir)/sntp.texi $(srcdir)/include/version.texi
AC_CHECK_FUNCS([socket])
NTP_UNITYBUILD
-## HMS: if we don't find c++ we should not look for gtest.
-#AC_PROG_CXX
-#NTP_GOOGLETEST
SNTP_PROBLEM_TESTS
# while children do not. This comes into play only when introducing
# NTP_CACHEVERSION where it had not been previously used: Previous
# cached results are presumed incompatible and not used. The reason
-# children do not flush the cached is it is shared with the parent and
+# children do not flush the cache is it is shared with the parent and
# the children can rely on the parent having cleared any cache variables
# predating this mechanism. Therefore the child can rely on the
# config.cache generated by the parent on the first run despite not
for c_varname in $c_varname_list
do
- dnl AS_UNSET([$c_varname])
- dnl With Autoconf 2.61 and automake 1.10.3, using AS_UNSET
- dnl here triggers generation of a syntax error in configure.
- dnl Once we require a newer Autoconf we can revert to the
- dnl AS_UNSET code.
- { eval $c_varname=; unset $c_varname; }
+ AS_UNSET([$c_varname])
done
AC_MSG_NOTICE([[$cache_file saved by another version, ignored.]])
+++ /dev/null
-dnl ######################################################################
-dnl NTP_GOOGLETEST gtest support shared by top-level and sntp/configure.ac
-AC_DEFUN([NTP_GOOGLETEST], [
-gta=false
-AC_ARG_WITH(
- [gtest],
- [AS_HELP_STRING(
- [--with-gtest],
- [Use the gtest framework (Default: if it's available)]
- )],
- [try_gtest=$withval],
- [try_gtest=yes]
-)
-case "$try_gtest" in
- yes)
- AC_PATH_PROG([GTEST_CONFIG], [gtest-config])
- AS_UNSET([ac_cv_path_GTEST_CONFIG])
- case x${GTEST_CONFIG} in
- x) ;;
- *)
- AC_MSG_CHECKING([gtest version])
- gtest_version_test=`$GTEST_CONFIG --min-version=1.5 || echo toolow`
- case "$gtest_version_test" in
- toolow*)
- ;;
- *)
- GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
- GTEST_LIBS=`$GTEST_CONFIG --libs`
- GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
- GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
- AC_SUBST([GTEST_LDFLAGS])
- AC_SUBST([GTEST_LIBS])
- AC_SUBST([GTEST_CXXFLAGS])
- AC_SUBST([GTEST_CPPFLAGS])
- gta=true
- ;;
- esac
- gtest_version=`$GTEST_CONFIG --version`
- case "$gta" in
- true)
- AC_MSG_RESULT([($gtest_version) ok])
- ;;
- *) AC_MSG_RESULT([($gtest_version) not ok])
- ;;
- esac
- AS_UNSET([gtest_version_test])
- AS_UNSET([gtest_version])
- esac
-esac
-AM_CONDITIONAL([GTEST_AVAILABLE], [$gta])
-
-])
-dnl ======================================================================
BUILT_SOURCES =
EXTRA_PROGRAMS =
+# data CLEANFILES down below
+
CLEANFILES = \
debug-output-lfp-bin \
debug-output-lfp-dec \
kod-output-single \
testLogfile.log \
testLogfile2.log \
+ .version \
+ version.c \
$(NULL)
DISTCLEANFILES = \
- .version \
- version.c
kod-output-blank \
kod-output-single \
kod-output-multiple \
test_networking_SOURCES = \
networking.c \
run-networking.c \
- version.c \
$(NULL)
+nodist_test_networking_SOURCES = version.c
+
test_packetHandling_SOURCES = \
packetHandling.c \
run-packetHandling.c \
- version.c \
$(NULL)
+nodist_test_packetHandling_SOURCES = version.c
+
test_kodDatabase_SOURCES = \
kodDatabase.c \
run-kodDatabase.c \
- version.c \
$(NULL)
+nodist_test_kodDatabase_SOURCES = version.c
+
test_keyFile_SOURCES = \
fileHandlingTest.c \
keyFile.c \
run-keyFile.c \
- version.c \
$(NULL)
+nodist_test_keyFile_SOURCES = version.c
+
test_kodFile_SOURCES = \
fileHandlingTest.c \
kodFile.c \
run-kodFile.c \
- version.c \
$(NULL)
+nodist_test_kodFile_SOURCES = version.c
+
test_packetProcessing_SOURCES = \
packetProcessing.c \
run-packetProcessing.c \
sntptest.c \
$(NULL)
+nodist_test_packetProcessing_SOURCES = version.c
+
test_utilities_SOURCES = \
fileHandlingTest.c \
utilities.c \
run-utilities.c \
$(NULL)
+nodist_test_utilities_SOURCES = version.c
+
test_crypto_CFLAGS = \
$(CFLAGS_LIBEVENT) \
$(AM_CFLAGS) \
test_crypto_SOURCES = \
crypto.c \
run-crypto.c \
- version.c \
$(NULL)
+nodist_test_crypto_SOURCES = version.c
+
test_log_SOURCES = \
t-log.c \
run-t-log.c \
- version.c \
$(NULL)
+nodist_test_log_SOURCES = version.c
+
$(srcdir)/run-kodFile.c: $(srcdir)/kodFile.c $(std_unity_list)
$(run_unity) $< $@
#TESTS += tests-runner
#endif
-version.c: ../../libntp/libntp.a ../unity/libunity.a Makefile $(top_srcdir)/scm-rev
- env CSET=`cat $(srcdir)/../scm-rev` $(top_builddir)/../scripts/build/mkver sntp-tests
+version.c: Makefile $(top_srcdir)/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(srcdir)/../scm-rev` $(top_builddir)/../scripts/build/mkver sntp-tests
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+$(top_srcdir)/scm-rev: FRC.scm-rev
+ $(AM_V_GEN)cd .. && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-$(top_srcdir)/scm-rev:
- cd .. && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+FRC.scm-rev:
+ @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
+ always out-of-date causing targets which depend on it to also \
+ be outdated so their rules to fire each time they are built.
include $(top_srcdir)/check-libntp.mf
include $(top_srcdir)/check-libsntp.mf
#define CMAC_LENGTH 16
-const char * Version = "stub unit test Version string";
-
/* Hacks into the key database. */
extern struct key* key_ptr;
extern int key_cnt;
#include "config.h"
-#include "ntp_stdlib.h"
-#include "sntp-opts.h"
#include "sntptest.h"
void
opts[2] = estrdup(argument);
opts[3] = estrdup("127.0.0.1");
- optionProcess(&sntpOptions, ARGV_SIZE, opts);
+ optionProcess(&sntpOptions, COUNTOF(opts), opts);
}
#define SNTPTEST_H
#include "ntp_stdlib.h"
+#include "ntp_types.h"
#include "sntp-opts.h"
void sntptest(void);
void test_LfpOutputDecimalFormat(void);
-const char * Version = "stub unit test Version string";
-
-
sockaddr_u
CreateSockaddr4(const char* address) {
sockaddr_u s;
# LDADD might need RESLIB and ADJLIB
LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
tg2_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
-ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a
+ntp_keygen_LDADD = $(LIBOPTS_LDADD) ../libntp/libntp.a
ntp_keygen_LDADD += $(LDADD_LIBEVENT)
ntp_keygen_LDADD += $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM)
ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
+nodist_ntp_keygen_SOURCES = version.c
tickadj_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(LDADD_NLIST)
$(NULL)
BUILT_SOURCES= ntp-keygen-opts.c ntp-keygen-opts.h
-CLEANFILES=
-DISTCLEANFILES= .version version.c config.log $(man_MANS)
+CLEANFILES = .version version.c
+DISTCLEANFILES= config.log $(man_MANS)
html_DATA= \
$(srcdir)/ntp-keygen.html \
kern.o: kern.c
$(COMPILE) -DHAVE_TIMEX_H -c kern.c
-$(PROGRAMS): version.o
-
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntp_keygen_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntp-keygen
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntp-keygen
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libntp.mf
include $(top_srcdir)/check-libopts.mf
+include $(top_srcdir)/check-scm-rev.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf