summaryrefslogtreecommitdiffstats
path: root/cddl/usr.sbin/zfsd
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-09-18 02:41:50 +0000
committerngie <ngie@FreeBSD.org>2016-09-18 02:41:50 +0000
commit36dc2806d90efe4f470877f9bcd92d4feb531c75 (patch)
treeb833a8abc7d2607e5793c95fc60310d1a2d0f549 /cddl/usr.sbin/zfsd
parent08c7abc2c3e5ce6eb038ebe2d878c1d3dedf0514 (diff)
downloadFreeBSD-src-36dc2806d90efe4f470877f9bcd92d4feb531c75.zip
FreeBSD-src-36dc2806d90efe4f470877f9bcd92d4feb531c75.tar.gz
MFC r305018,r305019,r305020:
r305018: Use SRCTOP instead of a homegrown definition for it (SRCDIR) r305019: Remove unnecessary variable (SRCDIR) replaced by SRCTOP in Makefile.common r305020: Remove redundant declarations and simplify ../ in pathing - TESTSBASE and LOCALBASE are already defined in bsd.tests.mk - TESTSDIR is automatically divined as ${TESTSBASE}${RELDIR:H} after r289158. - Replace SRCDIR with SRCTOP
Diffstat (limited to 'cddl/usr.sbin/zfsd')
-rw-r--r--cddl/usr.sbin/zfsd/Makefile1
-rw-r--r--cddl/usr.sbin/zfsd/Makefile.common28
-rw-r--r--cddl/usr.sbin/zfsd/tests/Makefile11
3 files changed, 16 insertions, 24 deletions
diff --git a/cddl/usr.sbin/zfsd/Makefile b/cddl/usr.sbin/zfsd/Makefile
index 4f1a0c8..436ae70 100644
--- a/cddl/usr.sbin/zfsd/Makefile
+++ b/cddl/usr.sbin/zfsd/Makefile
@@ -1,6 +1,5 @@
# $FreeBSD$
-SRCDIR=${.CURDIR}/../../..
.include "Makefile.common"
PROG_CXX= zfsd
diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common
index aec0441..3b1430c 100644
--- a/cddl/usr.sbin/zfsd/Makefile.common
+++ b/cddl/usr.sbin/zfsd/Makefile.common
@@ -15,20 +15,20 @@ WARNS?= 3
# Ignore warnings about Solaris specific pragmas.
IGNORE_PRAGMA= YES
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libzpool/common
-INCFLAGS+= -I${SRCDIR}/cddl/compat/opensolaris/include
-INCFLAGS+= -I${SRCDIR}/cddl/compat/opensolaris/lib/libumem
-INCFLAGS+= -I${SRCDIR}/sys/cddl/compat/opensolaris
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/head
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libuutil/common
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libumem/common
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libzfs_core/common
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libzfs/common
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libnvpair
-INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/common/zfs
-INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/uts/common
-INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/uts/common/sys
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+INCFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+INCFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+INCFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libumem/common
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS= -g -DNEED_SOLARIS_BOOLEAN ${INCFLAGS}
diff --git a/cddl/usr.sbin/zfsd/tests/Makefile b/cddl/usr.sbin/zfsd/tests/Makefile
index 8eab505..66fc814 100644
--- a/cddl/usr.sbin/zfsd/tests/Makefile
+++ b/cddl/usr.sbin/zfsd/tests/Makefile
@@ -1,10 +1,7 @@
# $FreeBSD$
-SRCDIR=${.CURDIR}/../../../..
.include "${.CURDIR}/../Makefile.common"
-.PATH: ${.CURDIR}/..
-
-TESTSDIR?= ${TESTSBASE}/cddl/usr.sbin/zfsd
+.PATH: ${.CURDIR:H}
PLAIN_TESTS_CXX= zfsd_unittest
SRCS.zfsd_unittest:= ${SRCS:Nzfsd_main.cc}
@@ -12,7 +9,7 @@ SRCS.zfsd_unittest+= libmocks.c zfsd_unittest.cc
SRCS=
# Use #include <zfsd/xxx.h> in test programs.
-INCFLAGS+= -I${.CURDIR}/../..
+INCFLAGS+= -I${.CURDIR:H:H}
.if defined(DESTDIR)
INCFLAGS+= -I${DESTDIR}/usr/include
@@ -27,7 +24,6 @@ LIBRARY_PATH=
.endif
# Googletest options
-LOCALBASE?= /usr/local
INCFLAGS+= -I${LOCALBASE}/include -D_THREAD_SAFE -pthread
LDFLAGS.zfsd_unittest+= -L${LOCALBASE}/lib -D_THREAD_SAFE -pthread
LDADD.zfsd_unittest+= ${LOCALBASE}/lib/libgtest.a
@@ -39,7 +35,4 @@ LDADD.zfsd_unittest+= ${LOCALBASE}/lib/libgmock.a ${LOCALBASE}/lib/libgmock_main
# https://groups.google.com/forum/#!msg/googletestframework/h8ixEPCFm0o/amwfu4xGJb0J
CFLAGS.zfsd_unittest+= -DGTEST_HAS_PTHREAD
-# Install the tests
-TESTSBASE?= /usr/tests
-
.include <bsd.test.mk>
OpenPOWER on IntegriCloud