[ntp:bk-ntp-dev-send] BitKeeper diffs

Harlan Stenn stenn at deacon.udel.edu
Wed Feb 23 00:08:22 UTC 2011


#### ChangeSet ####
2011-02-22 23:21:13+00:00, davehart at shiny.ad.hartbrothers.com
  [Bug 1834] ntpdate 4.2.7p131 aborts with assertion failure.
  Move sntp last in top-level Makefile.am SUBDIRS so that the libevent
    tearoff (if required) and sntp are compiled after the rest.
  Use a single set of Automake options for each package in configure.ac
    AM_INIT, remove Makefile.am AUTOMAKE_OPTIONS= lines.
  Correct spurious sntp rebuilds triggered by a make misperception
    sntp/version was out-of-date relative to phony target FRC.version.
  Do not cache paths to perl, test, or pkg-config, searching the PATH
    at configure time is worth it to pick up tool updates.

==== ChangeLog ====
2011-02-22 23:21:09+00:00, davehart at shiny.ad.hartbrothers.com +9 -0
  [Bug 1834] ntpdate 4.2.7p131 aborts with assertion failure.
  Move sntp last in top-level Makefile.am SUBDIRS so that the libevent
    tearoff (if required) and sntp are compiled after the rest.
  Use a single set of Automake options for each package in configure.ac
    AM_INIT, remove Makefile.am AUTOMAKE_OPTIONS= lines.
  Correct spurious sntp rebuilds triggered by a make misperception
    sntp/version was out-of-date relative to phony target FRC.version.
  Do not cache paths to perl, test, or pkg-config, searching the PATH
    at configure time is worth it to pick up tool updates.

--- 1.796/ChangeLog	2011-02-22 03:28:28 -05:00
+++ 1.797/ChangeLog	2011-02-22 18:21:09 -05:00
@@ -1,3 +1,12 @@
+* [Bug 1834] ntpdate 4.2.7p131 aborts with assertion failure.
+* Move sntp last in top-level Makefile.am SUBDIRS so that the libevent
+  tearoff (if required) and sntp are compiled after the rest.
+* Use a single set of Automake options for each package in configure.ac
+  AM_INIT, remove Makefile.am AUTOMAKE_OPTIONS= lines.
+* Correct spurious sntp rebuilds triggered by a make misperception
+  sntp/version was out-of-date relative to phony target FRC.version.
+* Do not cache paths to perl, test, or pkg-config, searching the PATH
+  at configure time is worth it to pick up tool updates.
 (4.2.7p132) 2011/02/22 Released by Harlan Stenn <stenn at ntp.org>
 * [Bug 1832] ntpdate doesn't allow timeout > 2s.
 * [Bug 1833] The checking sem_timedwait() fails without -pthread.

==== Makefile.am ====
2011-02-22 23:21:09+00:00, davehart at shiny.ad.hartbrothers.com +1 -5
  Distribute includes.mf.
  Build sntp late in the game to exhibit problems elsewhere first.

--- 1.107/Makefile.am	2011-02-22 02:51:35 -05:00
+++ 1.108/Makefile.am	2011-02-22 18:21:09 -05:00
@@ -6,7 +6,6 @@ SUBDIRS = 		\
 	scripts 	\
 	include 	\
 	libntp		\
-	sntp		\
 	libparse	\
 	ntpd		\
 	ntpdate		\
@@ -18,6 +17,7 @@ SUBDIRS = 		\
 	clockstuff	\
 	kernel		\
 	util		\
+	sntp		\
 	tests		\
 	$(NULL)
 
@@ -51,16 +51,12 @@ EXTRA_DIST =			\
 	lib/isc			\
 	ports			\
 	\
-	bincheck.mf		\
-	depsver.mf		\
 	deps-ver		\
 	\
 	$(NULL)
 
 CLEANFILES =
 DISTCLEANFILES = .gcc-warning
-
-ETAGS_ARGS = Makefile.am configure.ac
 
 # HMS: Keep .gcc-warning first, as that way it gets printed first.
 BUILT_SOURCES =				\

==== adjtimed/Makefile.am ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +6 -11
  use check-libntp.mf.

--- 1.11/adjtimed/Makefile.am	2011-02-22 01:06:25 -05:00
+++ 1.12/adjtimed/Makefile.am	2011-02-22 18:21:10 -05:00
@@ -1,28 +1,23 @@
 ## adjtimed Makefile.am
 
 if NTP_BINSUBDIR_IS_BIN
-bin_PROGRAMS=	@MAKE_ADJTIMED@
+bin_PROGRAMS = @MAKE_ADJTIMED@
 else
-sbin_PROGRAMS=	@MAKE_ADJTIMED@
+sbin_PROGRAMS =	@MAKE_ADJTIMED@
 endif
 
-BUILT_SOURCES= check-libntp
-CLEANFILES=
-EXTRA_PROGRAMS=	adjtimed
+BUILT_SOURCES =
+CLEANFILES =
+EXTRA_PROGRAMS = adjtimed
 
 AM_CFLAGS = $(CFLAGS_NTP)
 
 AM_CPPFLAGS  = $(NTP_INCS)
-AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
 AM_CPPFLAGS += $(CPPFLAGS_NTP)
 
 LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(PTHREAD_LIBS)
 
-check-libntp: FRC
-	cd ../libntp && $(MAKE)
-
-FRC:
-
 include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/sntp/check-libntp.mf
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf

==== check-libopts.mf ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +14 -0
  BitKeeper file C:/ntp/ntp-dev-1834/check-libopts.mf

--- /dev/null	2011-02-22 19:08:17 -05:00
+++ 1.1/check-libopts.mf	2011-02-22 18:21:10 -05:00
@@ -0,0 +1,14 @@
+## check-libopts.mf - automake fragment
+##
+## If we are not using the tearoff libopts, we won't be
+## building its libopts.la, so the submake is allowed
+## to fail.
+
+BUILT_SOURCES	+= check-libopts
+CLEANFILES	+= check-libopts
+
+check-libopts: ../sntp/libopts/libopts.la
+	@echo stamp > $@
+
+../sntp/libopts/libopts.la:
+	-cd ../sntp/libopts && $(MAKE) libopts.la

==== check-libopts.mf ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +0 -0

==== clockstuff/Makefile.am ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +3 -12
  use check-libntp.mf and check-libopts.mf.

--- 1.18/clockstuff/Makefile.am	2011-02-22 01:06:25 -05:00
+++ 1.19/clockstuff/Makefile.am	2011-02-22 18:21:10 -05:00
@@ -1,7 +1,7 @@
 noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
 EXTRA_PROGRAMS = propdelay chutest clktest
 
-BUILT_SOURCES =	check-libntp clktest-opts.c clktest-opts.h
+BUILT_SOURCES =	clktest-opts.c clktest-opts.h
 EXTRA_DIST = clktest-opts.def
 
 clktest_SOURCES = clktest.c clktest-opts.c clktest-opts.h
@@ -31,18 +31,9 @@ $(srcdir)/clktest-opts.h: $(srcdir)/clkt
 $(srcdir)/clktest-opts.c: $(srcdir)/clktest-opts.def $(std_def_list)
 	$(run_ag) clktest-opts.def
 
-## chutest$(EXEEXT): ../libntp/libntp.a
-## clktest$(EXEEXT): ../libntp/libntp.a
-
-check-libntp: FRC
-	cd ../libntp && $(MAKE)
-
-FRC:
-
-../libntp/libntp.a:
-	cd ../libntp && $(MAKE)
-
 CLEANFILES =
 
+include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libopts.mf
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf

==== configure.ac ====
2011-02-22 23:21:09+00:00, davehart at shiny.ad.hartbrothers.com +12 -2
  Do not cache paths to perl, test, or pkg-config, searching the PATH
    at configure time is worth it to pick up tool updates.

--- 1.517/configure.ac	2011-02-22 02:51:36 -05:00
+++ 1.518/configure.ac	2011-02-22 18:21:09 -05:00
@@ -103,6 +103,8 @@ esac
 
 dnl  we need to check for cross compile tools for vxWorks here
 AC_PROG_AWK
+AS_UNSET([ac_cv_prog_AWK])
+AC_SUBST([AWK])				dnl scripts/ntpver.in
 AC_PROG_MAKE_SET
 
 AC_SUBST([CFLAGS])
@@ -111,9 +113,16 @@ AC_SUBST([LDFLAGS])
 AC_PROG_LN_S
 AC_ISC_POSIX
 
+
 AC_PATH_PROG([PATH_PERL], [perl])
-AC_PATH_PROG([PATH_SH], [sh])
+dnl  Saving cached hardcoded paths rather than searching $PATH during a
+dnl  cached configure run is an optimization not worth the the cost of
+dnl  preventing newly-installed tools from being found.  Short-circuit
+dnl  the caching after the tests so preset overrides still work.
+AS_UNSET([ac_cv_path_PATH_PERL])
 AC_PATH_PROG([PATH_TEST], [test])
+AS_UNSET([ac_cv_path_PATH_TEST])
+AC_SUBST([CONFIG_SHELL])		dnl for scripts #!/path/to/sh
 
 AC_ARG_WITH(
     [net-snmp-config],
@@ -147,7 +156,8 @@ case "$PROG_NET_SNMP_CONFIG" in
     ;;
  *)
     AC_PATH_PROG([PATH_NET_SNMP_CONFIG], [$PROG_NET_SNMP_CONFIG])
-    ;;
+    AS_UNSET([ac_cv_path_PATH_NET_SNMP_CONFIG])
+;;
 esac
 AC_MSG_RESULT([$PATH_NET_SNMP_CONFIG])
 

==== include/Makefile.am ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +0 -2
  Use a single set of Automake options per package in AM_INIT

--- 1.46/include/Makefile.am	2011-02-20 15:47:36 -05:00
+++ 1.47/include/Makefile.am	2011-02-22 18:21:10 -05:00
@@ -1,6 +1,4 @@
 NULL =
