aboutsummaryrefslogtreecommitdiff
path: root/cddl/lib
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/lib
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/lib')
-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
10 files changed, 110 insertions, 113 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