]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Prep for sntp docs
authorHarlan Stenn <stenn@ntp.org>
Thu, 15 Oct 2009 10:43:07 +0000 (03:43 -0700)
committerHarlan Stenn <stenn@ntp.org>
Thu, 15 Oct 2009 10:43:07 +0000 (03:43 -0700)
bk: 4ad6fcbbDVpDZuvJLzkslBb2C60XCA

Makefile.am
configure.ac
include/Makefile.am
scripts/genver
sntp/Makefile.am
sntp/sntp-opts.def

index 9f77b05bfec7cfd13f6e4827993cef67ac11b814..703fcf5ff742f63dcaef54664257f261d4453b6b 100644 (file)
@@ -100,7 +100,7 @@ ETAGS_ARGS = Makefile.am configure.ac
 # DIST_HOOK_DIRS = conf html scripts ports
 
 # HMS: Keep .gcc-warning first, as that way it gets printed first.
-BUILT_SOURCES = .gcc-warning $(srcdir)/COPYRIGHT $(srcdir)/version $(srcdir)/version.m4 $(srcdir)/include/version.def
+BUILT_SOURCES = .gcc-warning $(srcdir)/COPYRIGHT $(srcdir)/version $(srcdir)/version.m4 $(srcdir)/include/version.def $(srcdir)/include/version.texi
 
 $(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
@@ -125,6 +125,10 @@ $(srcdir)/include/version.def: $(srcdir)/packageinfo.sh
        cd $(srcdir) && \
        ./scripts/genver include/version.def
 
+$(srcdir)/include/version.texi: $(srcdir)/packageinfo.sh
+       cd $(srcdir) && \
+       ./scripts/genver include/version.texi
+
 dist-hook:
        @find $(distdir) -type d -name CVS -print | xargs rm -rf
        @find $(distdir) -type d -name SCCS -print | xargs rm -rf
index 7dcfb88d0286d6c605d9883eab0313c6020ff93e..22850d5f64280ed262da830e3cb3f8c09b74a2f0 100644 (file)
@@ -462,7 +462,7 @@ AC_CHECK_HEADER(dns_sd.h,
 case "$ac_cv_lib_dns_sd_DNSServiceRegister" in
  yes) LIBS="-ldns_sd $LIBS" ;;
 esac
-AC_CHECK_HEADERS(errno.h fcntl.h ieeefp.h math.h)
+AC_CHECK_HEADERS(errno.h fcntl.h ieeefp.h kvm.h math.h)
 
 AC_CHECK_HEADERS(md5.h, [], [],
 [#if HAVE_SYS_TYPES_H
@@ -1246,7 +1246,12 @@ esac
 AC_CHECK_FUNC(inet_ntop, [], [AC_DEFINE(ISC_PLATFORM_NEEDNTOP, 1, [ISC: provide inet_ntop()])])
 AC_CHECK_FUNC(inet_pton, [], [AC_DEFINE(ISC_PLATFORM_NEEDPTON, 1, [ISC: provide inet_pton()])])
 AC_CHECK_FUNC(inet_aton, [], [AC_DEFINE(ISC_PLATFORM_NEEDATON, 1, [ISC: provide inet_aton()])])
-AC_CHECK_FUNCS(K_open kvm_open memcpy memmove memset)
+case "$ac_cv_header_kvm_h" in
+ yes)
+    AC_CHECK_FUNCS(kvm_open)
+    ;;
+esac
+AC_CHECK_FUNCS(memcpy memmove memset)
 case "$host" in
  *-*-sco3.2v5.0.*)
     # Just stubs.  Idiots.
index 26ae9c6a64fa48b0c5ae6850fb8fcbc8f5f829ab..d9ba2ebb9a91c836557d7d6695f0d9834e512008 100644 (file)
@@ -1,7 +1,7 @@
 #AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
 AUTOMAKE_OPTIONS = 
 ETAGS_ARGS = $(srcdir)/Makefile.am
-EXTRA_DIST = autogen-version.def copyright.def debug-opt.def homerc.def version.def
+EXTRA_DIST = autogen-version.def copyright.def debug-opt.def homerc.def version.def version.texi
 
 NULL=
 noinst_HEADERS =       \
index 0ce192213b483466bf056ea60f7681b6631e84f9..ddf25cd415365bc5c1a7a1fb9ccc0c6dda628111 100755 (executable)
@@ -16,6 +16,9 @@ do
      *version.def)
        outputs="include/version.def $outputs"
        ;;
+     *version.texi)
+       outputs="include/version.texi $outputs"
+       ;;
      *) echo "Unrecognized option: $i"
        exit 1
        ;;
@@ -23,7 +26,7 @@ do
 done
 
 case "$outputs" in
- '') outputs="version.m4 include/version.def" ;;
+ '') outputs="version.m4 include/version.def include/version.texi" ;;
 esac
 
 set -e
@@ -65,3 +68,21 @@ case "$outputs" in
     esac
     ;;
 esac
+
+case "$outputs" in
+ *version.texi*)
+    echo "@set UPDATED `date +'%d %B %Y'`"     >  /tmp/version.texi+
+    echo "@set EDITION $dversion"              >> /tmp/version.texi+
+    echo "@set VERSION $dversion"              >> /tmp/version.texi+
+    cmp -s /tmp/version.texi+ include/version.texi
+    rc=$?
+    case "$force$rc" in
+     00)
+       rm -f /tmp/version.texi+
+       ;;
+     *)
+       mv /tmp/version.texi+ include/version.texi
+       ;;
+    esac
+    ;;
+esac
index 0367bb30b6bdc70581bdb5ebc77a97bcd0779d1b..11d3d764f2df6eebaf65c65f3aeae82980c02a87 100644 (file)
@@ -51,8 +51,10 @@ EXTRA_DIST=  bincheck.mf     \
                $(NULL)
 OLD_EXTRA_DIST=                \
                autogen-version.def version.def version.m4
