aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2017-03-04 11:30:04 +0000
committerEnji Cooper <ngie@FreeBSD.org>2017-03-04 11:30:04 +0000
commitacc37ca1c15f7cd8b5e5b0389cf6e6b98ea61447 (patch)
treecfebd598ad39cee0b43fbc6ccad2983ede628cde /cddl
parenta251f9dcf891805ae2101945d0d3082ec5a1768c (diff)
downloadsrc-acc37ca1c15f7cd8b5e5b0389cf6e6b98ea61447.tar.gz
src-acc37ca1c15f7cd8b5e5b0389cf6e6b98ea61447.zip
cddl: normalize paths using SRCTOP-relative paths or :H when possible
This simplifies make logic/output While here, remove bogus CFLAGS which look for headers in cddl/lib/libumem. There aren't any source files there (just Makefiles) MFC after: 1 month Sponsored by: Dell EMC Isilon
Notes
Notes: svn path=/head/; revision=314654
Diffstat (limited to 'cddl')
-rw-r--r--cddl/lib/drti/Makefile6
-rw-r--r--cddl/lib/libavl/Makefile6
-rw-r--r--cddl/lib/libctf/Makefile10
-rw-r--r--cddl/lib/libdtrace/Makefile40
-rw-r--r--cddl/lib/libnvpair/Makefile22
-rw-r--r--cddl/lib/libumem/Makefile4
-rw-r--r--cddl/lib/libuutil/Makefile14
-rw-r--r--cddl/lib/libzfs/Makefile37
-rw-r--r--cddl/lib/libzfs_core/Makefile39
-rw-r--r--cddl/lib/libzpool/Makefile45
-rw-r--r--cddl/sbin/zfs/Makefile30
-rw-r--r--cddl/sbin/zpool/Makefile38
-rw-r--r--cddl/usr.bin/ctfconvert/Makefile8
-rw-r--r--cddl/usr.bin/ctfdump/Makefile8
-rw-r--r--cddl/usr.bin/ctfmerge/Makefile8
-rw-r--r--cddl/usr.bin/zinject/Makefile27
-rw-r--r--cddl/usr.bin/zlook/Makefile19
-rw-r--r--cddl/usr.bin/zstreamdump/Makefile23
-rw-r--r--cddl/usr.bin/ztest/Makefile23
-rw-r--r--cddl/usr.sbin/dtrace/Makefile6
-rw-r--r--cddl/usr.sbin/lockstat/Makefile8
-rw-r--r--cddl/usr.sbin/plockstat/Makefile12
-rw-r--r--cddl/usr.sbin/zdb/Makefile29
-rw-r--r--cddl/usr.sbin/zhack/Makefile29
24 files changed, 235 insertions, 256 deletions
diff --git a/cddl/lib/drti/Makefile b/cddl/lib/drti/Makefile
index b62d2c22c91b..19cbd748d234 100644
--- a/cddl/lib/drti/Makefile
+++ b/cddl/lib/drti/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/common
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/common
SRCS= drti.c
FILES= ${SRCS:R:S/$/.o/g}
@@ -12,8 +12,8 @@ CLEANFILES= ${FILES}
# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY.
.undef LIBRARIES_ONLY
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
- -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \
+ -I${SRCTOP}/cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR}/head \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile
index 856d12c22082..5939a78c4e11 100644
--- a/cddl/lib/libavl/Makefile
+++ b/cddl/lib/libavl/Makefile
@@ -1,11 +1,11 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/avl
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/avl
LIB= avl
SRCS= avl.c
WARNS?= 3
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
.include <bsd.lib.mk>
diff --git a/cddl/lib/libctf/Makefile b/cddl/lib/libctf/Makefile
index e41ad3701941..ed7ebc5351de 100644
--- a/cddl/lib/libctf/Makefile
+++ b/cddl/lib/libctf/Makefile
@@ -1,8 +1,8 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/common/ctf
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libctf/common
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/ctf
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/common/ctf
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libctf/common
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/ctf
LIB= ctf
SRCS= ctf_create.c \
@@ -21,8 +21,8 @@ MAN= ctf.5
WARNS?= 2
CFLAGS+= -DCTF_OLD_VERSIONS
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
- -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \
+ -I${SRCTOP}/cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR}/head \
-I${OPENSOLARIS_USR_DISTDIR}/common/ctf \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \
diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile
index 17e1eb9bdf5c..d55c0d62a764 100644
--- a/cddl/lib/libdtrace/Makefile
+++ b/cddl/lib/libdtrace/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/common
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libgen/common
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/common
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libgen/common
LIB= dtrace
SRCS= dt_aggregate.c \
@@ -64,9 +64,9 @@ FILESMODE= ${NOBINMODE}
WARNS?= 1
CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \
- -I${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH} \
- -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
- -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+ -I${SRCTOP}/sys/cddl/dev/dtrace/${MACHINE_ARCH} \
+ -I${SRCTOP}/sys/cddl/compat/opensolaris \
+ -I${SRCTOP}/cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR}/head \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
@@ -76,33 +76,33 @@ CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \
.if ${MACHINE_CPUARCH} == "aarch64"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/aarch64
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/aarch64
-.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/aarch64
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/aarch64
+.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/aarch64
.elif ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/dev/dtrace/x86
+CFLAGS+= -I${SRCTOP}/sys/cddl/dev/dtrace/x86
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -DDIS_MEM
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/i386
-.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH}
-.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/x86
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/i386
+.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/${MACHINE_ARCH}
+.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/x86
.elif ${MACHINE_CPUARCH} == "arm"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/arm
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/arm
-.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/arm
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/arm
+.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/arm
.elif ${MACHINE_CPUARCH} == "mips"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/mips
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/mips
-.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/mips
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/mips
+.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/mips
.elif ${MACHINE_CPUARCH} == "powerpc"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/powerpc
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/powerpc
-.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/powerpc
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/powerpc
+.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/powerpc
.elif ${MACHINE_CPUARCH} == "riscv"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/riscv
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/riscv
-.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/riscv
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/riscv
+.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/riscv
.elif ${MACHINE_CPUARCH} == "sparc64"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/sparc
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/sparc
.else
# temporary hack
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel
diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile
index aef3f0b392d5..3321e274e6cd 100644
--- a/cddl/lib/libnvpair/Makefile
+++ b/cddl/lib/libnvpair/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/nvpair
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/nvpair
LIB= nvpair
@@ -13,18 +13,18 @@ SRCS= libnvpair.c \
opensolaris_nvpair_alloc_fixed.c
WARNS?= 1
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
# This library uses macros to define fprintf behavior for several object types
# The compiler will see the non-string literal arguments to the fprintf calls and
-# omit warnings for them. Quiesce these warnings in contrib code:
+# omit warnings for them. Quiesce these warnings in contrib code:
#
# cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format
# string is not a string literal (potentially insecure) [-Wformat-security]
diff --git a/cddl/lib/libumem/Makefile b/cddl/lib/libumem/Makefile
index 56005aa04bd8..39ed62f1cc4e 100644
--- a/cddl/lib/libumem/Makefile
+++ b/cddl/lib/libumem/Makefile
@@ -1,10 +1,10 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
+.PATH: ${SRCTOP}/cddl/compat/opensolaris/lib/libumem
LIB= umem
SRCS= umem.c
WARNS?= 3
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
.include <bsd.lib.mk>
diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile
index 72a7a30f06b9..a5d9807b7a82 100644
--- a/cddl/lib/libuutil/Makefile
+++ b/cddl/lib/libuutil/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/avl
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/avl
LIB= uutil
SRCS= avl.c \
@@ -17,10 +17,10 @@ SRCS= avl.c \
WARNS?= 1
CFLAGS+= -DNATIVE_BUILD
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
.include <bsd.lib.mk>
diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile
index 9af967437cde..a13c50281cd8 100644
--- a/cddl/lib/libzfs/Makefile
+++ b/cddl/lib/libzfs/Makefile
@@ -1,9 +1,9 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/compat/opensolaris/misc
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common
+.PATH: ${SRCTOP}/cddl/compat/opensolaris/misc
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
LIB= zfs
LIBADD= md pthread umem util uutil m avl bsdxml geom nvpair z zfs_core
@@ -39,20 +39,19 @@ SRCS+= libzfs_changelist.c \
WARNS?= 0
CSTD= c99
CFLAGS+= -DZFS_NO_ACL
-CFLAGS+= -I${.CURDIR}/../../../sbin/mount
-CFLAGS+= -I${.CURDIR}/../../../cddl/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common
+CFLAGS+= -I${SRCTOP}/sbin/mount
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
.include <bsd.lib.mk>
diff --git a/cddl/lib/libzfs_core/Makefile b/cddl/lib/libzfs_core/Makefile
index 12d06d92997e..0df1d0c8920b 100644
--- a/cddl/lib/libzfs_core/Makefile
+++ b/cddl/lib/libzfs_core/Makefile
@@ -1,10 +1,10 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/compat/opensolaris/misc
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common
+.PATH: ${SRCTOP}/cddl/compat/opensolaris/misc
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
LIB= zfs_core
LIBADD= nvpair
@@ -18,20 +18,19 @@ SRCS+= libzfs_compat.c
WARNS?= 0
CSTD= c99
CFLAGS+= -DZFS_NO_ACL
-CFLAGS+= -I${.CURDIR}/../../../sbin/mount
-CFLAGS+= -I${.CURDIR}/../../../cddl/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${SRCTOP}/sbin/mount
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
.include <bsd.lib.mk>
diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile
index b305315ae39a..c0c741f454e8 100644
--- a/cddl/lib/libzpool/Makefile
+++ b/cddl/lib/libzpool/Makefile
@@ -1,28 +1,28 @@
# $FreeBSD$
-.include "${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/Makefile.files"
+.include "${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/Makefile.files"
# ZFS_COMMON_SRCS
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
# ZFS_SHARED_SRCS
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
# KERNEL_SRCS
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
# LIST_SRCS
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/os
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/os
# ATOMIC_SRCS
-.if exists(${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}/opensolaris_atomic.S)
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}
+.if exists(${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}/opensolaris_atomic.S)
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}
ATOMIC_SRCS= opensolaris_atomic.S
.if ${MACHINE_ARCH} != "sparc64"
ACFLAGS+= -Wa,--noexecstack
.endif
.else
-.PATH: ${.CURDIR}/../../../sys/cddl/compat/opensolaris/kern
+.PATH: ${SRCTOP}/sys/cddl/compat/opensolaris/kern
ATOMIC_SRCS= opensolaris_atomic.c
.endif
# UNICODE_SRCS
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/unicode
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/unicode
LIB= zpool
@@ -37,24 +37,23 @@ SRCS= ${ZFS_COMMON_SRCS} ${ZFS_SHARED_SRCS} \
${UNICODE_SRCS}
WARNS?= 0
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head
-CFLAGS+= -I${.CURDIR}/../../lib/libumem
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
# XXX: pthread doesn't have mutex_owned() equivalent, so we need to look
# into libthr private structures. That's sooo evil, but it's only for
# ZFS debugging tools needs.
CFLAGS+= -DWANTS_MUTEX_OWNED
-CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/thread
-CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/sys
-CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include
+CFLAGS+= -I${SRCTOP}/lib/libpthread/thread
+CFLAGS+= -I${SRCTOP}/lib/libpthread/sys
+CFLAGS+= -I${SRCTOP}/lib/libthr/arch/${MACHINE_CPUARCH}/include
LIBADD= md pthread z nvpair avl umem
diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile
index 8e9ceb32efa5..e0d6faa8d873 100644
--- a/cddl/sbin/zfs/Makefile
+++ b/cddl/sbin/zfs/Makefile
@@ -1,26 +1,26 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/zfs
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zfs
PROG= zfs
MAN= zfs.8
SRCS= zfs_main.c zfs_iter.c
WARNS?= 0
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libumem/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libumem/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
LIBADD= jail nvpair uutil zfs_core zfs
diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile
index f900e0d00d1b..723bb754503a 100644
--- a/cddl/sbin/zpool/Makefile
+++ b/cddl/sbin/zpool/Makefile
@@ -1,8 +1,8 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/zpool
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common
-.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zpool
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/stat/common
+.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
PROG= zpool
MAN= zpool.8 zpool-features.7
@@ -10,22 +10,22 @@ SRCS= zpool_main.c zpool_vdev.c zpool_iter.c zpool_util.c zfs_comutil.c
SRCS+= timestamp.c
WARNS?= 0
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libumem/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libumem/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/cmd/stat/common
LIBADD= geom nvpair uutil zfs
diff --git a/cddl/usr.bin/ctfconvert/Makefile b/cddl/usr.bin/ctfconvert/Makefile
index b1dd8a231f81..ce4238145df2 100644
--- a/cddl/usr.bin/ctfconvert/Makefile
+++ b/cddl/usr.bin/ctfconvert/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/cvt
PROG= ctfconvert
SRCS= alist.c \
@@ -25,8 +25,8 @@ SRCS= alist.c \
traverse.c \
util.c
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
- -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \
+ -I${SRCTOP}/cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR} \
-I${OPENSOLARIS_SYS_DISTDIR} \
-I${OPENSOLARIS_USR_DISTDIR}/head \
diff --git a/cddl/usr.bin/ctfdump/Makefile b/cddl/usr.bin/ctfdump/Makefile
index 74adad254124..953acfd3abb8 100644
--- a/cddl/usr.bin/ctfdump/Makefile
+++ b/cddl/usr.bin/ctfdump/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/dump
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/dump
PROG= ctfdump
SRCS= dump.c \
@@ -12,8 +12,8 @@ CFLAGS+= -I${OPENSOLARIS_USR_DISTDIR} \
-I${OPENSOLARIS_SYS_DISTDIR} \
-I${OPENSOLARIS_USR_DISTDIR}/head \
-I${OPENSOLARIS_USR_DISTDIR}/cmd/mdb/tools/common \
- -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
- -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+ -I${SRCTOP}/sys/cddl/compat/opensolaris \
+ -I${SRCTOP}/cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common \
-I${OPENSOLARIS_SYS_DISTDIR}/uts/common
diff --git a/cddl/usr.bin/ctfmerge/Makefile b/cddl/usr.bin/ctfmerge/Makefile
index 86e8a0df78c1..c863ea0edf87 100644
--- a/cddl/usr.bin/ctfmerge/Makefile
+++ b/cddl/usr.bin/ctfmerge/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/cvt
PROG= ctfmerge
SRCS= alist.c \
@@ -24,8 +24,8 @@ SRCS= alist.c \
WARNS?= 1
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
- -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \
+ -I${SRCTOP}/cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR} \
-I${OPENSOLARIS_SYS_DISTDIR} \
-I${OPENSOLARIS_USR_DISTDIR}/head \
diff --git a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile
index 68ca78da54cf..1cc403fbbd1f 100644
--- a/cddl/usr.bin/zinject/Makefile
+++ b/cddl/usr.bin/zinject/Makefile
@@ -1,25 +1,24 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../contrib/opensolaris/cmd/zinject
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zinject
PROG= zinject
SRCS= zinject.c translate.c
MAN=
WARNS?= 0
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzfs/common
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzfs_core/common
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs/
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head
-CFLAGS+= -I${.CURDIR}/../../lib/libumem
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs/
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
LIBADD= geom m nvpair umem uutil zfs_core zfs zpool
diff --git a/cddl/usr.bin/zlook/Makefile b/cddl/usr.bin/zlook/Makefile
index eae2fd034537..e36be05e7b71 100644
--- a/cddl/usr.bin/zlook/Makefile
+++ b/cddl/usr.bin/zlook/Makefile
@@ -1,25 +1,12 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../contrib/opensolaris/cmd/zlook
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zlook
PROG= zlook
MAN=
WARNS?= 0
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-#CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
-#CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
-#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzfs/common
-#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common
-#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair
-#CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-#CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head
-#CFLAGS+= -I${.CURDIR}/../../lib/libumem
-#
-#DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \
-# ${LIBZFS} ${LIBZPOOL}
-#LDADD= -lavl -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/zstreamdump/Makefile b/cddl/usr.bin/zstreamdump/Makefile
index e6b7b90bd60c..d6b5e30972c8 100644
--- a/cddl/usr.bin/zstreamdump/Makefile
+++ b/cddl/usr.bin/zstreamdump/Makefile
@@ -1,22 +1,21 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../..//contrib/opensolaris/cmd/zstreamdump
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zstreamdump
PROG= zstreamdump
MAN= zstreamdump.1
WARNS?= 0
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head
-CFLAGS+= -I${.CURDIR}/../../lib/libumem
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
LIBADD= m nvpair umem zpool pthread z avl
diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile
index 1b3430b13fc7..81f120a13116 100644
--- a/cddl/usr.bin/ztest/Makefile
+++ b/cddl/usr.bin/ztest/Makefile
@@ -1,22 +1,21 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../..//contrib/opensolaris/cmd/ztest
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/ztest
PROG= ztest
MAN=
WARNS?= 0
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head
-CFLAGS+= -I${.CURDIR}/../../lib/libumem
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
LIBADD= geom m nvpair umem zpool pthread avl zfs_core zfs uutil
diff --git a/cddl/usr.sbin/dtrace/Makefile b/cddl/usr.sbin/dtrace/Makefile
index ec41c60cb17c..501b7c14861a 100644
--- a/cddl/usr.sbin/dtrace/Makefile
+++ b/cddl/usr.sbin/dtrace/Makefile
@@ -2,7 +2,7 @@
.include <src.opts.mk>
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/dtrace
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/dtrace
PROG= dtrace
SRCS= dtrace.c
@@ -10,8 +10,8 @@ BINDIR?= /usr/sbin
WARNS?= 1
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
- -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \
+ -I${SRCTOP}/cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR}/head \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libproc/common \
diff --git a/cddl/usr.sbin/lockstat/Makefile b/cddl/usr.sbin/lockstat/Makefile
index a4eb898e33de..3ffcc7049f35 100644
--- a/cddl/usr.sbin/lockstat/Makefile
+++ b/cddl/usr.sbin/lockstat/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/lockstat
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/lockstat
PROG= lockstat
SRCS= lockstat.c sym.c
@@ -8,14 +8,14 @@ BINDIR?= /usr/sbin
WARNS?= 1
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
- -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \
+ -I${SRCTOP}/cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR}/head \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libproc/common \
-I${OPENSOLARIS_SYS_DISTDIR}/uts/common \
-I${OPENSOLARIS_SYS_DISTDIR}/compat \
- -I${.CURDIR}/../../../sys
+ -I${SRCTOP}/sys
CFLAGS+= -DNEED_ERRLOC -g
diff --git a/cddl/usr.sbin/plockstat/Makefile b/cddl/usr.sbin/plockstat/Makefile
index fc10b5679890..cb263fb427a7 100644
--- a/cddl/usr.sbin/plockstat/Makefile
+++ b/cddl/usr.sbin/plockstat/Makefile
@@ -1,22 +1,22 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/plockstat
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/plockstat
PROG= plockstat
-SRCS= plockstat.c
+SRCS= plockstat.c
BINDIR?= /usr/sbin
WARNS?= 1
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
- -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \
+ -I${SRCTOP}/cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR}/head \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libproc/common \
-I${OPENSOLARIS_SYS_DISTDIR}/uts/common \
-I${OPENSOLARIS_SYS_DISTDIR}/compat \
- -I${.CURDIR}/../../../cddl/lib/libdtrace \
- -I${.CURDIR}/../../../sys
+ -I${SRCTOP}/cddl/lib/libdtrace \
+ -I${SRCTOP}/sys
LIBADD= dtrace proc
diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile
index 94f0412e8df6..84b64e45c6b2 100644
--- a/cddl/usr.sbin/zdb/Makefile
+++ b/cddl/usr.sbin/zdb/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/zdb
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zdb
PROG= zdb
MAN= zdb.8
@@ -9,20 +9,19 @@ SRCS= zdb.c zdb_il.c
WARNS?= 0
CSTD= c99
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
-CFLAGS+= -I${.CURDIR}/../../lib/libumem
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
LIBADD= nvpair umem uutil zfs zpool
diff --git a/cddl/usr.sbin/zhack/Makefile b/cddl/usr.sbin/zhack/Makefile
index 2973e5c11016..72641c1b8efb 100644
--- a/cddl/usr.sbin/zhack/Makefile
+++ b/cddl/usr.sbin/zhack/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/zhack
+.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zhack
PROG= zhack
MAN=
@@ -8,20 +8,19 @@ MAN=
WARNS?= 0
CSTD= c99
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
-CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
-CFLAGS+= -I${.CURDIR}/../../lib/libumem
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
LIBADD= nvpair zfs zpool