Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ntp Fix a couple of problems:



details:   https://anonhg.NetBSD.org/src/rev/a9e4b740013a
branches:  trunk
changeset: 487752:a9e4b740013a
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Jun 12 13:57:38 2000 +0000

description:
Fix a couple of problems:

 + Make depend required all the source files to be built before
   the dependencies were generated due to some sub-optimal logic
   in the version generation.
   Fix from Bernd Ernesti in private mail.
 + Make the version string contain ${PROG} as originally intended
   and not "ntpd" for all 7 programs.

Also move version generation to Makefile.inc to stop having 7 copies
of exactly the same thing.

diffstat:

 usr.sbin/ntp/Makefile.inc        |  8 +++++++-
 usr.sbin/ntp/ntpd/Makefile       |  8 +-------
 usr.sbin/ntp/ntpdate/Makefile    |  8 +-------
 usr.sbin/ntp/ntpdc/Makefile      |  6 ------
 usr.sbin/ntp/ntpq/Makefile       |  8 +-------
 usr.sbin/ntp/ntptime/Makefile    |  7 +------
 usr.sbin/ntp/ntptimeset/Makefile |  7 +------
 usr.sbin/ntp/ntptrace/Makefile   |  8 +-------
 8 files changed, 13 insertions(+), 47 deletions(-)

diffs (151 lines):

diff -r f434067e992d -r a9e4b740013a usr.sbin/ntp/Makefile.inc
--- a/usr.sbin/ntp/Makefile.inc Mon Jun 12 13:55:07 2000 +0000
+++ b/usr.sbin/ntp/Makefile.inc Mon Jun 12 13:57:38 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.2 2000/05/02 12:01:10 simonb Exp $
+#      $NetBSD: Makefile.inc,v 1.3 2000/06/12 13:57:38 simonb Exp $
 
 .if !defined(NTP_MAKEFILE_INC)
 NTP_MAKEFILE_INC=1
@@ -19,6 +19,12 @@
 LIBNTP!=       cd ${.CURDIR}/../libntp; make print-objdir
 LDADD+=                -L${LIBNTP} -lntp
 DPADD+=                ${LIBNTP}/libntp.a
+
+SRCS+= version.c
+CLEANFILES+=version.c version.o .version
+.version:
+       sh ${.CURDIR}/../scripts/mkver ${PROG} > /dev/null
+version.c: .version ${LIBNTP}/libntp.a
 .endif
 
 NTPSRCDIR?= ${PROG}
diff -r f434067e992d -r a9e4b740013a usr.sbin/ntp/ntpd/Makefile
--- a/usr.sbin/ntp/ntpd/Makefile        Mon Jun 12 13:55:07 2000 +0000
+++ b/usr.sbin/ntp/ntpd/Makefile        Mon Jun 12 13:57:38 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.3 2000/04/22 15:26:21 simonb Exp $
+#      $NetBSD: Makefile,v 1.4 2000/06/12 13:57:41 simonb Exp $
 
 PROG=  ntpd
 MAN=   ntpd.8
@@ -17,13 +17,7 @@
        refclock_shm.c refclock_tpro.c refclock_trak.c refclock_true.c \
        refclock_ulink.c refclock_usno.c refclock_wwv.c refclock_wwvb.c
 
-SRCS+= version.c
-CLEANFILES+=version.c version.o .version
-
 LDADD+=        -lm
 DPADD+=        ${LIBM}
 
 .include <bsd.prog.mk>