-AUTOMAKE_OPTIONS = 
-ETAGS_ARGS = $(srcdir)/Makefile.am
 
 SUBDIRS = isc
 

==== include/isc/Makefile.am ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +0 -2
  Use a single set of Automake options per package in AM_INIT

--- 1.1/include/isc/Makefile.am	2009-10-27 17:53:49 -04:00
+++ 1.2/include/isc/Makefile.am	2011-02-22 18:21:10 -05:00
@@ -1,6 +1,4 @@
 NULL =
-AUTOMAKE_OPTIONS = 
-ETAGS_ARGS = $(srcdir)/Makefile.am
 
 noinst_HEADERS =	\
 	mem.h		\

==== libparse/Makefile.am ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +7 -10
  add check-libparse target for ntpd/Makefile.am use

--- 1.25/libparse/Makefile.am	2011-02-22 01:06:25 -05:00
+++ 1.26/libparse/Makefile.am	2011-02-22 18:21:10 -05:00
@@ -1,10 +1,10 @@
 NULL=
-BUILT_SOURCES = check-libntp
+BUILT_SOURCES =
+CLEANFILES =
 noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@
 EXTRA_LIBRARIES = libparse.a libparse_kernel.a
 EXTRA_PROGRAMS = parsestreams parsesolaris
 noinst_PROGRAMS = @MAKE_PARSEKMODULE@
-CLEANFILES =
 
 K_CFLAGS = -DPARSESTREAM -DNTP_NEED_BOPS
 
@@ -125,19 +125,16 @@ parsestreams.loadable_module.o: $(parses
 parse: $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a
 	$(LD) -r -o $@ $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a
 
-check-libntp: FRC
-	cd ../libntp && $(MAKE)
-
-FRC:
-
-../libntp/libntp.a:
-	cd ../libntp && $(MAKE)
-
 parsesolaris.o: sys/systm.h
 
 sys/systm.h:
 	-mkdir sys
 	sed -e '/ffs(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
 
+## check-libparse is invoked by ntpd/Makefile.am
+check-libparse: $(noinst_LIBRARIES)
+	@: do-nothing action to avoid default SCCS get
+
+include $(top_srcdir)/sntp/check-libntp.mf
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf

==== ntpd/Makefile.am ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +12 -20
  Use a single set of Automake options per package in AM_INIT

--- 1.100/ntpd/Makefile.am	2011-02-22 01:06:25 -05:00
+++ 1.101/ntpd/Makefile.am	2011-02-22 18:21:10 -05:00
@@ -1,5 +1,4 @@
 NULL=
-AUTOMAKE_OPTIONS= 
 
 if NTP_BINSUBDIR_IS_BIN
 bin_PROGRAMS=	ntpd @MAKE_NTPDSIM@
@@ -73,7 +72,7 @@ B_S_DIST=			\
 
 BUILT_SOURCES=		\
 	$(VPHACK) 	\
-	check-libntp	\
+	$(LIBPARSE)	\
 	ntp_parser.c 	\
 	ntp_parser.h 	\
 	$(VPHACK_AFTER)	\
@@ -86,14 +85,14 @@ man_MANS=	$(srcdir)/ntpd.1
 # 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) @LCRYPTO@ @LSCF@
+LDADD_NTPD_COMMON  = @LDADD_LIBNTP@ $(LIBOPTS_LDADD) $(PTHREAD_LIBS)
+LDADD_NTPD_COMMON += $(LIBM) $(LCRYPTO) $(LSCF)
 ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_NTPD_COMMON)
 ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a $(LDADD_NTPD_COMMON)
 ntpdsim_CPPFLAGS = $(AM_CPPFLAGS) -DSIM
-check_y2k_LDADD = $(LDADD) ../libntp/libntp.a @LDADD_LIBNTP@ @PTHREAD_LIBS@
+check_y2k_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(PTHREAD_LIBS)
 ## we don't want $(LDADD) in keyword_gen_LDADD
-keyword_gen_LDADD = ../libntp/libntp.a @LDADD_LIBNTP@ @PTHREAD_LIBS@
+keyword_gen_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(PTHREAD_LIBS)
 
 DISTCLEANFILES =		\
 	keyword-gen		\
@@ -120,7 +119,6 @@ EXTRA_DIST =			\
 	$(B_S_DIST)		\
 	$(NULL)
 
-ETAGS_ARGS = Makefile.am
 ###							Y2Kfixes
 check_PROGRAMS = @MAKE_CHECK_Y2K@
 EXTRA_PROGRAMS = check_y2k ntpdsim keyword-gen
@@ -135,8 +133,8 @@ std_def_list =							\
 	$(top_srcdir)/sntp/include/version.def			\
 	$(NULL)
 
-check-local: @MAKE_CHECK_Y2K@ $(CHECK_SAVECONFIG)
-	test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@
+check-local: $(MAKE_CHECK_Y2K) $(CHECK_SAVECONFIG)
+	test -z "$(MAKE_CHECK_Y2K)" || ./$(MAKE_CHECK_Y2K)
 
 ntpd_SOURCES =			\
 	ntp_config.c		\
