From: Harlan Stenn Date: Thu, 10 Aug 2006 20:53:20 +0000 (-0400) Subject: [Bug 683] fix version number string mismatches X-Git-Tag: NTP_4_2_3P37~11^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bc6aa6bc4afcbaad39b0caf80d14a165440796c;p=thirdparty%2Fntp.git [Bug 683] fix version number string mismatches bk: 44db9cc0VKB0CDAs0xeWsvjq-1x2Gg --- diff --git a/ntpd/Makefile.am b/ntpd/Makefile.am index b1b5e46fa..4321191e3 100644 --- a/ntpd/Makefile.am +++ b/ntpd/Makefile.am @@ -32,6 +32,9 @@ ETAGS_ARGS = Makefile.am check_PROGRAMS = @MAKE_CHECK_Y2K@ EXTRA_PROGRAMS = check_y2k ntpdsim run_ag = cd $(srcdir) && autogen -L ../include +std_def_list= $(top_srcdir)/include/debug-opt.def \ + $(top_srcdir)/include/copyright.def \ + $(top_srcdir)/include/version.def check-local: @MAKE_CHECK_Y2K@ test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@ @@ -61,23 +64,23 @@ libntpd_a_SOURCES = jupiter.h ntp_control.c \ refclock_zyfer.c $(srcdir)/ntpd-opts.h: ntpd-opts.c -$(srcdir)/ntpd-opts.c: ntpd-opts.def ntpdbase-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpd-opts.c: ntpd-opts.def ntpdbase-opts.def $(std_def_list) $(run_ag) ntpd-opts.def -$(srcdir)/ntpd.1: ntpd-opts.def ntpdbase-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpd.1: ntpd-opts.def ntpdbase-opts.def $(std_def_list) $(run_ag) -Tagman1.tpl -bntpd ntpd-opts.def -$(srcdir)/ntpd-opts.texi $(srcdir)/ntpd-opts.menu: ntpd-opts.def ntpdbase-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpd-opts.texi $(srcdir)/ntpd-opts.menu: ntpd-opts.def ntpdbase-opts.def $(std_def_list) $(run_ag) -Taginfo.tpl -DLEVEL=section ntpd-opts.def $(srcdir)/ntpdsim-opts.h: ntpdsim-opts.c -$(srcdir)/ntpdsim-opts.c: ntpdsim-opts.def ntpdbase-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpdsim-opts.c: ntpdsim-opts.def ntpdbase-opts.def $(std_def_list) $(run_ag) ntpdsim-opts.def -$(srcdir)/ntpdsim.1: ntpdsim-opts.def ntpdbase-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpdsim.1: ntpdsim-opts.def ntpdbase-opts.def $(std_def_list) $(run_ag) -Tagman1.tpl -bntpdsim ntpdsim-opts.def -$(srcdir)/ntpdsim-opts.texi $(srcdir)/ntpdsim-opts.menu: ntpdsim-opts.def ntpdbase-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpdsim-opts.texi $(srcdir)/ntpdsim-opts.menu: ntpdsim-opts.def ntpdbase-opts.def $(std_def_list) $(run_ag) -Taginfo.tpl -DLEVEL=section ntpdsim-opts.def $(PROGRAMS): $(LDADD) diff --git a/ntpdc/Makefile.am b/ntpdc/Makefile.am index 4d44e839f..9c7c53254 100644 --- a/ntpdc/Makefile.am +++ b/ntpdc/Makefile.am @@ -20,15 +20,18 @@ BUILT_SOURCES+= ntpdc-opts.c ntpdc-opts.h ntpdc.1 ntpdc-opts.texi \ ntpdc-opts.menu man_MANS= ntpdc.1 run_ag= cd $(srcdir) && autogen -L ../include +std_def_list= $(top_srcdir)/include/debug-opt.def \ + $(top_srcdir)/include/copyright.def \ + $(top_srcdir)/include/version.def $(srcdir)/ntpdc-opts.h: ntpdc-opts.c -$(srcdir)/ntpdc-opts.c: ntpdc-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpdc-opts.c: ntpdc-opts.def $(std_def_list) $(run_ag) ntpdc-opts.def -$(srcdir)/ntpdc.1: ntpdc-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpdc.1: ntpdc-opts.def $(std_def_list) $(run_ag) -Tagman1.tpl -bntpdc ntpdc-opts.def -$(srcdir)/ntpdc-opts.texi $(srcdir)/ntpdc-opts.menu: ntpdc-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpdc-opts.texi $(srcdir)/ntpdc-opts.menu: ntpdc-opts.def $(std_def_list) $(run_ag) -Taginfo.tpl -DLEVEL=section ntpdc-opts.def ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h diff --git a/ntpq/Makefile.am b/ntpq/Makefile.am index 24eb0d787..d3f211614 100644 --- a/ntpq/Makefile.am +++ b/ntpq/Makefile.am @@ -12,16 +12,19 @@ EXTRA_DIST= ntpq-opts.def ntpq.1 ntpq-opts.texi ntpq-opts.menu BUILT_SOURCES= ntpq-opts.c ntpq-opts.h ntpq.1 ntpq-opts.texi ntpq-opts.menu man_MANS= ntpq.1 run_ag= cd $(srcdir) && autogen -L ../include +std_def_list= $(top_srcdir)/include/debug-opt.def \ + $(top_srcdir)/include/copyright.def \ + $(top_srcdir)/include/version.def ntpq_SOURCES= ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h $(srcdir)/ntpq-opts.h: ntpq-opts.c -$(srcdir)/ntpq-opts.c: ntpq-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpq-opts.c: ntpq-opts.def $(std_def_list) $(run_ag) ntpq-opts.def -$(srcdir)/ntpq.1: ntpq-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpq.1: ntpq-opts.def $(std_def_list) $(run_ag) -Tagman1.tpl -bntpq ntpq-opts.def -$(srcdir)/ntpq-opts.texi $(srcdir)/ntpq-opts.menu: ntpq-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntpq-opts.texi $(srcdir)/ntpq-opts.menu: ntpq-opts.def $(std_def_list) $(run_ag) -Taginfo.tpl -DLEVEL=section ntpq-opts.def $(PROGRAMS): $(LDADD) diff --git a/sntp/Makefile.am b/sntp/Makefile.am index 9d5db30ba..234e8e138 100644 --- a/sntp/Makefile.am +++ b/sntp/Makefile.am @@ -36,18 +36,29 @@ sntp_SOURCES = \ dist_man_MANS= sntp.1 EXTRA_DIST= bincheck.mf \ - sntp-opts.def sntp.1 sntp-opts.texi sntp-opts.menu + COPYRIGHT \ + sntp-opts.def sntp.1 sntp-opts.texi sntp-opts.menu version.def BUILT_SOURCES= sntp-opts.c sntp-opts.h sntp.1 sntp-opts.texi sntp-opts.menu man_MANS= sntp.1 + +FRC: +$(srcdir)/version.def: FRC + cd $(srcdir) \ + && test -e ../include/version.def \ + && ( if cmp -s ../include/version.def version.def; \ + then : ; \ + else cp ../include/version.def version.def; \ + fi ) + $(srcdir)/sntp-opts.h: sntp-opts.c -$(srcdir)/sntp-opts.c: sntp-opts.def +$(srcdir)/sntp-opts.c: sntp-opts.def $(srcdir)/version.def $(run_ag) sntp-opts.def -$(srcdir)/sntp.1: sntp-opts.def +$(srcdir)/sntp.1: sntp-opts.def $(srcdir)/version.def $(run_ag) -Tagman1.tpl -bsntp sntp-opts.def -$(srcdir)/sntp-opts.texi $(srcdir)/sntp-opts.menu: sntp-opts.def +$(srcdir)/sntp-opts.texi $(srcdir)/sntp-opts.menu: sntp-opts.def $(srcdir)/version.def $(run_ag) -Taginfo.tpl -DLEVEL=section sntp-opts.def include bincheck.mf diff --git a/sntp/sntp-opts.def b/sntp/sntp-opts.def index 3f4fe9ba6..f873dab62 100644 --- a/sntp/sntp-opts.def +++ b/sntp/sntp-opts.def @@ -7,7 +7,7 @@ copyright = { owner = "ntp.org"; eaddr = "http://bugs.ntp.isc.org, bugs@ntp.org"; type = note; - text = 'See the sntp/Copyright file'; + text = `cat Copyright`; }; @@ -26,10 +26,7 @@ rcfile = "ntp.ini"; environrc; -version = ` -eval VERSION=\`sed -e 's/.*,\\[//' -e 's/\\].*//' < ../version.m4\` -[ -z "${VERSION}" ] && echo "Cannot determine VERSION" && kill -TERM $AG_pid -echo $VERSION`; +#include version.def; test-main; diff --git a/util/Makefile.am b/util/Makefile.am index 7610c2d73..79719f7db 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -19,15 +19,18 @@ BUILT_SOURCES= ntp-keygen-opts.c ntp-keygen-opts.h ntp-keygen.1 \ ntp-keygen-opts.texi ntp-keygen-opts.menu man_MANS= ntp-keygen.1 run_ag= cd $(srcdir) && autogen -L ../include +std_def_list= $(top_srcdir)/include/debug-opt.def \ + $(top_srcdir)/include/copyright.def \ + $(top_srcdir)/include/version.def $(srcdir)/ntp-keygen-opts.h: ntp-keygen-opts.c -$(srcdir)/ntp-keygen-opts.c: ntp-keygen-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntp-keygen-opts.c: ntp-keygen-opts.def $(std_def_list) $(run_ag) ntp-keygen-opts.def -$(srcdir)/ntp-keygen.1: ntp-keygen-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntp-keygen.1: ntp-keygen-opts.def $(std_def_list) $(run_ag) -Tagman1.tpl -bntp-keygen ntp-keygen-opts.def -$(srcdir)/ntp-keygen-opts.texi $(srcdir)/ntp-keygen-opts.menu: ntp-keygen-opts.def $(top_srcdir)/include/debug-opt.def $(top_srcdir)/include/copyright.def +$(srcdir)/ntp-keygen-opts.texi $(srcdir)/ntp-keygen-opts.menu: ntp-keygen-opts.def $(std_def_list) $(run_ag) -Taginfo.tpl -DLEVEL=section ntp-keygen-opts.def