+* [Bug 1381] Version .deps generated include file dependencies to allow
+ known dependecy-breaking changes to force .deps to be cleaned,
+ triggered by changing the contents of deps-ver and/or sntp/deps-ver.
(4.2.5p244-RC) 2009/11/12 Released by Harlan Stenn <stenn@ntp.org>
* keygen.html updates from Dave Mills.
* [Bug 1003] ntpdc unconfig command doesn't prompt for keyid.
NULL=
SUBDIRS=
-SUBDIRS+= \
- scripts \
- include \
- ElectricFence \
+SUBDIRS+= \
+ scripts \
+ include \
+ ElectricFence \
$(NULL)
if NEED_LIBOPTS
SUBDIRS+= libopts
DISTCHECK_CONFIGURE_FLAGS= -C --with-arlib --enable-local-libopts
-EXTRA_DIST = \
- COPYRIGHT \
- ChangeLog \
- CommitLog \
- CommitLog-4.1.0 \
- NEWS \
- NOTES.y2kfixes \
- README.bk \
- README.hackers \
- README.patches \
- README.refclocks \
- README.versions \
- TODO \
- WHERE-TO-START \
- bootstrap \
- build \
- config.guess \
- config.h.in \
- config.sub \
- dot.emacs \
- excludes \
- flock-build \
- install-sh \
- packageinfo.sh \
- readme.y2kfixes \
+EXTRA_DIST = \
+ COPYRIGHT \
+ ChangeLog \
+ CommitLog \
+ CommitLog-4.1.0 \
+ NEWS \
+ NOTES.y2kfixes \
+ README.bk \
+ README.hackers \
+ README.patches \
+ README.refclocks \
+ README.versions \
+ TODO \
+ WHERE-TO-START \
+ bootstrap \
+ build \
+ config.guess \
+ config.h.in \
+ config.sub \
+ dot.emacs \
+ excludes \
+ flock-build \
+ install-sh \
+ packageinfo.sh \
+ readme.y2kfixes \
results.y2kfixes \
\
- conf \
- html \
- lib/isc \
- ports \
+ conf \
+ html \
+ lib/isc \
+ ports \
\
- bincheck.mf \
- version \
- version.m4 \
+ bincheck.mf \
+ depsver.mf \
+ deps-ver \
+ version \
+ version.m4 \
\
$(NULL)
DISTCLEANFILES = .gcc-warning
-#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.ac
ETAGS_ARGS = Makefile.am configure.ac
# HMS: make ports be the last directory...
$(srcdir)/version: FRC.version
-(bk version) >/dev/null 2>&1 && \
cd $(srcdir) && \
- x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
+ x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
y=`cat version 2>/dev/null` || true && \
case "$$x" in ''|$$y) ;; *) echo $$x > version ;; esac
./config.status --recheck
dist-hook:
- @find $(distdir) -type d -name CVS -print | xargs rm -rf
@find $(distdir) -type d -name SCCS -print | xargs rm -rf
@chmod u+w $(distdir)/ports/winnt
bindir= ${exec_prefix}/${BINSUBDIR}
bin_PROGRAMS= @MAKE_ADJTIMED@
+BUILT_SOURCES=
EXTRA_PROGRAMS= adjtimed
AM_CPPFLAGS= -I$(top_srcdir)/include
LDADD= ../libntp/libntp.a
ETAGS_ARGS= Makefile.am
-include ../bincheck.mf
+include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/depsver.mf
AC_PROG_RANLIB
# Checks for libraries.
-AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent, , , -lsocket))
-AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
-AC_CHECK_FUNC(res_init, , AC_CHECK_LIB(resolv, res_init))
+AC_CHECK_FUNC([gethostent], ,
+ [AC_SEARCH_LIBS([gethostent], [nsl], , , [-lsocket])])
+AC_SEARCH_LIBS([setsockopt], [socket xnet])
+AC_SEARCH_LIBS([res_init], [resolv], , , [-lsocket -lnsl])
+AC_CHECK_FUNCS(res_init __res_init)
+
# Checks for header files.
dnl AC_CHECK_HEADERS([errno.h fcntl.h netdb.h netinet/in.h strings.h sys/socket.h sys/time.h])
touch ntpd/ntp_keyword.h
-## HMS: Danger, Will Robinson.
-# If we remove files that used to be there, the old .Po files will bite us.
-# If we remove the .deps file, we *must* run config.status to generate new
-# dummy .Po files. The problem with this is that we then lose the
-# dependency chain and for an exisint build tree that means we may not
-# rebuild things that need to be rebuilt.
-#
-# regenerate dummy .Po files, which are included
-# in Makefiles
-
-#for i in `find . -name '*.Po' | grep /.deps/`
-#do
-# echo '# dummy' > $i
-#done
-
-##
-
cp bincheck.mf sntp/
+cp depsver.mf sntp/
${AUTORECONF} -i -v
clktest_LDADD = ../libntp/libntp.a
ETAGS_ARGS = Makefile.am
#EXTRA_DIST = TAGS
+BUILT_SOURCES =
# clktest-opts.def wants ../include/copyright.def ../include/homerc.def
chutest$(EXEEXT): ../libntp/libntp.a
clktest$(EXEEXT): ../libntp/libntp.a
+
+include $(top_srcdir)/depsver.mf
;;
esac
-AC_CHECK_FUNC(setsockopt, ,
- [AC_SEARCH_LIBS([setsockopt], [socket xnet])])
-
AC_SEARCH_LIBS([setsockopt], [socket xnet])
AC_SEARCH_LIBS([res_init], [resolv], , , [-lsocket -lnsl])
AC_CHECK_FUNCS(res_init __res_init)
--- /dev/null
+Fri Nov 13 17:21:31 UTC 2009
--- /dev/null
+$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
+ @[ -f $@ ] || \
+ cp $(top_srcdir)/deps-ver $@
+ @[ -w $@ ] || \
+ chmod ug+w $@
+ @cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
+ $(MAKE) clean && \
+ echo -n "Prior $(abs_builddir)/$(DEPDIR) version " && \
+ cat $@ && \
+ rm -rf $(DEPDIR) && \
+ mkdir $(DEPDIR) && ( \
+ cd $(top_builddir) && \
+ ./config.status \
+ ) && \
+ echo -n "Cleaned $(abs_builddir)/$(DEPDIR) version " && \
+ cat $(top_srcdir)/deps-ver \
+ )
+ cp $(top_srcdir)/deps-ver $@
+
+BUILT_SOURCES += $(DEPDIR)/deps-ver
+
+#
+# depsver.mf included in Makefile.am for directories with .deps
+#
+# When building in the same directory with sources that change over
+# time, such as when tracking using bk, the .deps files can become
+# stale with respect to moved, deleted, or superceded headers. Most
+# commonly, this would exhibit as make reporting a failure to make a
+# header file which is no longer in the location given. To address
+# this issue, we use a deps-ver file which is updated with each change
+# that breaks old .deps files. A copy of deps-ver is made into
+# $(DEPDIR) if not already present. If $(DEPDIR)/deps-ver is present
+# with different contents than deps-ver, we make clean to ensure all
+# .o files built before the incompatible change are rebuilt along with
+# their updated .deps files, then remove $(DEPDIR) and recreate it as
+# empty stubs.
+#
+# 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
+# it stays with it in the generated Makefile.in and Makefile.
+#
NULL=
#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
AUTOMAKE_OPTIONS =
+BUILT_SOURCES =
noinst_LIBRARIES = libntp.a @MAKE_LIBNTPSIM@
EXTRA_LIBRARIES = libntpsim.a
libntp_a_SRCS = \
-I$(top_srcdir)/lib/isc/unix/include
ETAGS_ARGS = Makefile.am
-../include/des.h:
- touch ../include/des.h
-
EXTRA_DIST = README
+include $(top_srcdir)/depsver.mf
NULL=
#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS =
+BUILT_SOURCES =
noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@
EXTRA_LIBRARIES = libparse.a libparse_kernel.a
EXTRA_PROGRAMS = parsestreams parsesolaris
sys/systm.h:
mkdir sys && \
sed -e '/ffs(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
+
+include $(top_srcdir)/depsver.mf
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpd
$(COMPILE) -c version.c
-include ../bincheck.mf
+include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/depsver.mf
"fd=%d, bfd=%d, name=%.16s, flags=0x%x, scope=%d, ",
niface->fd, niface->bfd, niface->name,
niface->flags, niface->scopeid);
- /* Leave these as three printf calls. */
printf(", sin=%s", stoa((&niface->sin)));
if (niface->flags & INT_BROADCAST)
printf(", bcast=%s,",
NULL=
-AUTOMAKE_OPTIONS=
+AUTOMAKE_OPTIONS=
+BUILT_SOURCES=
bindir= ${exec_prefix}/${BINSUBDIR}
#bin_PROGRAMS= ntpdate ntptimeset
bin_PROGRAMS= ntpdate
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpdate
$(COMPILE) -c version.c
-include ../bincheck.mf
+include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/depsver.mf
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
-include ../bincheck.mf
+include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/depsver.mf
version.o: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpq
$(COMPILE) -c version.c
+
+include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/depsver.mf
$(srcdir)/ntpsnmpd-opts.texi $(srcdir)/ntpsnmpd-opts.menu: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
$(run_ag) -Taginfo.tpl -DLEVEL=section ntpsnmpd-opts.def
+include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/depsver.mf
NULL=
#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS =
+BUILT_SOURCES =
noinst_PROGRAMS = @TESTDCF@ @DCFD@
EXTRA_PROGRAMS = testdcf dcfd
case "$(noinst_PROGRAMS)" in \
*dcfd*) ./dcfd -Y ;; \
esac
+
+include $(top_srcdir)/depsver.mf
#dist_man_MANS= sntp.1
EXTRA_DIST= bincheck.mf \
+ depsver.mf \
+ deps-ver \
COPYRIGHT \
sntp-opts.def sntp.1 sntp-opts.texi sntp-opts.menu \
$(NULL)
libtool: $(LIBTOOL_DEPS)
./config.status --recheck
-include bincheck.mf
+include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/depsver.mf
[AC_SEARCH_LIBS([openlog], [gen], ,
[AC_SEARCH_LIBS([openlog], [syslog], , , [$libxnet -lsocket])])])
-AC_CHECK_FUNC([setsockopt], ,
- [AC_SEARCH_LIBS([setsockopt], [socket xnet])])
+AC_SEARCH_LIBS([setsockopt], [socket xnet])
# Checks for header files.
AC_HEADER_STDC
--- /dev/null
+Fri Nov 13 17:21:31 UTC 2009
kern.o: kern.c
$(COMPILE) -DHAVE_TIMEX_H -c kern.c
+
+include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/depsver.mf