]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1381] Version .deps generated include file dependencies to allow
authorDave Hart <hart@ntp.org>
Sat, 14 Nov 2009 02:20:06 +0000 (02:20 +0000)
committerDave Hart <hart@ntp.org>
Sat, 14 Nov 2009 02:20:06 +0000 (02:20 +0000)
  known dependecy-breaking changes to force .deps to be cleaned,
  triggered by changing the contents of deps-ver and/or sntp/deps-ver.

bk: 4afe13d6s5TQi_J1YvlfiZ8HoHzHZQ

22 files changed:
ChangeLog
Makefile.am
adjtimed/Makefile.am
arlib/configure.in
bootstrap
clockstuff/Makefile.am
configure.ac
deps-ver [new file with mode: 0644]
depsver.mf [new file with mode: 0644]
libntp/Makefile.am
libparse/Makefile.am
ntpd/Makefile.am
ntpd/ntp_peer.c
ntpdate/Makefile.am
ntpdc/Makefile.am
ntpq/Makefile.am
ntpsnmpd/Makefile.am
parseutil/Makefile.am
sntp/Makefile.am
sntp/configure.ac
sntp/deps-ver [new file with mode: 0644]
util/Makefile.am

index 36d4c785ff0da3d35c5aa990631156d0a6dddd17..c7541023e0845eede1b08e2631e92257a38f4486 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+* [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.
index c8d92246d852742872cb1f638e7a49c3e43aaea3..f90234f225f6c375b64961f75284f2816f1587cf 100644 (file)
@@ -5,10 +5,10 @@ ACLOCAL_AMFLAGS= -I m4 -I libopts/m4
 NULL=
 
 SUBDIRS=
-SUBDIRS+=                              \
-       scripts                         \
-       include                         \
-       ElectricFence                   \
+SUBDIRS+=              \
+       scripts         \
+       include         \
+       ElectricFence   \
        $(NULL)
 if NEED_LIBOPTS
 SUBDIRS+= libopts
@@ -53,47 +53,48 @@ DIST_SUBDIRS=               \
 
 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...
@@ -120,7 +121,7 @@ $(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
 $(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
 
@@ -136,7 +137,6 @@ libtool: $(LIBTOOL_DEPS)
        ./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
 
index b2bf581e5034158a0566b62c0ef65f2428e1ca4e..61335905736fb5b9917af4be64b4ef836afbe1ea 100644 (file)
@@ -2,9 +2,11 @@ AUTOMAKE_OPTIONS=
 
 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
index 6fd54e11469a05fb37fab319db6e32a1ee96449c..5335bb84f05b25f4519d561186e74abc50249b92 100644 (file)
@@ -9,9 +9,12 @@ AC_PROG_CC
 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])
index f5a14533d7a18302bb6562ed416961d46a9b83f5..f641f1bf5662fa6abebeafdca183ff25f93ca5df 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -114,24 +114,8 @@ touch ntpd/ntp_parser.[ch]
 
 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
 
index f2a065f5b3fbc4f00e25655da3998762a36cab42..f2e31798e2b91a7e95a8bf07dd948c1151f80f21 100644 (file)
@@ -10,9 +10,12 @@ chutest_LDADD = ../libntp/libntp.a
 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
index eafde1240cb079fb2f6e2cbdc4e87746c6cf2a52..fa956cfb2a44b56ecdeb6fdfe0e582332488c759 100644 (file)
@@ -453,9 +453,6 @@ case "$host" in
     ;;
 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)
