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
This commit is contained in:
ngie 2017-03-01 05:19:35 +00:00
parent ed4a41c447
commit 4520212e86
4 changed files with 13 additions and 13 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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 <bsd.prog.mk>