summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/acpi/Makefile.inc8
-rw-r--r--usr.sbin/amd/Makefile.inc16
-rw-r--r--usr.sbin/amd/amd/Makefile6
-rw-r--r--usr.sbin/amd/libamu/Makefile14
-rw-r--r--usr.sbin/ancontrol/Makefile2
-rw-r--r--usr.sbin/audit/Makefile2
-rw-r--r--usr.sbin/auditd/Makefile2
-rw-r--r--usr.sbin/auditdistd/Makefile2
-rw-r--r--usr.sbin/auditreduce/Makefile2
-rw-r--r--usr.sbin/authpf/Makefile2
-rw-r--r--usr.sbin/autofs/Makefile4
-rw-r--r--usr.sbin/bhyvectl/Makefile2
-rw-r--r--usr.sbin/bhyveload/Makefile2
-rw-r--r--usr.sbin/bluetooth/Makefile.inc3
-rw-r--r--usr.sbin/bluetooth/bthidcontrol/Makefile4
-rw-r--r--usr.sbin/bluetooth/rfcomm_pppd/Makefile2
-rw-r--r--usr.sbin/bsnmpd/bsnmpd/Makefile2
-rw-r--r--usr.sbin/bsnmpd/gensnmptree/Makefile2
-rw-r--r--usr.sbin/bsnmpd/tools/Makefile.inc6
-rw-r--r--usr.sbin/camdd/Makefile2
-rw-r--r--usr.sbin/ckdist/Makefile2
-rw-r--r--usr.sbin/cron/crontab/Makefile2
-rw-r--r--usr.sbin/cron/lib/Makefile2
-rw-r--r--usr.sbin/ctladm/Makefile4
-rw-r--r--usr.sbin/ctld/Makefile10
-rw-r--r--usr.sbin/ctm/Makefile.inc4
-rw-r--r--usr.sbin/ctm/ctm/Makefile4
-rw-r--r--usr.sbin/ctm/ctm_dequeue/Makefile4
-rw-r--r--usr.sbin/ctm/ctm_smail/Makefile4
-rw-r--r--usr.sbin/dconschat/Makefile2
-rw-r--r--usr.sbin/editmap/Makefile2
-rw-r--r--usr.sbin/eeprom/Makefile4
-rw-r--r--usr.sbin/fdcontrol/Makefile4
-rw-r--r--usr.sbin/fdformat/Makefile4
-rw-r--r--usr.sbin/fmtree/Makefile2
-rw-r--r--usr.sbin/fstyp/Makefile2
-rw-r--r--usr.sbin/ftp-proxy/Makefile4
-rw-r--r--usr.sbin/fwcontrol/Makefile4
-rw-r--r--usr.sbin/gpioctl/Makefile2
-rw-r--r--usr.sbin/gssd/Makefile4
-rw-r--r--usr.sbin/hyperv/tools/kvp/Makefile8
-rw-r--r--usr.sbin/hyperv/tools/vss/Makefile8
-rw-r--r--usr.sbin/iovctl/Makefile2
-rw-r--r--usr.sbin/iscsid/Makefile4
-rw-r--r--usr.sbin/mailstats/Makefile2
-rw-r--r--usr.sbin/mailwrapper/Makefile2
-rw-r--r--usr.sbin/makemap/Makefile2
-rw-r--r--usr.sbin/mlxcontrol/Makefile2
-rw-r--r--usr.sbin/mount_smbfs/Makefile4
-rw-r--r--usr.sbin/mountd/Makefile2
-rw-r--r--usr.sbin/mpsutil/Makefile2
-rw-r--r--usr.sbin/ndiscvt/Makefile4
-rw-r--r--usr.sbin/ndp/Makefile4
-rw-r--r--usr.sbin/nmtree/Makefile8
-rw-r--r--usr.sbin/pkg/Makefile4
-rw-r--r--usr.sbin/pnpinfo/Makefile4
-rw-r--r--usr.sbin/praliases/Makefile2
-rw-r--r--usr.sbin/praudit/Makefile2
-rw-r--r--usr.sbin/pwd_mkdb/Makefile4
-rw-r--r--usr.sbin/rip6query/Makefile2
-rw-r--r--usr.sbin/rpcbind/tests/Makefile2
-rw-r--r--usr.sbin/rtadvctl/Makefile4
-rw-r--r--usr.sbin/sa/Makefile2
-rw-r--r--usr.sbin/sendmail/Makefile4
-rw-r--r--usr.sbin/tcpdump/tcpdump/Makefile2
-rw-r--r--usr.sbin/timed/timedc/Makefile2
66 files changed, 122 insertions, 121 deletions
diff --git a/usr.sbin/acpi/Makefile.inc b/usr.sbin/acpi/Makefile.inc
index 9692f0a..27e16d0 100644
--- a/usr.sbin/acpi/Makefile.inc
+++ b/usr.sbin/acpi/Makefile.inc
@@ -1,13 +1,13 @@
# $Id: Makefile.inc,v 1.1 2000/07/14 18:16:22 iwasaki Exp $
# $FreeBSD$
-ACPICA_DIR= ${.CURDIR}/../../../sys/contrib/dev/acpica
-CFLAGS+= -I${.CURDIR}/../../../sys
+ACPICA_DIR= ${SRCTOP}/sys/contrib/dev/acpica
+CFLAGS+= -I${SRCTOP}/sys
PACKAGE= acpi
-.if exists(${.CURDIR}/../../Makefile.inc)
-.include "${.CURDIR}/../../Makefile.inc"
+.if exists(${.CURDIR:H:H}/Makefile.inc)
+.include "${.CURDIR:H:H}/Makefile.inc"
.endif
.PATH: ${ACPICA_DIR} \
diff --git a/usr.sbin/amd/Makefile.inc b/usr.sbin/amd/Makefile.inc
index d558fa4..16c11cc 100644
--- a/usr.sbin/amd/Makefile.inc
+++ b/usr.sbin/amd/Makefile.inc
@@ -13,13 +13,13 @@
PACKAGE= amd
-CFLAGS+= -I. -I${.CURDIR}
-CFLAGS+= -I${.CURDIR}/../include
-.if exists(${.OBJDIR}/../include)
-CFLAGS+= -I${.OBJDIR}/../include
+CFLAGS+= -I. -I${.CURDIR}
+CFLAGS+= -I${.CURDIR:H}/include
+.if exists(${.OBJDIR:H}/include)
+CFLAGS+= -I${.OBJDIR:H}/include
.endif
-CFLAGS+= -I${.CURDIR}/../../../contrib/amd/include
-CFLAGS+= -I${.CURDIR}/../../../contrib/amd
+CFLAGS+= -I${SRCTOP}/contrib/amd/include
+CFLAGS+= -I${SRCTOP}/contrib/amd
CFLAGS+= -DHAVE_CONFIG_H
.if ${MK_NIS} == "no"
CFLAGS+= -DHAVE_LOCALCONFIG_H
@@ -37,6 +37,6 @@ NFS_PROT_X= ${SRCTOP}/include/rpcsvc/nfs_prot.x
WARNS?= 1
-.if exists(${.CURDIR}/../../Makefile.inc)
-.include "${.CURDIR}/../../Makefile.inc"
+.if exists(${.CURDIR:H:H}/Makefile.inc)
+.include "${.CURDIR:H:H}/Makefile.inc"
.endif
diff --git a/usr.sbin/amd/amd/Makefile b/usr.sbin/amd/amd/Makefile
index 4dade99..35df6aa 100644
--- a/usr.sbin/amd/amd/Makefile
+++ b/usr.sbin/amd/amd/Makefile
@@ -6,7 +6,7 @@
# $FreeBSD$
#
-.include <src.opts.mk>
+.include <bsd.init.mk>
.PATH: ${.CURDIR}/../../../contrib/amd/amd
@@ -28,7 +28,7 @@ SRCS+= srvr_amfs_auto.c srvr_nfs.c sun_map.c
CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amd \
-I${SRCTOP}/contrib/amd/include \
- -I${.OBJDIR}/../../../include/rpcsvc
+ -I${OBJTOP}/include/rpcsvc
LIBADD= amu
@@ -62,7 +62,7 @@ SRCS+= mount_xdr.c
CLEANFILES+= mount_xdr.c
mount_xdr.c: ${MOUNT_X}
- ${RPCCOM} -c -DWANT_NFS3 ${MOUNT_X} -o ${.TARGET}
+ ${RPCCOM} -c -DWANT_NFS3 ${.ALLSRC} -o ${.TARGET}
.if ${MK_HESIOD} != "no"
SRCS+= info_hesiod.c
diff --git a/usr.sbin/amd/libamu/Makefile b/usr.sbin/amd/libamu/Makefile
index d82a8cf..73b5c53 100644
--- a/usr.sbin/amd/libamu/Makefile
+++ b/usr.sbin/amd/libamu/Makefile
@@ -5,10 +5,12 @@
#
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../contrib/amd/libamu \
- ${.CURDIR}/../../../contrib/amd/conf/transp \
- ${.CURDIR}/../../../contrib/amd/conf/mtab \
- ${.CURDIR}/../../../contrib/amd/conf/umount
+.include <bsd.init.mk>
+
+.PATH: ${SRCTOP}/contrib/amd/libamu \
+ ${SRCTOP}/contrib/amd/conf/transp \
+ ${SRCTOP}/contrib/amd/conf/mtab \
+ ${SRCTOP}/contrib/amd/conf/umount
LIB= amu
INTERNALLIB=
@@ -23,10 +25,10 @@ SRCS+= nfs_prot_x.c xdr_func_%undef.c
CLEANFILES+= nfs_prot_x.c xdr_func_%undef.c
CFLAGS+= -I${.CURDIR}/../../../contrib/amd/libamu \
- -I${.OBJDIR}/../../../include/rpcsvc
+ -I${OBJTOP}/include/rpcsvc
nfs_prot_x.c: ${NFS_PROT_X}
- ${RPCCOM} -c -C -DWANT_NFS3 ${NFS_PROT_X} -o ${.TARGET}
+ ${RPCCOM} -c -C -DWANT_NFS3 ${.ALLSRC} -o ${.TARGET}
XDRDEFS!= grep 'ifndef.*HAVE_XDR' ${.CURDIR}/../../../contrib/amd/libamu/xdr_func.c | awk '{print "-D"$$2}'
diff --git a/usr.sbin/ancontrol/Makefile b/usr.sbin/ancontrol/Makefile
index f06b943..61dd02b 100644
--- a/usr.sbin/ancontrol/Makefile
+++ b/usr.sbin/ancontrol/Makefile
@@ -4,7 +4,7 @@ PROG= ancontrol
MAN= ancontrol.8
WARNS?= 3
-CFLAGS+= -DANCACHE -I${.CURDIR}/../../sys
+CFLAGS+= -DANCACHE -I${SRCTOP}/sys
LIBADD= md
diff --git a/usr.sbin/audit/Makefile b/usr.sbin/audit/Makefile
index 14fc893..4fa6856 100644
--- a/usr.sbin/audit/Makefile
+++ b/usr.sbin/audit/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
#
-OPENBSMDIR=${.CURDIR}/../../contrib/openbsm
+OPENBSMDIR=${SRCTOP}/contrib/openbsm
.PATH: ${OPENBSMDIR}/bin/audit
CFLAGS+= -I${OPENBSMDIR}
diff --git a/usr.sbin/auditd/Makefile b/usr.sbin/auditd/Makefile
index 3fb6a40..45fcd75 100644
--- a/usr.sbin/auditd/Makefile
+++ b/usr.sbin/auditd/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
#
-OPENBSMDIR=${.CURDIR}/../../contrib/openbsm
+OPENBSMDIR=${SRCTOP}/contrib/openbsm
.PATH: ${OPENBSMDIR}/bin/auditd
CFLAGS+= -I${OPENBSMDIR}
diff --git a/usr.sbin/auditdistd/Makefile b/usr.sbin/auditdistd/Makefile
index 8d32884..e6216ab 100644
--- a/usr.sbin/auditdistd/Makefile
+++ b/usr.sbin/auditdistd/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
#
-OPENBSMDIR=${.CURDIR}/../../contrib/openbsm
+OPENBSMDIR=${SRCTOP}/contrib/openbsm
.PATH: ${OPENBSMDIR}/bin/auditdistd
# Addition of auditdistd because otherwise generated parse.c can't find
diff --git a/usr.sbin/auditreduce/Makefile b/usr.sbin/auditreduce/Makefile
index a462e1b..d7f2328 100644
--- a/usr.sbin/auditreduce/Makefile
+++ b/usr.sbin/auditreduce/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
#
-OPENBSMDIR=${.CURDIR}/../../contrib/openbsm
+OPENBSMDIR=${SRCTOP}/contrib/openbsm
.PATH: ${OPENBSMDIR}/bin/auditreduce
CFLAGS+= -I${OPENBSMDIR}
diff --git a/usr.sbin/authpf/Makefile b/usr.sbin/authpf/Makefile
index be95a4b..19fd66b 100644
--- a/usr.sbin/authpf/Makefile
+++ b/usr.sbin/authpf/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../contrib/pf/authpf
+.PATH: ${SRCTOP}/contrib/pf/authpf
PROG= authpf
MAN= authpf.8
diff --git a/usr.sbin/autofs/Makefile b/usr.sbin/autofs/Makefile
index cc13bcc..760ec56 100644
--- a/usr.sbin/autofs/Makefile
+++ b/usr.sbin/autofs/Makefile
@@ -13,14 +13,14 @@ SRCS+= popen.c
SRCS+= token.l
CFLAGS+=-I${.CURDIR}
-CFLAGS+=-I${.CURDIR}/../../sys/fs/autofs
+CFLAGS+=-I${SRCTOP}/sys/fs/autofs
MAN= automount.8 automountd.8 autounmountd.8 auto_master.5
LIBADD= util
# Needed for getmntopts.c
-MOUNT= ${.CURDIR}/../../sbin/mount
+MOUNT= ${SRCTOP}/sbin/mount
CFLAGS+=-I${MOUNT}
WARNS= 6
diff --git a/usr.sbin/bhyvectl/Makefile b/usr.sbin/bhyvectl/Makefile
index 4f0ecdd..0ffca56 100644
--- a/usr.sbin/bhyvectl/Makefile
+++ b/usr.sbin/bhyvectl/Makefile
@@ -12,6 +12,6 @@ LIBADD= vmmapi util
WARNS?= 3
-CFLAGS+= -I${.CURDIR}/../../sys/amd64/vmm
+CFLAGS+= -I${SRCTOP}/sys/amd64/vmm
.include <bsd.prog.mk>
diff --git a/usr.sbin/bhyveload/Makefile b/usr.sbin/bhyveload/Makefile
index 5fa692d..f0241b8 100644
--- a/usr.sbin/bhyveload/Makefile
+++ b/usr.sbin/bhyveload/Makefile
@@ -9,6 +9,6 @@ LIBADD= vmmapi
WARNS?= 3
-CFLAGS+=-I${.CURDIR}/../../sys/boot/userboot
+CFLAGS+=-I${SRCTOP}/sys/boot/userboot
.include <bsd.prog.mk>
diff --git a/usr.sbin/bluetooth/Makefile.inc b/usr.sbin/bluetooth/Makefile.inc
index c0e05cf..993a2f3 100644
--- a/usr.sbin/bluetooth/Makefile.inc
+++ b/usr.sbin/bluetooth/Makefile.inc
@@ -1,4 +1,3 @@
# $FreeBSD$
-.include "${.CURDIR}/../../Makefile.inc"
-
+.include "${.CURDIR:H:H}/Makefile.inc"
diff --git a/usr.sbin/bluetooth/bthidcontrol/Makefile b/usr.sbin/bluetooth/bthidcontrol/Makefile
index 09128d6..61988ae 100644
--- a/usr.sbin/bluetooth/bthidcontrol/Makefile
+++ b/usr.sbin/bluetooth/bthidcontrol/Makefile
@@ -1,13 +1,13 @@
# $Id: Makefile,v 1.2 2004/02/13 21:44:41 max Exp $
# $FreeBSD$
-.PATH: ${.CURDIR}/../bthidd
+.PATH: ${.CURDIR:H}/bthidd
PROG= bthidcontrol
MAN= bthidcontrol.8
SRCS= bthidcontrol.c hid.c lexer.l parser.y sdp.c
WARNS?= 1
-CFLAGS+= -DBTHIDCONTROL=1 -I${.CURDIR}/../bthidd
+CFLAGS+= -DBTHIDCONTROL=1 -I${.CURDIR:H}/bthidd
LIBADD+= bluetooth sdp usbhid
diff --git a/usr.sbin/bluetooth/rfcomm_pppd/Makefile b/usr.sbin/bluetooth/rfcomm_pppd/Makefile
index f31e1e5..c739fbf 100644
--- a/usr.sbin/bluetooth/rfcomm_pppd/Makefile
+++ b/usr.sbin/bluetooth/rfcomm_pppd/Makefile
@@ -1,7 +1,7 @@
# $Id: Makefile,v 1.7 2003/09/07 18:32:11 max Exp $
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../usr.bin/bluetooth/rfcomm_sppd
+.PATH: ${SRCTOP}/usr.bin/bluetooth/rfcomm_sppd
PROG= rfcomm_pppd
MAN= rfcomm_pppd.8
diff --git a/usr.sbin/bsnmpd/bsnmpd/Makefile b/usr.sbin/bsnmpd/bsnmpd/Makefile
index c1a90f78..d23ee1d 100644
--- a/usr.sbin/bsnmpd/bsnmpd/Makefile
+++ b/usr.sbin/bsnmpd/bsnmpd/Makefile
@@ -4,7 +4,7 @@
.include <src.opts.mk>
-CONTRIB=${.CURDIR}/../../../contrib/bsnmp
+CONTRIB=${SRCTOP}/contrib/bsnmp
.PATH: ${CONTRIB}/snmpd
PROG= bsnmpd
diff --git a/usr.sbin/bsnmpd/gensnmptree/Makefile b/usr.sbin/bsnmpd/gensnmptree/Makefile
index a92f4eb..52b77f6 100644
--- a/usr.sbin/bsnmpd/gensnmptree/Makefile
+++ b/usr.sbin/bsnmpd/gensnmptree/Makefile
@@ -2,7 +2,7 @@
#
# Author: Harti Brandt <harti@freebsd.org>
-CONTRIB=${.CURDIR}/../../../contrib/bsnmp
+CONTRIB=${SRCTOP}/contrib/bsnmp
.PATH: ${CONTRIB}/gensnmptree
PROG= gensnmptree
diff --git a/usr.sbin/bsnmpd/tools/Makefile.inc b/usr.sbin/bsnmpd/tools/Makefile.inc
index 8a5b9a0..ba1727e 100644
--- a/usr.sbin/bsnmpd/tools/Makefile.inc
+++ b/usr.sbin/bsnmpd/tools/Makefile.inc
@@ -6,10 +6,10 @@ PACKAGE= bsnmp
CFLAGS+= -I. -I${.CURDIR}
-.if exists(${.OBJDIR}/../libbsnmptools)
-LIBBSNMPTOOLSDIR= ${.OBJDIR}/../libbsnmptools
+.if exists(${.OBJDIR:H}/libbsnmptools)
+LIBBSNMPTOOLSDIR= ${.OBJDIR:H}/libbsnmptools
.else
-LIBBSNMPTOOLSDIR= ${.CURDIR}/../libbsnmptools
+LIBBSNMPTOOLSDIR= ${.CURDIR:H}/libbsnmptools
.endif
LIBBSNMPTOOLS= ${LIBBSNMPTOOLSDIR}/libbsnmptools.a
diff --git a/usr.sbin/camdd/Makefile b/usr.sbin/camdd/Makefile
index 64ee61b..4719130 100644
--- a/usr.sbin/camdd/Makefile
+++ b/usr.sbin/camdd/Makefile
@@ -2,7 +2,7 @@
PROG= camdd
SRCS= camdd.c
-SDIR= ${.CURDIR}/../../sys
+SDIR= ${SRCTOP}/sys
LIBADD= cam mt util pthread
NO_WTHREAD_SAFETY= 1
MAN= camdd.8
diff --git a/usr.sbin/ckdist/Makefile b/usr.sbin/ckdist/Makefile
index 4d35763..e8a9213 100644
--- a/usr.sbin/ckdist/Makefile
+++ b/usr.sbin/ckdist/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../usr.bin/cksum
+.PATH: ${SRCTOP}/usr.bin/cksum
PROG= ckdist
SRCS= ckdist.c crc.c
diff --git a/usr.sbin/cron/crontab/Makefile b/usr.sbin/cron/crontab/Makefile
index 9f43112..7b780ed 100644
--- a/usr.sbin/cron/crontab/Makefile
+++ b/usr.sbin/cron/crontab/Makefile
@@ -10,7 +10,7 @@ PRECIOUSPROG=
WARNS?= 3
-CFLAGS+= -I${.CURDIR}/../cron
+CFLAGS+= -I${.CURDIR:H}/cron
LIBADD= cron md util
diff --git a/usr.sbin/cron/lib/Makefile b/usr.sbin/cron/lib/Makefile
index 51316c1..d8203c5a 100644
--- a/usr.sbin/cron/lib/Makefile
+++ b/usr.sbin/cron/lib/Makefile
@@ -6,7 +6,7 @@ SRCS= entry.c env.c misc.c
WARNS?= 3
-CFLAGS+= -I${.CURDIR}/../cron
+CFLAGS+= -I${.CURDIR:H}/cron
CFLAGS+= -DLOGIN_CAP -DPAM
.include <bsd.lib.mk>
diff --git a/usr.sbin/ctladm/Makefile b/usr.sbin/ctladm/Makefile
index fd9e606..c5e7e87 100644
--- a/usr.sbin/ctladm/Makefile
+++ b/usr.sbin/ctladm/Makefile
@@ -2,8 +2,8 @@
PROG= ctladm
SRCS= ctladm.c util.c ctl_util.c ctl_scsi_all.c
-.PATH: ${.CURDIR}/../../sys/cam/ctl
-SDIR= ${.CURDIR}/../../sys
+.PATH: ${SRCTOP}/sys/cam/ctl
+SDIR= ${SRCTOP}/sys
CFLAGS+= -I${SDIR}
# This is necessary because of these warnings:
# warning: cast increases required alignment of target type
diff --git a/usr.sbin/ctld/Makefile b/usr.sbin/ctld/Makefile
index 6ce58bc..7c34256 100644
--- a/usr.sbin/ctld/Makefile
+++ b/usr.sbin/ctld/Makefile
@@ -1,15 +1,15 @@
# $FreeBSD$
-CFLAGS+=-I${.CURDIR}/../../contrib/libucl/include
-.PATH: ${.CURDIR}/../../contrib/libucl/include
+CFLAGS+=-I${SRCTOP}/contrib/libucl/include
+.PATH: ${SRCTOP}/contrib/libucl/include
PROG= ctld
SRCS= chap.c ctld.c discovery.c isns.c kernel.c keys.c log.c
SRCS+= login.c parse.y pdu.c token.l y.tab.h uclparse.c
CFLAGS+= -I${.CURDIR}
-CFLAGS+= -I${.CURDIR}/../../sys
-CFLAGS+= -I${.CURDIR}/../../sys/cam/ctl
-CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi
+CFLAGS+= -I${SRCTOP}/sys
+CFLAGS+= -I${SRCTOP}/sys/cam/ctl
+CFLAGS+= -I${SRCTOP}/sys/dev/iscsi
#CFLAGS+= -DICL_KERNEL_PROXY
MAN= ctld.8 ctl.conf.5
diff --git a/usr.sbin/ctm/Makefile.inc b/usr.sbin/ctm/Makefile.inc
index c6c2c5a..78adccb 100644
--- a/usr.sbin/ctm/Makefile.inc
+++ b/usr.sbin/ctm/Makefile.inc
@@ -1,5 +1,5 @@
# $FreeBSD$
-.if exists(${.CURDIR}/../../Makefile.inc)
-.include "${.CURDIR}/../../Makefile.inc"
+.if exists(${.CURDIR:H:H}/Makefile.inc)
+.include "${.CURDIR:H:H}/Makefile.inc"
.endif
diff --git a/usr.sbin/ctm/ctm/Makefile b/usr.sbin/ctm/ctm/Makefile
index dd27ed2..5f72f05 100644
--- a/usr.sbin/ctm/ctm/Makefile
+++ b/usr.sbin/ctm/ctm/Makefile
@@ -18,7 +18,7 @@ LIBADD= md
WARNS?= 2
-.if exists(${.CURDIR}/../../Makefile.inc)
-.include "${.CURDIR}/../../Makefile.inc"
+.if exists(${.CURDIR:H:H}/Makefile.inc)
+.include "${.CURDIR:H:H}/Makefile.inc"
.endif
.include <bsd.prog.mk>
diff --git a/usr.sbin/ctm/ctm_dequeue/Makefile b/usr.sbin/ctm/ctm_dequeue/Makefile
index d2f5648..cbc7f0c 100644
--- a/usr.sbin/ctm/ctm_dequeue/Makefile
+++ b/usr.sbin/ctm/ctm_dequeue/Makefile
@@ -1,12 +1,12 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../ctm_rmail
+.PATH: ${.CURDIR:H}/ctm_rmail
PROG= ctm_dequeue
MAN=
SRCS= ctm_dequeue.c error.c
-CFLAGS+= -I${.CURDIR}/../ctm_rmail
+CFLAGS+= -I${.CURDIR:H}/ctm_rmail
WARNS?= 1
diff --git a/usr.sbin/ctm/ctm_smail/Makefile b/usr.sbin/ctm/ctm_smail/Makefile
index 4c98d31..88e8c21 100644
--- a/usr.sbin/ctm/ctm_smail/Makefile
+++ b/usr.sbin/ctm/ctm_smail/Makefile
@@ -1,12 +1,12 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../ctm_rmail
+.PATH: ${.CURDIR:H}/ctm_rmail
PROG= ctm_smail
MAN=
SRCS= ctm_smail.c error.c
-CFLAGS+= -I${.CURDIR}/../ctm_rmail
+CFLAGS+= -I${.CURDIR:H}/ctm_rmail
WARNS?= 2
diff --git a/usr.sbin/dconschat/Makefile b/usr.sbin/dconschat/Makefile
index 198c5cc..c0bc058 100644
--- a/usr.sbin/dconschat/Makefile
+++ b/usr.sbin/dconschat/Makefile
@@ -3,7 +3,7 @@
PROG= dconschat
MAN= dconschat.8
-CFLAGS+= -I${.CURDIR}/../../sys
+CFLAGS+= -I${SRCTOP}/sys
LIBADD= kvm
diff --git a/usr.sbin/editmap/Makefile b/usr.sbin/editmap/Makefile
index 23e967f..04ce398 100644
--- a/usr.sbin/editmap/Makefile
+++ b/usr.sbin/editmap/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
+SENDMAIL_DIR=${SRCTOP}/contrib/sendmail
.PATH: ${SENDMAIL_DIR}/editmap
PROG= editmap
diff --git a/usr.sbin/eeprom/Makefile b/usr.sbin/eeprom/Makefile
index 61b48a2..73d5a4e 100644
--- a/usr.sbin/eeprom/Makefile
+++ b/usr.sbin/eeprom/Makefile
@@ -1,11 +1,11 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../ofwdump
+.PATH: ${.CURDIR:H}/ofwdump
PROG= eeprom
MAN= eeprom.8
MANSUBDIR= /sparc64
SRCS= eeprom.c ofw_options.c ofw_util.c
-CFLAGS+= -I${.CURDIR}/../ofwdump
+CFLAGS+= -I${.CURDIR:H}/ofwdump
.include <bsd.prog.mk>
diff --git a/usr.sbin/fdcontrol/Makefile b/usr.sbin/fdcontrol/Makefile
index 5f1426b..77442b6 100644
--- a/usr.sbin/fdcontrol/Makefile
+++ b/usr.sbin/fdcontrol/Makefile
@@ -1,10 +1,10 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../fdread
+.PATH: ${.CURDIR:H}/fdread
PROG= fdcontrol
SRCS= fdcontrol.c fdutil.c
-CFLAGS+= -I${.CURDIR}/../fdread
+CFLAGS+= -I${.CURDIR:H}/fdread
MAN= fdcontrol.8
.if ${MACHINE} == "pc98"
diff --git a/usr.sbin/fdformat/Makefile b/usr.sbin/fdformat/Makefile
index 59cd124..e7b5f23 100644
--- a/usr.sbin/fdformat/Makefile
+++ b/usr.sbin/fdformat/Makefile
@@ -1,11 +1,11 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../fdread
+.PATH: ${.CURDIR:H}/fdread
PROG= fdformat
SRCS= fdformat.c fdutil.c
-CFLAGS+= -I${.CURDIR}/../fdread
+CFLAGS+= -I${.CURDIR:H}/fdread
.if ${MACHINE} == "pc98"
CFLAGS+= -DPC98
diff --git a/usr.sbin/fmtree/Makefile b/usr.sbin/fmtree/Makefile
index 6d060e2..5e1bb60 100644
--- a/usr.sbin/fmtree/Makefile
+++ b/usr.sbin/fmtree/Makefile
@@ -3,7 +3,7 @@
.include <bsd.own.mk>
-.PATH: ${.CURDIR}/../../usr.bin/cksum
+.PATH: ${SRCTOP}/usr.bin/cksum
PROG= fmtree
MAN= fmtree.8
diff --git a/usr.sbin/fstyp/Makefile b/usr.sbin/fstyp/Makefile
index 1fde445..ac06d1c 100644
--- a/usr.sbin/fstyp/Makefile
+++ b/usr.sbin/fstyp/Makefile
@@ -18,7 +18,7 @@ WARNS?= 2
SUBDIR+= tests
.endif
-CFLAGS+=-I${.CURDIR}/../../sys
+CFLAGS+=-I${SRCTOP}/sys
.if ${MK_ZFS} != "no"
IGNORE_PRAGMA= YES
diff --git a/usr.sbin/ftp-proxy/Makefile b/usr.sbin/ftp-proxy/Makefile
index 103ea86..443db1c 100644
--- a/usr.sbin/ftp-proxy/Makefile
+++ b/usr.sbin/ftp-proxy/Makefile
@@ -1,13 +1,13 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../contrib/pf/ftp-proxy
+.PATH: ${SRCTOP}/contrib/pf/ftp-proxy
PROG= ftp-proxy
MAN= ftp-proxy.8
SRCS= ftp-proxy.c filter.c
-CFLAGS+=-I${.CURDIR}/../../contrib/pf/libevent
+CFLAGS+=-I${SRCTOP}/contrib/pf/libevent
LIBADD= event
diff --git a/usr.sbin/fwcontrol/Makefile b/usr.sbin/fwcontrol/Makefile
index 10320d2..ec0e67f 100644
--- a/usr.sbin/fwcontrol/Makefile
+++ b/usr.sbin/fwcontrol/Makefile
@@ -5,9 +5,9 @@ SRCS= fwcontrol.c fwcrom.c fwdv.c fwmpegts.c
MAN= fwcontrol.8
WARNS?= 3
-.PATH: ${.CURDIR}/../../sys/dev/firewire
+.PATH: ${SRCTOP}/sys/dev/firewire
-SDIR= ${.CURDIR}/../../sys
+SDIR= ${SRCTOP}/sys
CFLAGS+=-I${.CURDIR} -I${SDIR}
.include <bsd.prog.mk>
diff --git a/usr.sbin/gpioctl/Makefile b/usr.sbin/gpioctl/Makefile
index c0a907b..3c86c99 100644
--- a/usr.sbin/gpioctl/Makefile
+++ b/usr.sbin/gpioctl/Makefile
@@ -3,7 +3,7 @@
PROG= gpioctl
MAN= gpioctl.8
-CFLAGS+= -I${.CURDIR}/../../lib/libgpio
+CFLAGS+= -I${SRCTOP}/lib/libgpio
LIBADD= gpio
diff --git a/usr.sbin/gssd/Makefile b/usr.sbin/gssd/Makefile
index 4faaf2d..e400170 100644
--- a/usr.sbin/gssd/Makefile
+++ b/usr.sbin/gssd/Makefile
@@ -18,7 +18,7 @@ CFLAGS+= -DWITHOUT_KERBEROS
CLEANFILES= gssd_svc.c gssd_xdr.c gssd.h
-RPCSRC= ${.CURDIR}/../../sys/kgssapi/gssd.x
+RPCSRC= ${SRCTOP}/sys/kgssapi/gssd.x
RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C -M
gssd_svc.c: ${RPCSRC} gssd.h
@@ -30,6 +30,6 @@ gssd_xdr.c: ${RPCSRC} gssd.h
gssd.h: ${RPCSRC}
${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
-.PATH: ${.CURDIR}/../../sys/kgssapi
+.PATH: ${SRCTOP}/sys/kgssapi
.include <bsd.prog.mk>
diff --git a/usr.sbin/hyperv/tools/kvp/Makefile b/usr.sbin/hyperv/tools/kvp/Makefile
index e1bc47c..ca87371 100644
--- a/usr.sbin/hyperv/tools/kvp/Makefile
+++ b/usr.sbin/hyperv/tools/kvp/Makefile
@@ -2,12 +2,12 @@
.include <bsd.own.mk>
-HV_KVP_DAEMON_DISTDIR?= ${.CURDIR}/../../../../contrib/hyperv/tools
-.PATH: ${HV_KVP_DAEMON_DISTDIR}
+HV_KVP_DAEMON_DISTDIR?= ${SRCTOP}/contrib/hyperv/tools
+.PATH: ${HV_KVP_DAEMON_DISTDIR}
PROG= hv_kvp_daemon
-MAN= hv_kvp_daemon.8
+MAN= hv_kvp_daemon.8
-CFLAGS+= -I${.CURDIR}/../../../../sys/dev/hyperv/utilities
+CFLAGS+= -I${SRCTOP}/sys/dev/hyperv/utilities
.include <bsd.prog.mk>
diff --git a/usr.sbin/hyperv/tools/vss/Makefile b/usr.sbin/hyperv/tools/vss/Makefile
index c9a2e6a..d6fb6a3 100644
--- a/usr.sbin/hyperv/tools/vss/Makefile
+++ b/usr.sbin/hyperv/tools/vss/Makefile
@@ -3,12 +3,12 @@ DIRDEPS = lib/libc
.include <bsd.own.mk>
-HV_VSS_DAEMON_DISTDIR?= ${.CURDIR}/../../../../contrib/hyperv/tools
-.PATH: ${HV_VSS_DAEMON_DISTDIR}
+HV_VSS_DAEMON_DISTDIR?= ${SRCTOP}/contrib/hyperv/tools
+.PATH: ${HV_VSS_DAEMON_DISTDIR}
PROG= hv_vss_daemon
-MAN= hv_vss_daemon.8
+MAN= hv_vss_daemon.8
-CFLAGS+= -I${.CURDIR}/../../../../sys/dev/hyperv/utilities
+CFLAGS+= -I${SRCTOP}/sys/dev/hyperv/utilities
.include <bsd.prog.mk>
diff --git a/usr.sbin/iovctl/Makefile b/usr.sbin/iovctl/Makefile
index d5b2780..c9083eb 100644
--- a/usr.sbin/iovctl/Makefile
+++ b/usr.sbin/iovctl/Makefile
@@ -4,7 +4,7 @@ PROG= iovctl
SRCS= iovctl.c parse.c validate.c
LIBADD= nv ucl m
-CFLAGS+=-I${.CURDIR}/../../contrib/libucl/include
+CFLAGS+=-I${SRCTOP}/contrib/libucl/include
WARNS?=6
diff --git a/usr.sbin/iscsid/Makefile b/usr.sbin/iscsid/Makefile
index 6353481..c22fb9a 100644
--- a/usr.sbin/iscsid/Makefile
+++ b/usr.sbin/iscsid/Makefile
@@ -4,8 +4,8 @@ PACKAGE= iscsi
PROG= iscsid
SRCS= chap.c discovery.c iscsid.c keys.c log.c login.c pdu.c
CFLAGS+= -I${.CURDIR}
-CFLAGS+= -I${.CURDIR}/../../sys/cam
-CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi
+CFLAGS+= -I${SRCTOP}/sys/cam
+CFLAGS+= -I${SRCTOP}/sys/dev/iscsi
CFLAGS+= -DICL_KERNEL_PROXY
MAN= iscsid.8
diff --git a/usr.sbin/mailstats/Makefile b/usr.sbin/mailstats/Makefile
index 3d03ff8..b8dd892 100644
--- a/usr.sbin/mailstats/Makefile
+++ b/usr.sbin/mailstats/Makefile
@@ -1,7 +1,7 @@
# @(#)Makefile 8.2 (Berkeley) 9/21/96
# $FreeBSD$
-SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail
+SENDMAIL_DIR= ${SRCTOP}/contrib/sendmail
.PATH: ${SENDMAIL_DIR}/mailstats
PROG= mailstats
diff --git a/usr.sbin/mailwrapper/Makefile b/usr.sbin/mailwrapper/Makefile
index 5500356..799d7e4 100644
--- a/usr.sbin/mailwrapper/Makefile
+++ b/usr.sbin/mailwrapper/Makefile
@@ -27,7 +27,7 @@ SYMLINKS+= ..${BINDIR}/mailwrapper /bin/rmail
.if ${MK_MAILWRAPPER} != "no"
.if !exists(${DESTDIR}/etc/mail/mailer.conf)
-FILES= ${.CURDIR}/../../etc/mail/mailer.conf
+FILES= ${SRCTOP}/etc/mail/mailer.conf
FILESDIR= /etc/mail
FILESMODE= 644
.endif
diff --git a/usr.sbin/makemap/Makefile b/usr.sbin/makemap/Makefile
index af5f742..2477060 100644
--- a/usr.sbin/makemap/Makefile
+++ b/usr.sbin/makemap/Makefile
@@ -1,7 +1,7 @@
# @(#)Makefile 8.4 (Berkeley) 6/10/97
# $FreeBSD$
-SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
+SENDMAIL_DIR=${SRCTOP}/contrib/sendmail
.PATH: ${SENDMAIL_DIR}/makemap
PROG= makemap
diff --git a/usr.sbin/mlxcontrol/Makefile b/usr.sbin/mlxcontrol/Makefile
index 038544b..5a425fd 100644
--- a/usr.sbin/mlxcontrol/Makefile
+++ b/usr.sbin/mlxcontrol/Makefile
@@ -4,7 +4,7 @@ PROG= mlxcontrol
MAN= mlxcontrol.8
SRCS= command.c config.c interface.c util.c
-CFLAGS+= -I${.CURDIR}/../../sys
+CFLAGS+= -I${SRCTOP}/sys
WARNS?= 2
diff --git a/usr.sbin/mount_smbfs/Makefile b/usr.sbin/mount_smbfs/Makefile
index c4c2d1c..64f4280 100644
--- a/usr.sbin/mount_smbfs/Makefile
+++ b/usr.sbin/mount_smbfs/Makefile
@@ -4,8 +4,8 @@ PROG= mount_smbfs
SRCS= mount_smbfs.c getmntopts.c
MAN= mount_smbfs.8
-MOUNTDIR= ${.CURDIR}/../../sbin/mount
-CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs
+MOUNTDIR= ${SRCTOP}/sbin/mount
+CONTRIBDIR= ${SRCTOP}/contrib/smbfs
CFLAGS+= -DSMBFS -I${MOUNTDIR} -I${CONTRIBDIR}/include
LIBADD= smb
diff --git a/usr.sbin/mountd/Makefile b/usr.sbin/mountd/Makefile
index ab32fa3..bc16512 100644
--- a/usr.sbin/mountd/Makefile
+++ b/usr.sbin/mountd/Makefile
@@ -5,7 +5,7 @@ PROG= mountd
SRCS= mountd.c getmntopts.c
MAN= exports.5 netgroup.5 mountd.8
-MOUNT= ${.CURDIR}/../../sbin/mount
+MOUNT= ${SRCTOP}/sbin/mount
CFLAGS+= -I${MOUNT}
WARNS?= 2
diff --git a/usr.sbin/mpsutil/Makefile b/usr.sbin/mpsutil/Makefile
index 8ee4ec5..704e33f 100644
--- a/usr.sbin/mpsutil/Makefile
+++ b/usr.sbin/mpsutil/Makefile
@@ -10,7 +10,7 @@ WARNS?= 3
LINKS= ${BINDIR}/mpsutil ${BINDIR}/mprutil
MLINKS= mpsutil.8 mprutil.8
-CFLAGS+= -I${.CURDIR}/../../sys -I. -DUSE_MPT_IOCTLS
+CFLAGS+= -I${SRCTOP}/sys -I. -DUSE_MPT_IOCTLS
# Avoid dirdep dependency on libutil
CFLAGS+= -I${SRCTOP}/lib/libutil
diff --git a/usr.sbin/ndiscvt/Makefile b/usr.sbin/ndiscvt/Makefile
index f0facf4..81e7f93 100644
--- a/usr.sbin/ndiscvt/Makefile
+++ b/usr.sbin/ndiscvt/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../sys/compat/ndis
+.PATH: ${SRCTOP}/sys/compat/ndis
PROG= ndiscvt
SRCS= ndiscvt.c
@@ -17,7 +17,7 @@ LIBADD= l
YFLAGS+=-v
-CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/../../sys
+CFLAGS+=-I. -I${.CURDIR} -I${SRCTOP}/sys
CLEANFILES= y.output
diff --git a/usr.sbin/ndp/Makefile b/usr.sbin/ndp/Makefile
index 552ac53..5f75176 100644
--- a/usr.sbin/ndp/Makefile
+++ b/usr.sbin/ndp/Makefile
@@ -13,13 +13,13 @@
# A PARTICULAR PURPOSE.
# $FreeBSD$
-.PATH: ${.CURDIR}/../../contrib/tcpdump
+.PATH: ${SRCTOP}/contrib/tcpdump
PROG= ndp
MAN= ndp.8
SRCS= ndp.c gmt2local.c
-CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/../../contrib/tcpdump
+CFLAGS+= -I. -I${.CURDIR} -I${SRCTOP}/contrib/tcpdump
CFLAGS+= -D_U_=""
WARNS?= 1
diff --git a/usr.sbin/nmtree/Makefile b/usr.sbin/nmtree/Makefile
index 03af6d6..09c0ecd 100644
--- a/usr.sbin/nmtree/Makefile
+++ b/usr.sbin/nmtree/Makefile
@@ -2,18 +2,18 @@
.include <src.opts.mk>
-.PATH: ${.CURDIR}/../../contrib/mtree
+.PATH: ${SRCTOP}/contrib/mtree
PROG= mtree
MAN= mtree.5 mtree.8
SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \
only.c spec.c specspec.c verify.c
-CFLAGS+= -I${.CURDIR}/../../contrib/mknod
-.PATH: ${.CURDIR}/../../contrib/mknod
+CFLAGS+= -I${SRCTOP}/contrib/mknod
+.PATH: ${SRCTOP}/contrib/mknod
SRCS+= pack_dev.c
-CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd
+CFLAGS+= -I${SRCTOP}/lib/libnetbsd
LIBADD= netbsd md util
LINKS= ${BINDIR}/mtree ${BINDIR}/nmtree
diff --git a/usr.sbin/pkg/Makefile b/usr.sbin/pkg/Makefile
index d149fd3..145523d 100644
--- a/usr.sbin/pkg/Makefile
+++ b/usr.sbin/pkg/Makefile
@@ -4,8 +4,8 @@ PROG= pkg
SRCS= pkg.c dns_utils.c config.c
MAN= pkg.7
-CFLAGS+=-I${.CURDIR}/../../contrib/libucl/include
-.PATH: ${.CURDIR}/../../contrib/libucl/include
+CFLAGS+=-I${SRCTOP}/contrib/libucl/include
+.PATH: ${SRCTOP}/contrib/libucl/include
LIBADD= archive fetch ucl sbuf crypto ssl
.include <bsd.prog.mk>
diff --git a/usr.sbin/pnpinfo/Makefile b/usr.sbin/pnpinfo/Makefile
index 164ef37..956811d 100644
--- a/usr.sbin/pnpinfo/Makefile
+++ b/usr.sbin/pnpinfo/Makefile
@@ -1,11 +1,11 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../contrib/pnpinfo
+.PATH: ${SRCTOP}/contrib/pnpinfo
PROG= pnpinfo
MAN= pnpinfo.8
-CFLAGS+= -I${.CURDIR}/../../sys
+CFLAGS+= -I${SRCTOP}/sys
.if ${MACHINE} == "pc98"
CFLAGS+= -DPC98
diff --git a/usr.sbin/praliases/Makefile b/usr.sbin/praliases/Makefile
index b0b3e2d..fbef365 100644
--- a/usr.sbin/praliases/Makefile
+++ b/usr.sbin/praliases/Makefile
@@ -1,7 +1,7 @@
# @(#)Makefile 8.2 (Berkeley) 9/21/96
# $FreeBSD$
-SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail
+SENDMAIL_DIR= ${SRCTOP}/contrib/sendmail
.PATH: ${SENDMAIL_DIR}/praliases
PROG= praliases
diff --git a/usr.sbin/praudit/Makefile b/usr.sbin/praudit/Makefile
index 6d85fb3..2ee2cbf 100644
--- a/usr.sbin/praudit/Makefile
+++ b/usr.sbin/praudit/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
#
-OPENBSMDIR=${.CURDIR}/../../contrib/openbsm
+OPENBSMDIR=${SRCTOP}/contrib/openbsm
.PATH: ${OPENBSMDIR}/bin/praudit
PROG= praudit
diff --git a/usr.sbin/pwd_mkdb/Makefile b/usr.sbin/pwd_mkdb/Makefile
index 7616629..f937cdd 100644
--- a/usr.sbin/pwd_mkdb/Makefile
+++ b/usr.sbin/pwd_mkdb/Makefile
@@ -1,12 +1,12 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
-.PATH: ${.CURDIR}/../../lib/libc/gen # for pw_scan.c
+.PATH: ${SRCTOP}/lib/libc/gen # for pw_scan.c
PROG= pwd_mkdb
MAN= pwd_mkdb.8
SRCS= pw_scan.c pwd_mkdb.c
-CFLAGS+= -I${.CURDIR}/../../lib/libc/gen # for pw_scan.h
+CFLAGS+= -I${SRCTOP}/lib/libc/gen # for pw_scan.h
.include <bsd.prog.mk>
diff --git a/usr.sbin/rip6query/Makefile b/usr.sbin/rip6query/Makefile
index fac9028..d33621d 100644
--- a/usr.sbin/rip6query/Makefile
+++ b/usr.sbin/rip6query/Makefile
@@ -4,6 +4,6 @@
PROG= rip6query
MAN= rip6query.8
-CFLAGS+= -I${.CURDIR}/../route6d
+CFLAGS+= -I${.CURDIR:H}/route6d
.include <bsd.prog.mk>
diff --git a/usr.sbin/rpcbind/tests/Makefile b/usr.sbin/rpcbind/tests/Makefile
index 4b0cf15..5152147 100644
--- a/usr.sbin/rpcbind/tests/Makefile
+++ b/usr.sbin/rpcbind/tests/Makefile
@@ -5,7 +5,7 @@
.PATH: ${.CURDIR}/..
ATF_TESTS_C= addrmerge_test
-CFLAGS+= -I${.CURDIR}/.. -Wno-cast-qual
+CFLAGS+= -I${.CURDIR:H} -Wno-cast-qual
SRCS.addrmerge_test= addrmerge_test.c util.c
.if ${MK_INET6_SUPPORT} != "no"
diff --git a/usr.sbin/rtadvctl/Makefile b/usr.sbin/rtadvctl/Makefile
index a66db84c4..a8dcad1 100644
--- a/usr.sbin/rtadvctl/Makefile
+++ b/usr.sbin/rtadvctl/Makefile
@@ -1,13 +1,13 @@
# $FreeBSD$
#
-.PATH: ${.CURDIR}/../rtadvd
+.PATH: ${.CURDIR:H}/rtadvd
PROG= rtadvctl
MAN= rtadvctl.8
SRCS= rtadvctl.c control.c control_client.c if.c timer_subr.c
-CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../rtadvd
+CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/rtadvd
WARNS?= 1
.include <bsd.prog.mk>
diff --git a/usr.sbin/sa/Makefile b/usr.sbin/sa/Makefile
index 314e341..0d118ce 100644
--- a/usr.sbin/sa/Makefile
+++ b/usr.sbin/sa/Makefile
@@ -2,7 +2,7 @@
.include <src.opts.mk>
-.PATH: ${.CURDIR}/../../usr.bin/lastcomm
+.PATH: ${SRCTOP}/usr.bin/lastcomm
PROG= sa
MAN= sa.8
diff --git a/usr.sbin/sendmail/Makefile b/usr.sbin/sendmail/Makefile
index 3307bfe..37129f6 100644
--- a/usr.sbin/sendmail/Makefile
+++ b/usr.sbin/sendmail/Makefile
@@ -4,14 +4,14 @@
.include <src.opts.mk>
PACKAGE=sendmail
-SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
+SENDMAIL_DIR=${SRCTOP}/contrib/sendmail
SMDIR= ${SENDMAIL_DIR}/src
.PATH: ${SMDIR}
BINDIR= ${LIBEXECDIR}/sendmail
PROG= sendmail
-MAN= mailq.1 newaliases.1 aliases.5 sendmail.8
+MAN= mailq.1 newaliases.1 aliases.5 sendmail.8
MLINKS+=sendmail.8 hoststat.8
MLINKS+=sendmail.8 purgestat.8
SRCS= alias.c arpadate.c bf.c collect.c conf.c control.c \
diff --git a/usr.sbin/tcpdump/tcpdump/Makefile b/usr.sbin/tcpdump/tcpdump/Makefile
index 6967a14..cbcab01 100644
--- a/usr.sbin/tcpdump/tcpdump/Makefile
+++ b/usr.sbin/tcpdump/tcpdump/Makefile
@@ -2,7 +2,7 @@
.include <src.opts.mk>
-TCPDUMP_DISTDIR?= ${.CURDIR}/../../../contrib/tcpdump
+TCPDUMP_DISTDIR?= ${SRCTOP}/contrib/tcpdump
.PATH: ${TCPDUMP_DISTDIR}
PROG= tcpdump
diff --git a/usr.sbin/timed/timedc/Makefile b/usr.sbin/timed/timedc/Makefile
index 89e303b..d836912 100644
--- a/usr.sbin/timed/timedc/Makefile
+++ b/usr.sbin/timed/timedc/Makefile
@@ -1,7 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
-.PATH: ${.CURDIR}/../timed
+.PATH: ${.CURDIR:H}/timed
PROG= timedc
MAN= timedc.8
OpenPOWER on IntegriCloud