From 4520212e86d6f92e0746003767b1c0e0da2f36b5 Mon Sep 17 00:00:00 2001 From: ngie Date: Wed, 1 Mar 2017 05:19:35 +0000 Subject: [PATCH] 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 --- usr.sbin/ntp/libntp/Makefile | 18 +++++++++--------- usr.sbin/ntp/ntpdate/Makefile | 4 ++-- usr.sbin/ntp/ntpdc/Makefile | 2 +- usr.sbin/ntp/ntpq/Makefile | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/usr.sbin/ntp/libntp/Makefile b/usr.sbin/ntp/libntp/Makefile index 749728639d7e..bd3b8b51d866 100644 --- a/usr.sbin/ntp/libntp/Makefile +++ b/usr.sbin/ntp/libntp/Makefile @@ -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 diff --git a/usr.sbin/ntp/ntpdate/Makefile b/usr.sbin/ntp/ntpdate/Makefile index 1a0c92412434..afd544d020da 100644 --- a/usr.sbin/ntp/ntpdate/Makefile +++ b/usr.sbin/ntp/ntpdate/Makefile @@ -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 diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile index b4a88c7f0496..b60aa9933fd3 100644 --- a/usr.sbin/ntp/ntpdc/Makefile +++ b/usr.sbin/ntp/ntpdc/Makefile @@ -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 diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile index 6a8dbf499c8b..cfb2c901d343 100644 --- a/usr.sbin/ntp/ntpq/Makefile +++ b/usr.sbin/ntp/ntpq/Makefile @@ -34,6 +34,6 @@ CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \ CLEANFILES+= .version version.c version.c: - sh -e ${.CURDIR}/../scripts/mkver ntpq + sh -e ${.CURDIR:H}/scripts/mkver ntpq .include