@@ -263,19 +261,11 @@ check-saveconfig: $(srcdir)/complete.con
 	-diff $(srcdir)/complete.conf compsave.conf
 	cmp $(srcdir)/complete.conf compsave.conf && echo stamp > $@
 
-../libopts/libopts.la:
-	cd ../libopts && $(MAKE) libopts.la
-
-check-libntp: FRC
-	cd ../libntp && $(MAKE)
-
-FRC:
-
-../libntp/libntp.a:
-	cd ../libntp && $(MAKE)
+../libntp/libntpsim.a:
+	cd ../libntp && $(MAKE) libntpsim.a
 
 ../libparse/libparse.a:
-	cd ../libparse && $(MAKE) libparse.a
+	cd ../libparse && $(MAKE) check-libparse
 
 $(top_srcdir)/sntp/version:
 	cd $(top_srcdir)/sntp && $(MAKE) version
@@ -285,5 +275,7 @@ version.o: $(ntpd_OBJECTS) ../libntp/lib
 	$(COMPILE) -c version.c
 
 include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/check-libopts.mf
+include $(top_srcdir)/sntp/check-libntp.mf
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf

==== ntpdate/Makefile.am ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +8 -15
  use check-libntp.mf.

--- 1.28/ntpdate/Makefile.am	2011-02-22 01:06:25 -05:00
+++ 1.29/ntpdate/Makefile.am	2011-02-22 18:21:10 -05:00
@@ -1,17 +1,17 @@
-NULL=
+NULL =
 
-BUILT_SOURCES= check-libntp
-CLEANFILES=
+BUILT_SOURCES =
+CLEANFILES =
 
 if NTP_BINSUBDIR_IS_BIN
-bin_PROGRAMS=	ntpdate
+bin_PROGRAMS = ntpdate
 else
-sbin_PROGRAMS=	ntpdate
+sbin_PROGRAMS = ntpdate
 endif
 
-EXTRA_PROGRAMS=	ntptimeset
+EXTRA_PROGRAMS = ntptimeset
 
-ntptimeset_SOURCES=	ntptimeset.c ntptime_config.c
+ntptimeset_SOURCES = ntptimeset.c ntptime_config.c
 
 AM_CFLAGS = $(CFLAGS_NTP)
 
@@ -27,14 +27,6 @@ noinst_HEADERS=	ntpdate.h
 
 $(PROGRAMS): $(LDADD)
 
-check-libntp: FRC
-	cd ../libntp && $(MAKE)
-
-FRC:
-
-../libntp/libntp.a:
-	cd ../libntp && $(MAKE)
-
 $(top_srcdir)/sntp/version:
 	cd $(top_srcdir)/sntp && $(MAKE) version
 
@@ -43,5 +35,6 @@ version.o: $(ntpdate_OBJECTS) ../libntp/
 	$(COMPILE) -c version.c
 
 include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/sntp/check-libntp.mf
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf

==== ntpdate/ntpdate.c ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +1 -1
  [Bug 1834] ntpdate 4.2.7p131 aborts with assertion failure.