-BUILT_SOURCES= check-autogen-version.def check-version.def check-version.m4 \
-               sntp-opts.c sntp-opts.h sntp.1 sntp-opts.texi sntp-opts.menu
+BUILT_SOURCES= check-autogen-version.def check-version.def             \
+               check-version.m4 check-version.texi                     \
+               sntp-opts.c sntp-opts.h sntp-opts.texi sntp-opts.menu   \
+               sntp.1 sntp.html
 man_MANS=      sntp.1
 
 FRC:
@@ -86,6 +88,16 @@ foo3:
                echo "Installing new sntp/version.m4 file";     \
           fi )
 
+check-version.texi: FRC
+foo4:
+       @cd $(srcdir)                                   \
+       && test -r ../include/version.texi                      \
+       && ( if cmp -s ../include/version.texi version.texi;    \
+          then : ;                                     \
+          else cp ../include/version.texi version.texi;        \
+               echo "Installing new sntp/version.texi file";   \
+          fi )
+
 $(srcdir)/sntp-opts.h: $(srcdir)/sntp-opts.c
 $(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def
        $(run_ag) sntp-opts.def
@@ -96,4 +108,7 @@ $(srcdir)/sntp.1: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def
 $(srcdir)/sntp-opts.texi $(srcdir)/sntp-opts.menu: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def
        $(run_ag) -Taginfo.tpl -DLEVEL=section sntp-opts.def
 
+$(srcdir)/sntp.html: $(srcdir)/sntp-opts.menu $(srcdir)/sntp-opts.texi $(srcdir)/sntp.texi
+       cd $(srcdir) && makeinfo --force --html --no-split -o sntp.html sntp.texi
+
 include bincheck.mf
index 46a410e28f8381ef0ec86ef4586e6ad095a7157e..a7247672f18993d39a62b1a0b27c65bc8c608666 100644 (file)
@@ -8,7 +8,7 @@ autogen definitions options;
 prog-name      = "sntp";
 prog-title     = "standard SNTP program";
 homerc         =  $HOME, ".";
-argument       = '...';
+argument       = 'hostname-or-IP ...';
 
 long-opts;
 
@@ -166,7 +166,7 @@ flag = {
                        A  Key in a 1-to-8 character ASCII string.
                        M  Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
 
-       See more information see ntp.keys(5).
+       For more information see ntp.keys(5).
        _EndOfDoc_;
 };
 
@@ -175,13 +175,18 @@ flag = {
 
 detail = <<-  _END_DETAIL
 .I sntp
-can be used as a SNTP client to query a NTP or SNTP server and either display
-the time or set the local system's time (given suitable privilege).  It can be
-run as an interactive command or in a
+implements the Simple Network Time Protocol, and is used
+to query an NTP or SNTP server and either
+display the time
+or
+set the local system's time (given suitable privilege).
+It can be
+run interactively from the command line or as a
 .I cron
 job.
-NTP is the Network Time Protocol (RFC 1305) and SNTP is the
-Simple Network Time Protocol (RFC 2030, which supersedes RFC 1769).
+
+NTP and SNTP are defined by draft-ietf-ntp-ntpv4-proto-11, which
+obsoletes RFC 4330 and RFC 1305.
        _END_DETAIL;
 
 prog-man-descrip = <<-  _END_PROG_MAN_DESCRIP
@@ -285,40 +290,9 @@ and
 commands.  For example:
 .IP
 .B sntp -a ntpserver.somewhere
-.PP
-More information on how to use this utility is given in the
-.I README
-file in the distribution.  In particular, this
-.I man
-page does not describe how to set it up as a server, which needs special care
-to avoid propagating misinformation.
 .SH RETURN VALUE
-When used as a client in non-daemon mode, the program returns a zero exit
-status for success, and a non-zero one otherwise. When used as a daemon
-(either client or server), it does not return except after a serious error.
+The program returns a zero exit
+status for success, and a non-zero one otherwise.
 .SH BUGS
-The program implements the SNTP protocol, and does not provide all NTP 
-facilities.  In particular, it contains no checks against any form of spoofing.
-If this is a serious concern, some network security mechanism (like a firewall
-or even just
-.IR tcpwrappers )
-should be installed.
-.PP
-There are some errors, ambiguities and inconsistencies in the RFCs, and this
-code may not interwork with all other NTP implementations.  Any unreasonable
-restrictions should be reported as bugs to whoever is responsible.  It may
-be difficult to find out who that is.
-.PP
-The program will stop as soon as it feels that things have got out of control.
-In client daemon mode, it will usually fail during an extended period of
-network or server inaccessibility or excessively slow performance, or when the
-local clock is reset by another process.  It will then need restarting
-manually.  Experienced system administrators can write a shell script, a
-.I cron
-job or put it in
-.IR inittab ,
-to do this automatically.
-.PP
-.SH AUTHOR
-.I sntp
+Please report bugs to http://bugs.ntp.org .
        _END_PROG_MAN_DESCRIP;