diff --git a/deps-ver b/deps-ver
new file mode 100644 (file)
index 0000000..dd28e40
--- /dev/null
+++ b/deps-ver
@@ -0,0 +1 @@
+Fri Nov 13 17:21:31 UTC 2009
diff --git a/depsver.mf b/depsver.mf
new file mode 100644 (file)
index 0000000..4b51a92
--- /dev/null
@@ -0,0 +1,43 @@
+$(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.
+#
index acffa6637268bb8fd4c2ac518f1ef7bbd4bcce91..c40b7d9044de6e10b61ff9e33bfe0411b6efc6c3 100644 (file)
@@ -1,6 +1,7 @@
 NULL=
 #AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
 AUTOMAKE_OPTIONS = 
+BUILT_SOURCES =
 noinst_LIBRARIES = libntp.a @MAKE_LIBNTPSIM@
 EXTRA_LIBRARIES = libntpsim.a
 libntp_a_SRCS =                                                \
@@ -105,8 +106,6 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
        -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
index 20ea2535665a6ffa7e957bb5dd255a639454edd3..b288a35f9e7d6c8cf86eb514a5822f75cfa2930f 100644 (file)
@@ -1,6 +1,7 @@
 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
@@ -172,3 +173,5 @@ parsesolaris.o: sys/systm.h
 sys/systm.h:
        mkdir sys && \
        sed -e '/ffs(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
+
+include $(top_srcdir)/depsver.mf
index cc80d61f1f75c65be30bc956a9795635b664db99..22d9b3515b2b450327a072c2ebb5b958f8627310 100644 (file)
@@ -234,4 +234,5 @@ version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/
        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
index 78d58ca65e1314c4cec2521d03ae731a941cff7c..e951a62d07332aa4ce479fa3cdbd32d571e14bc5 100644 (file)
@@ -571,7 +571,6 @@ peer_refresh_interface(
                            "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,",
index 53eecb08777b85f91704da19d1fced2010746401..665ebfc53915e5ffc1ea706701b8bec5aca21467 100644 (file)
@@ -1,6 +1,7 @@
 NULL=
-AUTOMAKE_OPTIONS=      
+AUTOMAKE_OPTIONS=
 
+BUILT_SOURCES=
 bindir=                ${exec_prefix}/${BINSUBDIR}
 #bin_PROGRAMS= ntpdate ntptimeset
 bin_PROGRAMS=  ntpdate
@@ -31,4 +32,5 @@ version.o: $(ntpdate_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
        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
index a1e5b858cd55661d76828fc01b4d6528a22c03d7..3ddfadf1c445ee9fd9bef3e7e750efabfbb94dce 100644 (file)
@@ -67,4 +67,5 @@ version.o: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
 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
index 8bf4f0961fd20ea5170f2ef62c7ac79217dbc1b4..6d618a27820ef4e3a3a847998110c5dac064635c 100644 (file)
@@ -51,3 +51,6 @@ $(top_srcdir)/version :
 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
index 5cd5360d88f5bf89869b50ae83e809d1578cc12d..4cdd342e7e1a779c6a5867dfdcacfdf33ae9b56c 100644 (file)
@@ -37,3 +37,5 @@ $(srcdir)/ntpsnmpd.1: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
 $(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
index 8f959aa98e8a47124de181d1a025bd5523155252..1f4bf90729320432fc75fecec8c56c1edce9011a 100644 (file)
@@ -1,6 +1,7 @@
 NULL=
 #AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
 AUTOMAKE_OPTIONS = 
+BUILT_SOURCES =
 noinst_PROGRAMS = @TESTDCF@ @DCFD@
 EXTRA_PROGRAMS = testdcf dcfd
 
@@ -16,3 +17,5 @@ check-local: @DCFD@
        case "$(noinst_PROGRAMS)" in    \
         *dcfd*) ./dcfd -Y ;;           \
        esac
+
+include $(top_srcdir)/depsver.mf
index 36ff1642cb2b20d650fb2ad1fd6e8b830bb824fd..eac175ea12eba7020fecbdabe630988d8b2a336f 100644 (file)
@@ -45,6 +45,8 @@ sntp_SOURCES =                \
 #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)
@@ -115,4 +117,5 @@ $(srcdir)/sntp-opts.texi $(srcdir)/sntp-opts.menu: $(srcdir)/sntp-opts.def $(src
 libtool: $(LIBTOOL_DEPS)
        ./config.status --recheck
 
-include bincheck.mf
+include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/depsver.mf
index e8b21af9a836bf23847b435aec51c7212369bf35..ad8c68116773f0141933e12458e8a52b1a0fcb74 100644 (file)
@@ -139,8 +139,7 @@ AC_CHECK_FUNC([openlog], ,
        [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
diff --git a/sntp/deps-ver b/sntp/deps-ver
new file mode 100644 (file)
index 0000000..dd28e40
--- /dev/null
@@ -0,0 +1 @@
+Fri Nov 13 17:21:31 UTC 2009
index 4117beabd5c4a4bd1d14e7937a68c46c8268f853..aa2d09591e253bd0fbf98ae5fb804f9a59927658 100644 (file)
@@ -48,3 +48,6 @@ jitter_LDADD=
 
 kern.o: kern.c
        $(COMPILE) -DHAVE_TIMEX_H -c kern.c
+
+include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/depsver.mf