From: Dave Hart Date: Sun, 27 Dec 2009 09:16:20 +0000 (+0000) Subject: [Bug 1439] .texi generation must wait until after binary is linked. X-Git-Tag: NTP_4_2_7P6~7^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a13777ee4bbc46aead5904f41df7b59a158bbf42;p=thirdparty%2Fntp.git [Bug 1439] .texi generation must wait until after binary is linked. Quiet RES_TIMEOUT redefinition warning compiling ntp_intres.c bk: 4b3725e4ds5sRb7ypjWeih5nmXRcFA --- diff --git a/ChangeLog b/ChangeLog index b7300bdfc..59cd15a16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +--- + +* [Bug 1439] .texi generation must wait until after binary is linked. + --- (4.2.6p1-RC2) 2009/12/25 Released by Harlan Stenn diff --git a/ntpd/Makefile.am b/ntpd/Makefile.am index f225acebb..37b641406 100644 --- a/ntpd/Makefile.am +++ b/ntpd/Makefile.am @@ -74,9 +74,6 @@ B_S_DIST= \ ntp_keyword.h \ ntpd-opts.c \ ntpd-opts.h \ - ntpd.1 \ - ntpd-opts.texi \ - ntpd-opts.menu \ $(NULL) BUILT_SOURCES= \ @@ -87,7 +84,7 @@ BUILT_SOURCES= \ $(B_S_DIST) \ $(NULL) -man_MANS= ntpd.1 +man_MANS= $(srcdir)/ntpd.1 # ntpdsim.1 is a remnant along with all the ntpdsim-opts.* files, the # simulator currently uses ntpd-opts.[ch]. This also means there is no @@ -119,9 +116,14 @@ ETAGS_ARGS = Makefile.am ### Y2Kfixes check_PROGRAMS = @MAKE_CHECK_Y2K@ EXTRA_PROGRAMS = check_y2k ntpdsim keyword-gen -run_ag= cd $(srcdir) && \ - env PATH="$(abs_builddir):$(PATH)" \ +noinst_DATA = $(srcdir)/ntpd-opts.texi $(srcdir)/ntpd-opts.menu +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ autogen -L ../include --writable +run_ro= ( { test -w $(srcdir) && exit 0 ;} || { touch ro_srcdir \ + && chmod u+w $(top_srcdir) $(srcdir) ;} ) && +if_ro_src= { test ! -f ro_srcdir && exit 0 ;} || +post_run_ro= $(if_ro_src) { rm ro_srcdir && chmod u-w $(srcdir) \ + $(top_srcdir) ;} std_def_list= $(top_srcdir)/include/autogen-version.def \ $(top_srcdir)/include/copyright.def \ $(top_srcdir)/include/version.def @@ -229,11 +231,15 @@ $(srcdir)/ntpd-opts.c: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std $(run_ag) ntpd-opts.def $(srcdir)/ntpd.1: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list) - $(run_ag) -Tagman1.tpl -bntpd ntpd-opts.def + $(run_ro) $(run_ag) -Tagman1.tpl -bntpd ntpd-opts.def + $(post_run_ro) -$(srcdir)/ntpd-opts.texi $(srcdir)/ntpd-opts.menu: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list) - $(MAKE) ntpd # aginfo.tpl runs the binary to extract --help usage text - $(run_ag) -Taginfo.tpl -DLEVEL=section ntpd-opts.def +$(srcdir)/ntpd-opts.menu: $(srcdir)/ntpd-opts.texi + @: do-nothing action to avoid default SCCS get, .menu built with .texi + +$(srcdir)/ntpd-opts.texi: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list) + $(run_ro) $(run_ag) -Taginfo.tpl -DLEVEL=section ntpd-opts.def + $(post_run_ro) $(PROGRAMS): $(LDADD) diff --git a/ntpd/ntp_intres.c b/ntpd/ntp_intres.c index f98cc99e2..a3c66117d 100644 --- a/ntpd/ntp_intres.c +++ b/ntpd/ntp_intres.c @@ -29,6 +29,9 @@ #include /**/ +#ifdef HAVE_SYS_TYPES_H +# include +#endif #ifdef HAVE_NETINET_IN_H #include #endif @@ -43,9 +46,6 @@ #endif #if defined(HAVE_RESOLV_H) && defined(HAVE_RES_INIT) -# ifdef HAVE_SYS_TYPES_H -# include -# endif # ifdef HAVE_ARPA_NAMESER_H # include /* DNS HEADER struct */ # endif @@ -55,6 +55,10 @@ # include #endif +#ifdef RES_TIMEOUT +#undef RES_TIMEOUT /* resolv.h has one, we want ours */ +#endif + #include "ntp_machine.h" #include "ntpd.h" #include "ntp_io.h" diff --git a/ntpdc/Makefile.am b/ntpdc/Makefile.am index ce11291f6..dbb19048a 100644 --- a/ntpdc/Makefile.am +++ b/ntpdc/Makefile.am @@ -9,7 +9,7 @@ endif EXTRA_PROGRAMS= ntpdc-layout EXTRA_DATA= check-layout -BUILT_SOURCES= @MAKE_CHECK_LAYOUT@ +BUILT_SOURCES= @MAKE_CHECK_LAYOUT@ ntpdc-opts.c ntpdc-opts.h AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \ -I$(top_srcdir)/lib/isc/nothreads/include \ -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS) @@ -24,12 +24,15 @@ noinst_HEADERS= ntpdc.h ETAGS_ARGS= Makefile.am EXTRA_DIST= nl_in.c nl.pl layout.std \ ntpdc-opts.def ntpdc.1 ntpdc-opts.texi ntpdc-opts.menu -BUILT_SOURCES+= ntpdc-opts.c ntpdc-opts.h ntpdc.1 ntpdc-opts.texi \ - ntpdc-opts.menu -man_MANS= ntpdc.1 -run_ag= cd $(srcdir) && \ - env PATH="$(abs_builddir):$(PATH)" \ +man_MANS= $(srcdir)/ntpdc.1 +noinst_DATA= $(srcdir)/ntpdc-opts.texi $(srcdir)/ntpdc-opts.menu +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ autogen -L ../include --writable +run_ro= ( { test -w $(srcdir) && exit 0 ;} || { touch ro_srcdir \ + && chmod u+w $(top_srcdir) $(srcdir) ;} ) && +if_ro_src= { test ! -f ro_srcdir && exit 0 ;} || +post_run_ro= $(if_ro_src) { rm ro_srcdir && chmod u-w $(srcdir) \ + $(top_srcdir) ;} std_def_list= $(top_srcdir)/include/debug-opt.def \ $(top_srcdir)/include/autogen-version.def \ $(top_srcdir)/include/copyright.def \ @@ -43,11 +46,15 @@ $(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list) $(run_ag) ntpdc-opts.def $(srcdir)/ntpdc.1: $(srcdir)/ntpdc-opts.def $(std_def_list) - $(run_ag) -Tagman1.tpl -bntpdc ntpdc-opts.def + $(run_ro) $(run_ag) -Tagman1.tpl -bntpdc ntpdc-opts.def + $(post_run_ro) -$(srcdir)/ntpdc-opts.texi $(srcdir)/ntpdc-opts.menu: $(srcdir)/ntpdc-opts.def $(std_def_list) - $(MAKE) ntpdc # aginfo.tpl runs the binary to extract --help usage text - $(run_ag) -Taginfo.tpl -DLEVEL=section ntpdc-opts.def +$(srcdir)/ntpdc-opts.menu: $(srcdir)/ntpdc-opts.texi + @: do-nothing action to avoid default SCCS get, .menu built with .texi + +$(srcdir)/ntpdc-opts.texi: $(srcdir)/ntpdc-opts.def $(std_def_list) + $(run_ro) $(run_ag) -Taginfo.tpl -DLEVEL=section ntpdc-opts.def + $(post_run_ro) ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h diff --git a/ntpq/Makefile.am b/ntpq/Makefile.am index 9faf4790d..8807b3498 100644 --- a/ntpq/Makefile.am +++ b/ntpq/Makefile.am @@ -16,18 +16,21 @@ ntpq_LDADD= version.o @EDITLINE_LIBS@ $(LIBOPTS_LDADD) \ ../libntp/libntp.a @LCRYPTO@ noinst_HEADERS= ntpq.h noinst_LIBRARIES= libntpq.a -# HMS: I don't think we need libntpq_a_LIBADD... -#libntpq_a_LIBADD= version.o @EDITLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a libntpq_a_CFLAGS= -DNO_MAIN_ALLOWED -DBUILD_AS_LIB CLEANFILES= DISTCLEANFILES= .version version.c ETAGS_ARGS= Makefile.am 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) && \ - env PATH="$(abs_builddir):$(PATH)" \ +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)" \ autogen -L ../include --writable +run_ro= ( { test -w $(srcdir) && exit 0 ;} || { touch ro_srcdir \ + && chmod u+w $(top_srcdir) $(srcdir) ;} ) && +if_ro_src= { test ! -f ro_srcdir && exit 0 ;} || +post_run_ro= $(if_ro_src) { rm ro_srcdir && chmod u-w $(srcdir) \ + $(top_srcdir) ;} std_def_list= $(top_srcdir)/include/debug-opt.def \ $(top_srcdir)/include/autogen-version.def \ $(top_srcdir)/include/copyright.def \ @@ -44,11 +47,15 @@ $(srcdir)/ntpq-opts.c: $(srcdir)/ntpq-opts.def $(std_def_list) $(run_ag) ntpq-opts.def $(srcdir)/ntpq.1: $(srcdir)/ntpq-opts.def $(std_def_list) - $(run_ag) -Tagman1.tpl -bntpq ntpq-opts.def + $(run_ro) $(run_ag) -Tagman1.tpl -bntpq ntpq-opts.def + $(post_run_ro) -$(srcdir)/ntpq-opts.texi $(srcdir)/ntpq-opts.menu: $(srcdir)/ntpq-opts.def $(std_def_list) - $(MAKE) ntpq # aginfo.tpl runs the binary to extract --help usage text - $(run_ag) -Taginfo.tpl -DLEVEL=section ntpq-opts.def +$(srcdir)/ntpq-opts.menu: $(srcdir)/ntpq-opts.texi + @: do-nothing action to avoid default SCCS get, .menu built with .texi + +$(srcdir)/ntpq-opts.texi: $(srcdir)/ntpq-opts.def $(std_def_list) + $(run_ro) $(run_ag) -Taginfo.tpl -DLEVEL=section ntpq-opts.def + $(post_run_ro) $(PROGRAMS): $(LDADD) diff --git a/ntpsnmpd/Makefile.am b/ntpsnmpd/Makefile.am index 09144143e..dc1f88608 100644 --- a/ntpsnmpd/Makefile.am +++ b/ntpsnmpd/Makefile.am @@ -23,13 +23,17 @@ AM_CPPFLAGS= -I$(top_srcdir)/ntpq -I$(top_srcdir)/include \ AM_CFLAGS= @SNMP_CFLAGS@ EXTRA_DIST= ntpsnmpd-opts.def ntpsnmpd.1 ntpsnmpd-opts.texi \ ntpsnmpd-opts.menu ntpv4-mib.mib -BUILT_SOURCES= ntpsnmpd-opts.c ntpsnmpd-opts.h ntpsnmpd.1 ntpsnmpd-opts.texi \ - ntpsnmpd-opts.menu +BUILT_SOURCES= ntpsnmpd-opts.c ntpsnmpd-opts.h CLEANFILES= -man_MANS= ntpsnmpd.1 -run_ag= cd $(srcdir) && \ - env PATH="$(abs_builddir):$(PATH)" \ +noinst_DATA= $(srcdir)/ntpsnmpd-opts.texi $(srcdir)/ntpsnmpd-opts.menu +man_MANS= $(srcdir)/ntpsnmpd.1 +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ autogen -L ../include --writable +run_ro= ( { test -w $(srcdir) && exit 0 ;} || { touch ro_srcdir \ + && chmod u+w $(top_srcdir) $(srcdir) ;} ) && +if_ro_src= { test ! -f ro_srcdir && exit 0 ;} || +post_run_ro= $(if_ro_src) { rm ro_srcdir && chmod u-w $(srcdir) \ + $(top_srcdir) ;} std_def_list= $(top_srcdir)/include/autogen-version.def \ $(top_srcdir)/include/copyright.def \ $(top_srcdir)/include/homerc.def \ @@ -42,14 +46,15 @@ $(srcdir)/ntpsnmpd-opts.c: $(srcdir)/ntpsnmpd-opts.def $(std_def_list) $(run_ag) ntpsnmpd-opts.def $(srcdir)/ntpsnmpd.1: $(srcdir)/ntpsnmpd-opts.def $(std_def_list) - $(run_ag) -Tagman1.tpl -bntpsnmpd ntpsnmpd-opts.def + $(run_ro) $(run_ag) -Tagman1.tpl -bntpsnmpd ntpsnmpd-opts.def + $(post_run_ro) -$(srcdir)/ntpsnmpd-opts.texi $(srcdir)/ntpsnmpd-opts.menu: $(srcdir)/ntpsnmpd-opts.def $(std_def_list) - $(MAKE) @MAKE_NTPSNMPD@ not-all-target # aginfo.tpl runs the binary to extract --help usage text - $(run_ag) -Taginfo.tpl -DLEVEL=section ntpsnmpd-opts.def - -not-all-target: - touch $@ # used to avoid "all" default target when not building ntpsnmpd +$(srcdir)/ntpsnmpd-opts.menu: $(srcdir)/ntpsnmpd-opts.texi + @: do-nothing action to avoid default SCCS get, .menu built with .texi + +$(srcdir)/ntpsnmpd-opts.texi: $(srcdir)/ntpsnmpd-opts.def $(std_def_list) + $(run_ro) $(run_ag) -Taginfo.tpl -DLEVEL=section ntpsnmpd-opts.def + $(post_run_ro) include $(top_srcdir)/bincheck.mf include $(top_srcdir)/depsver.mf diff --git a/sntp/Makefile.am b/sntp/Makefile.am index 7a5a1e25f..b0c75d500 100644 --- a/sntp/Makefile.am +++ b/sntp/Makefile.am @@ -12,9 +12,12 @@ AM_CPPFLAGS= $(LIBOPTS_CFLAGS) -I$(top_srcdir)/../include \ LDADD= $(LIBOPTS_LDADD) -lm ../libntp/libntp.a -run_ag= cd $(srcdir) && \ - env PATH="$(abs_builddir):$(PATH)" \ - autogen -L ../include --writable +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ + autogen -L ../include --writable +run_ro= ( { test -w $(srcdir) && exit 0 ;} || { touch ro_srcdir \ + && chmod u+w $(srcdir) ;} ) && +if_ro_src= { test ! -f ro_srcdir && exit 0 ;} || +post_run_ro= $(if_ro_src) { rm ro_srcdir && chmod u-w $(srcdir) ;} if NTP_BINSUBDIR_IS_BIN bin_PROGRAMS= sntp @@ -22,7 +25,7 @@ else sbin_PROGRAMS= sntp endif -CLEANFILES= libopts-subdir +CLEANFILES= SUBDIRS= if NEED_LIBOPTS @@ -48,9 +51,6 @@ sntp_SOURCES = \ utilities.h \ $(NULL) -# it's in EXTRA_DIST -#dist_man_MANS= sntp.1 - EXTRA_DIST= \ autogen-version.def \ bincheck.mf \ @@ -78,13 +78,15 @@ BUILT_SOURCES= \ libtool \ sntp-opts.c \ sntp-opts.h \ - sntp-opts.menu \ - sntp-opts.texi \ - sntp.1 \ - sntp.html \ $(NULL) -man_MANS= sntp.1 +man_MANS= $(srcdir)/sntp.1 + +noinst_DATA= \ + $(srcdir)/sntp.html \ + $(srcdir)/sntp-opts.texi \ + $(srcdir)/sntp-opts.menu \ + $(NULL) FRC: check-autogen-version.def: FRC @@ -136,20 +138,21 @@ $(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def $(run_ag) sntp-opts.def $(srcdir)/sntp.1: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def - $(run_ag) -Tagman1.tpl -bsntp sntp-opts.def + $(run_ro) $(run_ag) -Tagman1.tpl -bsntp sntp-opts.def + $(post_run_ro) -$(srcdir)/sntp-opts.texi $(srcdir)/sntp-opts.menu: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def - $(MAKE) libopts-subdir sntp # aginfo.tpl runs binary to extract --help usage text - $(run_ag) -Taginfo.tpl -DLEVEL=section sntp-opts.def - -libopts-subdir: $(LIBOPTS_LDADD) - touch $@ # LIBOPTS_LDADD is ./libopts/libopts.la if NEED_LIBOPTS - -libopts/libopts.la: - ( cd libopts && $(MAKE) libopts.la ) +$(srcdir)/sntp-opts.menu: $(srcdir)/sntp-opts.texi + @: do-nothing action to avoid default SCCS get, .menu built with .texi + +$(srcdir)/sntp-opts.texi: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def + $(run_ro) $(run_ag) -Taginfo.tpl -DLEVEL=section sntp-opts.def + $(post_run_ro) $(srcdir)/sntp.html: $(srcdir)/sntp-opts.menu $(srcdir)/sntp-opts.texi $(srcdir)/sntp.texi $(srcdir)/version.texi - cd $(srcdir) && makeinfo --force --html --no-split -o sntp.html sntp.texi + $(run_ro) cd $(srcdir) && makeinfo --force --html --no-split -o sntp.html+ sntp.texi + $(if_ro_src) { chmod a-w $(srcdir)/sntp.html+ && chmod u+w $(srcdir)/sntp.html ;} + $(post_run_ro) + mv $(srcdir)/sntp.html+ $(srcdir)/sntp.html ../libntp/libntp.a: cd ../libntp && $(MAKE) diff --git a/util/Makefile.am b/util/Makefile.am index 329160f36..956c9c946 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -25,13 +25,17 @@ ntp_keygen_LDADD= @LCRYPTO@ $(LIBOPTS_LDADD) ../libntp/libntp.a ETAGS_ARGS= Makefile.am #EXTRA_DIST= README TAGS EXTRA_DIST= ntp-keygen-opts.def ntp-keygen.1 ntp-keygen-opts.texi ntp-keygen-opts.menu -BUILT_SOURCES= ntp-keygen-opts.c ntp-keygen-opts.h ntp-keygen.1 \ - ntp-keygen-opts.texi ntp-keygen-opts.menu +BUILT_SOURCES= ntp-keygen-opts.c ntp-keygen-opts.h CLEANFILES= -man_MANS= ntp-keygen.1 -run_ag= cd $(srcdir) && \ - env PATH="$(abs_builddir):$(PATH)" \ +noinst_DATA= $(srcdir)/ntp-keygen-opts.texi $(srcdir)/ntp-keygen-opts.menu +man_MANS= $(srcdir)/ntp-keygen.1 +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ autogen -L ../include --writable +run_ro= ( { test -w $(srcdir) && exit 0 ;} || { touch ro_srcdir \ + && chmod u+w $(top_srcdir) $(srcdir) ;} ) && +if_ro_src= { test ! -f ro_srcdir && exit 0 ;} || +post_run_ro= $(if_ro_src) { rm ro_srcdir && chmod u-w $(srcdir) \ + $(top_srcdir) ;} std_def_list= $(top_srcdir)/include/debug-opt.def \ $(top_srcdir)/include/autogen-version.def \ $(top_srcdir)/include/copyright.def \ @@ -45,11 +49,15 @@ $(srcdir)/ntp-keygen-opts.c: $(srcdir)/ntp-keygen-opts.def $(std_def_list) $(run_ag) ntp-keygen-opts.def $(srcdir)/ntp-keygen.1: $(srcdir)/ntp-keygen-opts.def $(std_def_list) - $(run_ag) -Tagman1.tpl -bntp-keygen ntp-keygen-opts.def + $(run_ro) $(run_ag) -Tagman1.tpl -bntp-keygen ntp-keygen-opts.def + $(post_run_ro) -$(srcdir)/ntp-keygen-opts.texi $(srcdir)/ntp-keygen-opts.menu: $(srcdir)/ntp-keygen-opts.def $(std_def_list) - $(MAKE) ntp-keygen # aginfo.tpl runs the binary to extract --help usage text - $(run_ag) -Taginfo.tpl -DLEVEL=section ntp-keygen-opts.def +$(srcdir)/ntp-keygen-opts.menu: $(srcdir)/ntp-keygen-opts.texi + @: do-nothing action to avoid default SCCS get, .menu built with .texi + +$(srcdir)/ntp-keygen-opts.texi: $(srcdir)/ntp-keygen-opts.def $(std_def_list) + $(run_ro) $(run_ag) -Taginfo.tpl -DLEVEL=section ntp-keygen-opts.def + $(post_run_ro) jitter_SOURCES= jitter.c jitter.h