Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2017 05:19:35 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314478 - in head/usr.sbin/ntp: libntp ntpdate ntpdc ntpq
Message-ID:  <201703010519.v215JZTr038806@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Wed Mar  1 05:19:35 2017
New Revision: 314478
URL: https://svnweb.freebsd.org/changeset/base/314478

Log:
  Simplify idioms in Makefiles further
  
  - Use SRCTOP-relative paths instead of .CURDIR-relative ones where possible
  - Use :H to manipulate .CURDIR in areas instead of ..-relative paths.
  
  MFC after:	1 week
  Sponsored by:	Dell EMC Isilon

Modified:
  head/usr.sbin/ntp/libntp/Makefile
  head/usr.sbin/ntp/ntpdate/Makefile
  head/usr.sbin/ntp/ntpdc/Makefile
  head/usr.sbin/ntp/ntpq/Makefile

Modified: head/usr.sbin/ntp/libntp/Makefile
==============================================================================
--- head/usr.sbin/ntp/libntp/Makefile	Wed Mar  1 05:18:43 2017	(r314477)
+++ head/usr.sbin/ntp/libntp/Makefile	Wed Mar  1 05:19:35 2017	(r314478)
@@ -73,14 +73,14 @@ ISC_SRCS= assertions.c \
 
 SRCS=	${NTP_SRCS} ${ISC_SRCS} version.c
 
-CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \
-	-I${.CURDIR}/../../../contrib/ntp/lib/isc/include \
-	-I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include \
-	-I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \
-	-I${.CURDIR}/../../../contrib/ntp/sntp/libopts \
-	-I${.CURDIR}/../../../lib/libc/${MACHINE_ARCH} \
-	-I${.CURDIR}/../../../lib/libedit/edit \
-	-I${.CURDIR}/../ \
+CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
+	-I${SRCTOP}/contrib/ntp/lib/isc/include \
+	-I${SRCTOP}/contrib/ntp/lib/isc/unix/include \
+	-I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \
+	-I${SRCTOP}/contrib/ntp/sntp/libopts \
+	-I${SRCTOP}/lib/libc/${MACHINE_ARCH} \
+	-I${SRCTOP}/lib/libedit/edit \
+	-I${.CURDIR:H} \
 	-I${.CURDIR}/
 
 CFLAGS+= -DHAVE_BSD_NICE -DHAVE_STDINT_H
@@ -88,6 +88,6 @@ CFLAGS+= -DHAVE_BSD_NICE -DHAVE_STDINT_H
 CLEANFILES+= .version version.c
 
 version.c:
-	sh -e ${.CURDIR}/../scripts/mkver ntpd
+	sh -e ${.CURDIR:H}/scripts/mkver ntpd
 
 .include <bsd.lib.mk>

Modified: head/usr.sbin/ntp/ntpdate/Makefile
==============================================================================
--- head/usr.sbin/ntp/ntpdate/Makefile	Wed Mar  1 05:18:43 2017	(r314477)
+++ head/usr.sbin/ntp/ntpdate/Makefile	Wed Mar  1 05:19:35 2017	(r314478)
@@ -24,7 +24,7 @@ LIBADD+=	md
 
 CLEANFILES+= .version version.c
 
-version.c: 
-	sh -e ${.CURDIR}/../scripts/mkver ntpdate
+version.c:
+	sh -e ${.CURDIR:H}/scripts/mkver ntpdate
 
 .include <bsd.prog.mk>

Modified: head/usr.sbin/ntp/ntpdc/Makefile
==============================================================================
--- head/usr.sbin/ntp/ntpdc/Makefile	Wed Mar  1 05:18:43 2017	(r314477)
+++ head/usr.sbin/ntp/ntpdc/Makefile	Wed Mar  1 05:19:35 2017	(r314478)
@@ -30,6 +30,6 @@ LIBADD+=	md
 CLEANFILES+= .version version.c
 
 version.c:
-	sh -e ${.CURDIR}/../scripts/mkver ntpdc
+	sh -e ${.CURDIR:H}/scripts/mkver ntpdc
 
 .include <bsd.prog.mk>

Modified: head/usr.sbin/ntp/ntpq/Makefile
==============================================================================
--- head/usr.sbin/ntp/ntpq/Makefile	Wed Mar  1 05:18:43 2017	(r314477)
+++ head/usr.sbin/ntp/ntpq/Makefile	Wed Mar  1 05:19:35 2017	(r314478)
@@ -34,6 +34,6 @@ CFLAGS+=	-DHAVE_LIBEDIT -DHAVE_READLINE_
 CLEANFILES+= .version version.c
 
 version.c:
-	sh -e ${.CURDIR}/../scripts/mkver ntpq
+	sh -e ${.CURDIR:H}/scripts/mkver ntpq
 
 .include <bsd.prog.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703010519.v215JZTr038806>