-
-version.c: ${OBJS:S/version.o//} ${LIBNTP}/libntp.a
-       sh ${.CURDIR}/../scripts/mkver ntpd
diff -r f434067e992d -r a9e4b740013a usr.sbin/ntp/ntpdate/Makefile
--- a/usr.sbin/ntp/ntpdate/Makefile     Mon Jun 12 13:55:07 2000 +0000
+++ b/usr.sbin/ntp/ntpdate/Makefile     Mon Jun 12 13:57:38 2000 +0000
@@ -1,13 +1,7 @@
-#      $NetBSD: Makefile,v 1.2 2000/03/29 13:54:45 simonb Exp $
+#      $NetBSD: Makefile,v 1.3 2000/06/12 13:57:42 simonb Exp $
 
 PROG=  ntpdate
 MAN=   ntpdate.8
 SRCS=  ntpdate.c
 
-SRCS+= version.c
-CLEANFILES+=version.c version.o .version
-
 .include <bsd.prog.mk>
-
-version.c: ${OBJS:S/version.o//} ${LIBNTP}/libntp.a
-       sh ${.CURDIR}/../scripts/mkver ntpd
diff -r f434067e992d -r a9e4b740013a usr.sbin/ntp/ntpdc/Makefile
--- a/usr.sbin/ntp/ntpdc/Makefile       Mon Jun 12 13:55:07 2000 +0000
+++ b/usr.sbin/ntp/ntpdc/Makefile       Mon Jun 12 13:57:38 2000 +0000
@@ -4,10 +4,4 @@
 MAN=   ntpdc.8
 SRCS=  ntpdc.c ntpdc_ops.c
 
-SRCS+= version.c
-CLEANFILES+=version.c version.o .version
-
 .include <bsd.prog.mk>
-
-version.c: ${OBJS:S/version.o//} ${LIBNTP}/libntp.a
-       sh ${.CURDIR}/../scripts/mkver ntpd
diff -r f434067e992d -r a9e4b740013a usr.sbin/ntp/ntpq/Makefile
--- a/usr.sbin/ntp/ntpq/Makefile        Mon Jun 12 13:55:07 2000 +0000
+++ b/usr.sbin/ntp/ntpq/Makefile        Mon Jun 12 13:57:38 2000 +0000
@@ -1,13 +1,7 @@
-#      $NetBSD: Makefile,v 1.2 2000/03/29 13:54:45 simonb Exp $
+#      $NetBSD: Makefile,v 1.3 2000/06/12 13:57:43 simonb Exp $
 
 PROG=  ntpq
 MAN=   ntpq.8
 SRCS=  ntpq.c ntpq_ops.c
 
-SRCS+= version.c
-CLEANFILES+=version.c version.o .version
-
 .include <bsd.prog.mk>
-
-version.c: ${OBJS:S/version.o//} ${LIBNTP}/libntp.a
-       sh ${.CURDIR}/../scripts/mkver ntpd
diff -r f434067e992d -r a9e4b740013a usr.sbin/ntp/ntptime/Makefile
--- a/usr.sbin/ntp/ntptime/Makefile     Mon Jun 12 13:55:07 2000 +0000
+++ b/usr.sbin/ntp/ntptime/Makefile     Mon Jun 12 13:57:38 2000 +0000
@@ -1,14 +1,9 @@
-#      $NetBSD: Makefile,v 1.2 2000/03/29 13:54:45 simonb Exp $
+#      $NetBSD: Makefile,v 1.3 2000/06/12 13:57:43 simonb Exp $
 
 PROG=  ntptime
 MAN=   ntptime.8
 SRCS=  ntptime.c
 
-SRCS+= version.c
 NTPSRCDIR=util
-CLEANFILES+=version.c version.o .version
 
 .include <bsd.prog.mk>
-
-version.c: ${OBJS:S/version.o//} ${LIBNTP}/libntp.a
-       sh ${.CURDIR}/../scripts/mkver ntpd
diff -r f434067e992d -r a9e4b740013a usr.sbin/ntp/ntptimeset/Makefile
--- a/usr.sbin/ntp/ntptimeset/Makefile  Mon Jun 12 13:55:07 2000 +0000
+++ b/usr.sbin/ntp/ntptimeset/Makefile  Mon Jun 12 13:57:38 2000 +0000
@@ -1,14 +1,9 @@
-#      $NetBSD: Makefile,v 1.2 2000/03/29 13:54:46 simonb Exp $
+#      $NetBSD: Makefile,v 1.3 2000/06/12 13:57:43 simonb Exp $
 
 PROG=  ntptimeset
 MKMAN= no      # no man page for ntptimeset
 SRCS=  ntptimeset.c ntptime_config.c
 
-SRCS+= version.c
 NTPSRCDIR=ntpdate
-CLEANFILES+=version.c version.o .version
 
 .include <bsd.prog.mk>
-
-version.c: ${OBJS:S/version.o//} ${LIBNTP}/libntp.a
-       sh ${.CURDIR}/../scripts/mkver ntpd
diff -r f434067e992d -r a9e4b740013a usr.sbin/ntp/ntptrace/Makefile
--- a/usr.sbin/ntp/ntptrace/Makefile    Mon Jun 12 13:55:07 2000 +0000
+++ b/usr.sbin/ntp/ntptrace/Makefile    Mon Jun 12 13:57:38 2000 +0000
@@ -1,13 +1,7 @@
-#      $NetBSD: Makefile,v 1.2 2000/03/29 13:54:46 simonb Exp $
+#      $NetBSD: Makefile,v 1.3 2000/06/12 13:57:44 simonb Exp $
 
 PROG=  ntptrace
 MAN=   ntptrace.8
 SRCS=  ntptrace.c
 
-SRCS+= version.c
-CLEANFILES+=version.c version.o .version
-
 .include <bsd.prog.mk>
-
-version.c: ${OBJS:S/version.o//} ${LIBNTP}/libntp.a
-       sh ${.CURDIR}/../scripts/mkver ntpd



Home | Main Index | Thread Index | Old Index