--- 1.84/ntpdate/ntpdate.c	2011-02-22 01:06:25 -05:00
+++ 1.85/ntpdate/ntpdate.c	2011-02-22 18:21:10 -05:00
@@ -1764,7 +1764,7 @@ init_io(void)
 		 */
 		if (check_ntp_port_in_use) {
 			ZERO(addr);
-			INSIST(res->ai_addrlen < sizeof(addr));
+			INSIST(res->ai_addrlen <= sizeof(addr));
 			memcpy(&addr, res->ai_addr, res->ai_addrlen);
 			rc = bind(fd[nbsock], &addr.sa, SOCKLEN(&addr));
 			if (rc < 0) {

==== ntpdc/Makefile.am ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +3 -9
  make sure libopts.la is up-to-date.

--- 1.58/ntpdc/Makefile.am	2011-02-22 01:06:26 -05:00
+++ 1.59/ntpdc/Makefile.am	2011-02-22 18:21:10 -05:00
@@ -8,7 +8,7 @@ endif
 
 EXTRA_PROGRAMS=	ntpdc-layout
 EXTRA_DATA=	check-layout
-BUILT_SOURCES=	check-libntp @MAKE_CHECK_LAYOUT@ ntpdc-opts.c ntpdc-opts.h
+BUILT_SOURCES=	@MAKE_CHECK_LAYOUT@ ntpdc-opts.c ntpdc-opts.h
 
 AM_CFLAGS = $(CFLAGS_NTP)
 
@@ -69,14 +69,6 @@ check-layout: ntpdc-layout $(srcdir)/lay
 
 $(PROGRAMS): version.o
 
-check-libntp: FRC
-	cd ../libntp && $(MAKE)
-
-FRC:
-
-../libntp/libntp.a:
-	cd ../libntp && $(MAKE)
-
 $(top_srcdir)/sntp/version:
 	cd $(top_srcdir)/sntp && $(MAKE) version
 
@@ -90,5 +82,7 @@ nl.c: nl_in.c nl.pl Makefile.am ../confi
 	$(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
 
 include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/check-libopts.mf
+include $(top_srcdir)/sntp/check-libntp.mf
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf

==== ntpq/Makefile.am ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +3 -9
  make sure libopts.la is up-to-date.

--- 1.54/ntpq/Makefile.am	2011-02-22 01:06:26 -05:00
+++ 1.55/ntpq/Makefile.am	2011-02-22 18:21:10 -05:00
@@ -23,7 +23,7 @@ CLEANFILES=
 DISTCLEANFILES=	.version version.c
 ETAGS_ARGS=	Makefile.am
 EXTRA_DIST=	ntpq-opts.def ntpq.1 ntpq-opts.texi ntpq-opts.menu
-BUILT_SOURCES=	check-libntp ntpq-opts.c ntpq-opts.h
+BUILT_SOURCES=	ntpq-opts.c ntpq-opts.h
 man_MANS=	$(srcdir)/ntpq.1
 noinst_DATA=	$(srcdir)/ntpq-opts.texi $(srcdir)/ntpq-opts.menu
 run_ag=		cd $(srcdir) &&	env PATH="$(abs_builddir):$(PATH)"	\
@@ -55,14 +55,6 @@ $(srcdir)/ntpq-opts.texi: $(srcdir)/ntpq
 	$(run_ag) -Taginfo.tpl -DLEVEL=section ntpq-opts.def
 	$(top_srcdir)/scripts/check--help $@
 
-check-libntp: FRC
-	cd ../libntp && $(MAKE)
-
-FRC:
-
-../libntp/libntp.a:
-	cd ../libntp && $(MAKE)
-
 $(top_srcdir)/sntp/version:
 	cd $(top_srcdir)/sntp && $(MAKE) version
 
@@ -73,5 +65,7 @@ version.o: $(ntpq_OBJECTS) ../libntp/lib
 	$(COMPILE) -c version.c
 
 include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/check-libopts.mf
+include $(top_srcdir)/sntp/check-libntp.mf
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf

==== ntpsnmpd/Makefile.am ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +3 -9
  use check-libntp.mf and check-libopts.mf.

--- 1.26/ntpsnmpd/Makefile.am	2011-02-22 01:06:26 -05:00
+++ 1.27/ntpsnmpd/Makefile.am	2011-02-22 18:21:10 -05:00
@@ -24,7 +24,7 @@ AM_CPPFLAGS += $(CPPFLAGS_NTP)
 
 EXTRA_DIST=	ntpsnmpd-opts.def ntpsnmpd.1 ntpsnmpd-opts.texi	\
 		ntpsnmpd-opts.menu ntpv4-mib.mib
-BUILT_SOURCES=	check-libntp ntpsnmpd-opts.c ntpsnmpd-opts.h
+BUILT_SOURCES=	ntpsnmpd-opts.c ntpsnmpd-opts.h
 CLEANFILES=
 noinst_DATA=	$(srcdir)/ntpsnmpd-opts.texi $(srcdir)/ntpsnmpd-opts.menu
 man_MANS=	$(srcdir)/ntpsnmpd.1
@@ -54,14 +54,8 @@ $(srcdir)/ntpsnmpd-opts.texi: $(srcdir)/
 	$(run_ag) -Taginfo.tpl -DLEVEL=section ntpsnmpd-opts.def
 	$(top_srcdir)/scripts/check--help $@
 
-check-libntp: FRC
-	cd ../libntp && $(MAKE)
-
-FRC:
-
-../libntp/libntp.a:
-	cd ../libntp && $(MAKE)
-
 include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libopts.mf
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf

==== scripts/mkver.in ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +1 -1
  Use CONFIG_SHELL for #! line instead of AC_PATH_PROG(sh).

--- 1.12/scripts/mkver.in	2010-01-24 03:49:44 -05:00
+++ 1.13/scripts/mkver.in	2011-02-22 18:21:10 -05:00
@@ -1,4 +1,4 @@
-#!@PATH_SH@
+#!@CONFIG_SHELL@
 PROG=${1-UNKNOWN}
 
 ConfStr="$PROG"

==== scripts/ntpver.in ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +2 -2
  Use CONFIG_SHELL for #! line instead of AC_PATH_PROG(sh).
  Use @AWK@ from AC_PROG_AWK instead of 'awk'.

--- 1.2/scripts/ntpver.in	2001-10-08 21:18:32 -04:00
+++ 1.3/scripts/ntpver.in	2011-02-22 18:21:10 -05:00
@@ -1,7 +1,7 @@
-#!@PATH_SH@
+#!@CONFIG_SHELL@
 # print version string of NTP daemon
 # Copyright (c) 1997 by Ulrich Windl
 # Modified 970318: Harlan Stenn: rewritten...
 # usage: ntpver hostname
 
-ntpq -c "rv 0 daemon_version" $* | awk '/daemon_version/ { print $2 }'
+ntpq -c "rv 0 daemon_version" $* | @AWK@ '/daemon_version/ { print $2 }'

==== sntp/Makefile.am ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +14 -20
  Distribute includes.mf.

--- 1.56/sntp/Makefile.am	2011-02-22 01:06:26 -05:00
+++ 1.57/sntp/Makefile.am	2011-02-22 18:21:10 -05:00
@@ -92,10 +92,8 @@ DISTCLEANFILES =			\
 	$(NULL)
 
 EXTRA_DIST =				\
-	bincheck.mf			\
 	$(srcdir)/COPYRIGHT		\
 	deps-ver			\
-	depsver.mf			\
 	@NTP_FORCE_LIBEVENT_DIST@	\
 	sntp-opts.def			\
 	sntp-opts.menu			\
@@ -109,12 +107,11 @@ EXTRA_DIST =				\
 	$(NULL)
 
 BUILT_SOURCES =				\
-	check-libntp			\
 	$(srcdir)/COPYRIGHT		\
 	libtool				\
 	$(srcdir)/sntp-opts.c		\
 	$(srcdir)/sntp-opts.h		\
-	$(srcdir)/version		\
+	check-version			\
 	$(srcdir)/include/version.def	\
 	$(srcdir)/m4/version.m4		\
 	$(srcdir)/include/version.texi	\
@@ -137,7 +134,7 @@ noinst_DATA=				\
 	$(srcdir)/sntp-opts.menu	\
 	$(NULL)
 
-FRC FRC.version:
+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
@@ -147,8 +144,11 @@ FRC FRC.version:
 $(PROGRAMS): version.o
 
 ## We probably need something about libevent, too
-version.o: $(sntp_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
-	env CSET=`cat $(top_srcdir)/version` ../$(top_builddir)/scripts/mkver sntp
+## That is probably not possible since LDADD_LIBEVENT may be
+## non-file "-levent_core".
+
+version.o: $(sntp_OBJECTS) ../libntp/libntp.a $(srcdir)/version
+	env CSET=`cat $(srcdir)/version` $(top_builddir)/../scripts/mkver sntp
 	$(COMPILE) -c version.c
 
 check-autogen-version.def: FRC
@@ -166,13 +166,11 @@ $(srcdir)/autogen-version.def:
 built-sources-only: $(BUILT_SOURCES)
 	@: do-nothing action to avoid default SCCS get
 
-# HMS: The next bit is still suboptimal.  If bk is present but this NTP
-# repo is not a bk repo, we'll get an error message from the prs command.
-# Unfortunately, I haven't found the necessary magic to redirect this error
-# output to /dev/null under ancient/unique shells like the one Ultrix uses.
-# We'll also get an error if srcdir or version is unwritable.
-$(srcdir)/version: FRC.version
-	-test -r $(srcdir)/../SCCS/s.ChangeSet &&				\
+## HMS: The next bit is still suboptimal.  We'll get an error if this is
+## a bk repo and srcdir or version is unwritable.
+
+check-version:
+	-test -r $(srcdir)/../SCCS/s.ChangeSet &&		\
 	    (bk version) >/dev/null 2>&1 &&			\
 	    cd $(srcdir)/.. &&					\
 	    x=`bk -R prs -hr+ -nd:I: ChangeSet` &&		\
@@ -227,12 +225,6 @@ $(srcdir)/sntp-opts.texi: $(srcdir)/sntp
 $(srcdir)/sntp.html: $(srcdir)/sntp-opts.menu $(srcdir)/sntp-opts.texi $(srcdir)/sntp.texi $(srcdir)/include/version.texi
 	cd $(srcdir) && ( makeinfo --force --html --no-split -o sntp.html sntp.texi || true )
 
-check-libntp: FRC
-	cd ../libntp && $(MAKE)
-
-../libntp/libntp.a:
-	cd ../libntp && $(MAKE)
-
 libtool: $(LIBTOOL_DEPS)
 	./config.status --recheck
 
@@ -243,5 +235,7 @@ dist-hook: libevent-dist-hook
 	@: do-nothing action to avoid default SCCS get
 
 include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/check-libntp.mf
+include $(top_srcdir)/check-libopts.mf
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf

==== sntp/check-libntp.mf ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +15 -0
  BitKeeper file C:/ntp/ntp-dev-1834/sntp/check-libntp.mf

--- /dev/null	2011-02-22 19:08:17 -05:00
+++ 1.1/sntp/check-libntp.mf	2011-02-22 18:21:10 -05:00
@@ -0,0 +1,15 @@
+## check-libntp.mf - automake fragment
+##
+## tests/libntp/Makefile.am
+## sntp/tests/Makefile.am
+## The above files have adaptations of this for deeper nesting.
+
+BUILT_SOURCES	+= check-libntp
+CLEANFILES	+= check-libntp
+
+check-libntp: ../libntp/libntp.a
+	@echo stamp > $@
+
+../libntp/libntp.a:
+	cd ../libntp && $(MAKE) libntp.a
+

==== sntp/check-libntp.mf ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +0 -0

==== sntp/check-libopts.mf ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +14 -0
  BitKeeper file C:/ntp/ntp-dev-1834/sntp/check-libopts.mf

--- /dev/null	2011-02-22 19:08:17 -05:00
+++ 1.1/sntp/check-libopts.mf	2011-02-22 18:21:10 -05:00
@@ -0,0 +1,14 @@
+## check-libopts.mf - automake fragment
+##
+## If we are not using the tearoff libopts, we won't be
+## building its libopts.la, so the submake is allowed
+## to fail.
+
+BUILT_SOURCES	+= check-libopts
+CLEANFILES	+= check-libopts
+
+check-libopts: libopts/libopts.la
+	@echo stamp > $@
+
+libopts/libopts.la:
+	-cd libopts && $(MAKE) libopts.la

==== sntp/check-libopts.mf ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +0 -0

==== sntp/m4/ntp_googletest.m4 ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +1 -0
  Do not cache paths to perl, test, or pkg-config, searching the PATH
    at configure time is worth it to pick up tool updates.

--- 1.2/sntp/m4/ntp_googletest.m4	2011-01-12 00:22:50 -05:00
+++ 1.3/sntp/m4/ntp_googletest.m4	2011-02-22 18:21:10 -05:00
@@ -14,6 +14,7 @@ AC_ARG_WITH(
 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) ;;
      *)

==== sntp/m4/ntp_libevent.m4 ====
2011-02-22 23:21:10+00:00, davehart at shiny.ad.hartbrothers.com +1 -15
  Use NTP_PKG_CONFIG.

--- 1.4/sntp/m4/ntp_libevent.m4	2011-02-22 01:06:26 -05:00
+++ 1.5/sntp/m4/ntp_libevent.m4	2011-02-22 18:21:10 -05:00
@@ -14,27 +14,13 @@ dnl    NTP_LIBEVENT_CHECK_NOBUILD([2.0.9
 dnl    NTP_LIBEVENT_CHECK
 dnl
 AC_DEFUN([NTP_LIBEVENT_CHECK_NOBUILD], [
+AC_REQUIRE([NTP_PKG_CONFIG])dnl
 
-ntp_pkgconfig_min_version='0.15.0'
 ntp_libevent_min_version=m4_default([$1], [2.0.9])
 ntp_libevent_tearoff=m4_default([$2], [libevent])
 
 AC_SUBST([CPPFLAGS_LIBEVENT])
 AC_SUBST([LDADD_LIBEVENT])
-
-AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-# Make sure pkg-config is recent enough
-case "$PKG_CONFIG" in
- /*)
-    AC_MSG_CHECKING([if pkg-config is at least version $ntp_pkgconfig_min_version])
-    if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
-	AC_MSG_RESULT([yes])
-    else
-	AC_MSG_RESULT([no])
-	PKG_CONFIG=""
-    fi
-    ;;
-esac
 
 AC_ARG_ENABLE(
     [local-libevent],

==== sntp/m4/ntp_openssl.m4 ====
2011-02-22 23:21:11+00:00, davehart at shiny.ad.hartbrothers.com +10 -23
  Use NTP_PKG_CONFIG.
  Attempt to fix broken need_dash_r logic.

--- 1.15/sntp/m4/ntp_openssl.m4	2011-01-12 00:23:47 -05:00
+++ 1.16/sntp/m4/ntp_openssl.m4	2011-02-22 18:21:11 -05:00
@@ -1,6 +1,7 @@
 dnl ######################################################################
 dnl OpenSSL support shared by top-level and sntp/configure.ac
 AC_DEFUN([NTP_OPENSSL], [
+AC_REQUIRE([NTP_PKG_CONFIG])dnl
 
 LCRYPTO=
 AC_SUBST([LCRYPTO])
@@ -14,31 +15,19 @@ AC_ARG_WITH(
     [ans=$withval],
     [ans=x]
 )
+need_dash_r=
 case "$ans" in
- no)
-    need_dash_r=
-    ;;
  yes)
     need_dash_r=1
     ;;
-esac
-# HMS: Why isn't this $build?
-# Well, that depends on if we need this for the build toolchain or
-# for info in the host executable...
-# I still have no idea which way this should go, but nobody has complained.
-case "$host" in
- *-*-netbsd*)
-    case "$need_dash_r" in
-     no) ;;
-     *)  need_dash_r=1
-	 ;;
-    esac
-    ;;
- *-*-solaris*)
-    case "$need_dash_r" in
-     no) ;;
-     *)  need_dash_r=1
-	 ;;
+ x)
+    case "$host" in
+     *-*-netbsd*)
+	need_dash_r=1
+	;;
+     *-*-solaris*)
+	need_dash_r=1
+	;;
     esac
     ;;
 esac
@@ -46,8 +35,6 @@ esac
 AC_SUBST([OPENSSL])
 AC_SUBST([OPENSSL_INC])
 AC_SUBST([OPENSSL_LIB])
-
-AC_PATH_PROG([PKG_CONFIG], [pkg-config])
 
 AC_MSG_CHECKING([for openssl library directory])
 AC_ARG_WITH(

==== sntp/m4/ntp_pkg_config.m4 ====
2011-02-22 23:21:11+00:00, davehart at shiny.ad.hartbrothers.com +26 -0
  BitKeeper file C:/ntp/ntp-dev-1834/sntp/m4/ntp_pkg_config.m4

--- /dev/null	2011-02-22 19:08:17 -05:00
+++ 1.1/sntp/m4/ntp_pkg_config.m4	2011-02-22 18:21:11 -05:00
@@ -0,0 +1,26 @@
+dnl NTP_PKG_CONFIG					-*- Autoconf -*-
+dnl
+dnl Look for pkg-config, which must be at least
+dnl $ntp_pkgconfig_min_version.
+dnl
+AC_DEFUN([NTP_PKG_CONFIG], [
+
+dnl lower the minimum version if you find an earlier one works
+ntp_pkgconfig_min_version='0.15.0'
+AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+AS_UNSET([ac_cv_path_PKG_CONFIG])
+
+case "$PKG_CONFIG" in
+ /*)
+    AC_MSG_CHECKING([if pkg-config is at least version $ntp_pkgconfig_min_version])
+    if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
+	AC_MSG_RESULT([yes])
+    else
+	AC_MSG_RESULT([no])
+	PKG_CONFIG=""
+    fi
+    ;;
+esac
+
+]) dnl NTP_PKG_CONFIG
+

==== sntp/m4/ntp_pkg_config.m4 ====
2011-02-22 23:21:11+00:00, davehart at shiny.ad.hartbrothers.com +0 -0

==== sntp/tests/Makefile.am ====
2011-02-22 23:21:11+00:00, davehart at shiny.ad.hartbrothers.com +12 -0
  use adapted check-libntp.mf snippet

--- 1.21/sntp/tests/Makefile.am	2011-02-22 01:06:26 -05:00
+++ 1.22/sntp/tests/Makefile.am	2011-02-22 18:21:11 -05:00
@@ -88,5 +88,17 @@ if !NTP_CROSSCOMPILE
 TESTS += $(check_PROGRAMS)
 endif
 
+## check-libntp.mf - automake fragment
+## slightly adapted for deeper directory
+
+BUILT_SOURCES	+= check-libntp
+CLEANFILES	+= check-libntp
+
+check-libntp: ../../libntp/libntp.a
+	@echo stamp > $@
+
+../../libntp/libntp.a:
+	cd ../../libntp && $(MAKE) libntp.a
+
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf

==== tests/libntp/Makefile.am ====
2011-02-22 23:21:11+00:00, davehart at shiny.ad.hartbrothers.com +12 -0
  use adapted check-libntp.mf snippet

--- 1.35/tests/libntp/Makefile.am	2011-02-22 01:06:26 -05:00
+++ 1.36/tests/libntp/Makefile.am	2011-02-22 18:21:11 -05:00
@@ -76,5 +76,17 @@ if !NTP_CROSSCOMPILE
 TESTS += tests
 endif
 
+## check-libntp.mf - automake fragment
+## slightly adapted for deeper directory
+
+BUILT_SOURCES	+= check-libntp
+CLEANFILES	+= check-libntp
+
+check-libntp: ../../libntp/libntp.a
+	@echo stamp > $@
+
+../../libntp/libntp.a:
+	cd ../../libntp && $(MAKE) libntp.a
+
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf

==== util/Makefile.am ====
2011-02-22 23:21:11+00:00, davehart at shiny.ad.hartbrothers.com +3 -8
  use check-libntp.mf and check-libopts.mf.

--- 1.57/util/Makefile.am	2011-02-22 01:06:26 -05:00
+++ 1.58/util/Makefile.am	2011-02-22 18:21:11 -05:00
@@ -25,7 +25,7 @@ ntp_keygen_LDADD += $(LDADD_LIBNTP) $(PT
 ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
 
 EXTRA_DIST=	ntp-keygen-opts.def ntp-keygen.1 ntp-keygen-opts.texi ntp-keygen-opts.menu
-BUILT_SOURCES=	check-libntp ntp-keygen-opts.c ntp-keygen-opts.h
+BUILT_SOURCES=	ntp-keygen-opts.c ntp-keygen-opts.h
 CLEANFILES=
 DISTCLEANFILES=	.version version.c
 noinst_DATA=	$(srcdir)/ntp-keygen-opts.texi $(srcdir)/ntp-keygen-opts.menu
@@ -60,13 +60,6 @@ $(srcdir)/ntp-keygen-opts.texi: $(srcdir
 jitter_SOURCES=	jitter.c jitter.h
 jitter_LDADD=
 
-FRC:
-
-check-libntp: FRC ../libntp/libntp.a
-
-../libntp/libntp.a:
-	cd ../libntp && $(MAKE)
-
 kern.o: kern.c
 	$(COMPILE) -DHAVE_TIMEX_H -c kern.c
 
@@ -80,5 +73,7 @@ version.o: $(ntp_keygen_OBJECTS) ../libn
 	$(COMPILE) -c version.c
 
 include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libopts.mf
 include $(top_srcdir)/depsver.mf
 include $(top_srcdir)/includes.mf


More information about the bk-ntp-dev-send mailing list