From: Dave Hart Date: Tue, 2 Feb 2010 08:09:04 +0000 (+0000) Subject: [Bug 1473] "make distcheck" before build can't make sntp/version.m4. X-Git-Tag: NTP_4_2_7P15~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d2676f4d934995795cbe3b66cdab9517b25948f;p=thirdparty%2Fntp.git [Bug 1473] "make distcheck" before build can't make sntp/version.m4. bk: 4b67dda0YGDHInWyHjxjGEMW4ZEPTw --- diff --git a/ChangeLog b/ChangeLog index fed2d1b4b..a004ccc24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * [Bug 1467] Fix bogus rebuild of sntp/sntp.html * [Bug 1470] "make distdir" in $srcdir builds keyword-gen, libntp.a. +* [Bug 1473] "make distcheck" before build can't make sntp/version.m4. --- (4.2.6p1-RC3) 2010/01/24 Released by Harlan Stenn diff --git a/Makefile.am b/Makefile.am index 0a0a89a67..b9e7cbf08 100644 --- a/Makefile.am +++ b/Makefile.am @@ -113,7 +113,17 @@ BUILT_SOURCES = \ $(NULL) $(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html - ( echo "This file is automatically generated from html/copyright.html" ; lynx -dump $(srcdir)/html/copyright.html ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT + { echo "This file is automatically generated from html/copyright.html" ; \ + lynx -dump $(srcdir)/html/copyright.html ;} > COPYRIGHT.new \ + && mv -f COPYRIGHT.new $(srcdir)/COPYRIGHT + +COPYRIGHT-please: $(srcdir)/COPYRIGHT + @: do-nothing action to prevent default \ + This target is needed by sntp/Makefile.am on decrepit \ + FreeBSD 6.x make which fails with "make COPYRIGHT" \ + configured in $(srcdir) but "make ./COPYRIGHT" succeeds. \ + Rather than determine our $(srcdir) from sntp/Makefile.am \ + COPYRIGHT-please serves as a fixed target. # 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. @@ -190,6 +200,7 @@ BHOST=`(hostname || uname -n)` fi FRC.CommitLog FRC.distwarn FRC.checkcvo FRC.checkhost FRC.version: + @: do-nothing action prevents any default # HMS: what was I trying to do with this? #dot.emacs: FRC.distwarn diff --git a/sntp/Makefile.am b/sntp/Makefile.am index d07857132..10bbb20eb 100644 --- a/sntp/Makefile.am +++ b/sntp/Makefile.am @@ -21,7 +21,7 @@ else sbin_PROGRAMS= sntp endif -CLEANFILES= +CLEANFILES = check-COPYRIGHT-submake SUBDIRS= if NEED_LIBOPTS @@ -86,6 +86,12 @@ noinst_DATA= \ $(NULL) 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. + check-autogen-version.def: FRC @cd $(srcdir) \ && test -r ../include/autogen-version.def \ @@ -95,6 +101,9 @@ check-autogen-version.def: FRC echo "Installing new sntp/autogen-version.def file"; \ fi ) +$(srcdir)/autogen-version.def: + $(MAKE) check-autogen-version.def + check-version.def: FRC @cd $(srcdir) \ && test -r ../include/version.def \ @@ -104,6 +113,9 @@ check-version.def: FRC echo "Installing new sntp/version.def file"; \ fi ) +$(srcdir)/version.def: + $(MAKE) check-version.def + check-version.m4: FRC @cd $(srcdir) \ && test -r ../version.m4 \ @@ -113,6 +125,9 @@ check-version.m4: FRC echo "Installing new sntp/version.m4 file"; \ fi ) +$(srcdir)/version.m4: + $(MAKE) check-version.m4 + check-version.texi: FRC @cd $(srcdir) \ && test -r ../include/version.texi \ @@ -122,11 +137,25 @@ check-version.texi: FRC echo "Installing new sntp/version.texi file"; \ fi ) +$(srcdir)/version.texi: + $(MAKE) check-version.texi + $(srcdir)/../COPYRIGHT: - cd .. && $(MAKE) COPYRIGHT + cd .. && $(MAKE) COPYRIGHT-please + +check-COPYRIGHT-submake: $(srcdir)/../COPYRIGHT + @cmp -s $(srcdir)/../COPYRIGHT $(srcdir)/COPYRIGHT \ + || { cp $(srcdir)/../COPYRIGHT $(srcdir)/COPYRIGHT \ + && echo 'updated sntp/COPYRIGHT installed' ;} + @echo 'submake avoided if this file is newer than parent COPYRIGHT' > $@ + +check-COPYRIGHT: FRC + [ ! -r $(srcdir)/../COPYRIGHT ] \ + || [ check-COPYRIGHT-submake -nt $(srcdir)/../COPYRIGHT ] \ + || $(MAKE) check-COPYRIGHT-submake -$(srcdir)/COPYRIGHT: $(srcdir)/../COPYRIGHT - cat $(srcdir)/../COPYRIGHT > $@ +$(srcdir)/COPYRIGHT: check-COPYRIGHT + @: do-nothing action to prevent any default $(srcdir)/sntp-opts.h: $(srcdir)/sntp-opts.c @: do-nothing action to avoid default SCCS get, .h built with .c @@ -147,7 +176,7 @@ $(srcdir)/sntp.html: $(srcdir)/sntp-opts.menu $(srcdir)/sntp-opts.texi $(srcdir) cd $(srcdir) && makeinfo --force --html --no-split -o sntp.html sntp.texi ../libntp/libntp.a: - cd ../libntp && $(MAKE) + cd ../libntp && $(MAKE) libntp.a libtool: $(LIBTOOL_DEPS) ./config.status --recheck