aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2007-04-16 21:20:26 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2007-04-16 21:20:26 +0000
commit5941f0355c3eaaa03032e0d8511c9a35ba14cd15 (patch)
tree96b513e188e12d0119ea9cb2b351ff665a33a9f9 /cddl
parent2248f68064bc9f4967841ac1d9672b843e48b8a8 (diff)
downloadsrc-5941f0355c3eaaa03032e0d8511c9a35ba14cd15.tar.gz
src-5941f0355c3eaaa03032e0d8511c9a35ba14cd15.zip
Apply a set of style.Makefile(5) changes to src/cddl/ makefiles.
There are some insignificant non-style changes as well. Not fixed: makefiles use ${LIBTHR} that doesn't exist, thus breaking "make checkdpadd" and not tracking dependencies properly. Approved by: pjd
Notes
Notes: svn path=/head/; revision=168792
Diffstat (limited to 'cddl')
-rw-r--r--cddl/Makefile5
-rw-r--r--cddl/Makefile.inc2
-rw-r--r--cddl/lib/Makefile19
-rw-r--r--cddl/lib/Makefile.inc1
-rw-r--r--cddl/lib/libavl/Makefile9
-rw-r--r--cddl/lib/libnvpair/Makefile19
-rw-r--r--cddl/lib/libumem/Makefile7
-rw-r--r--cddl/lib/libuutil/Makefile38
-rw-r--r--cddl/lib/libzfs/Makefile73
-rw-r--r--cddl/lib/libzpool/Makefile63
-rw-r--r--cddl/sbin/Makefile7
-rw-r--r--cddl/sbin/zfs/Makefile30
-rw-r--r--cddl/sbin/zpool/Makefile32
-rw-r--r--cddl/usr.bin/Makefile6
-rw-r--r--cddl/usr.bin/ztest/Makefile24
-rw-r--r--cddl/usr.sbin/Makefile9
-rw-r--r--cddl/usr.sbin/zdb/Makefile23
17 files changed, 172 insertions, 195 deletions
diff --git a/cddl/Makefile b/cddl/Makefile
index 015e023d4727..801d9cffa015 100644
--- a/cddl/Makefile
+++ b/cddl/Makefile
@@ -1,8 +1,5 @@
# $FreeBSD$
-SUBDIR= lib
-SUBDIR+=sbin
-SUBDIR+=usr.bin
-SUBDIR+=usr.sbin
+SUBDIR= lib sbin usr.bin usr.sbin
.include <bsd.subdir.mk>
diff --git a/cddl/Makefile.inc b/cddl/Makefile.inc
index e503cbe5dcd9..bf5804e1978c 100644
--- a/cddl/Makefile.inc
+++ b/cddl/Makefile.inc
@@ -1,3 +1,3 @@
# $FreeBSD$
-CFLAGS+=-D_SOLARIS_C_SOURCE
+CFLAGS+= -D_SOLARIS_C_SOURCE
diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile
index 272e0dd610fb..4ee478016a1d 100644
--- a/cddl/lib/Makefile
+++ b/cddl/lib/Makefile
@@ -2,17 +2,18 @@
.include <bsd.own.mk>
-SUBDIR= libavl
-SUBDIR+=libnvpair
-SUBDIR+=libumem
-SUBDIR+=libuutil
-.if ${MK_CDDL} != "no"
-SUBDIR+=libzfs
-SUBDIR+=${_libzpool}
-.endif
+SUBDIR= libavl \
+ libnvpair \
+ libumem \
+ libuutil \
+ ${_libzfs} \
+ ${_libzpool}
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
+.if ${MK_ZFS} != "no"
+_libzfs= libzfs
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
_libzpool= libzpool
.endif
+.endif
.include <bsd.subdir.mk>
diff --git a/cddl/lib/Makefile.inc b/cddl/lib/Makefile.inc
index d61568e0094a..d97f1abf584c 100644
--- a/cddl/lib/Makefile.inc
+++ b/cddl/lib/Makefile.inc
@@ -1,5 +1,6 @@
# $FreeBSD$
SHLIBDIR?= /lib
+SHLIB_MAJOR?= 1
.include "../Makefile.inc"
diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile
index b7283bd62f22..2fd2262099dc 100644
--- a/cddl/lib/libavl/Makefile
+++ b/cddl/lib/libavl/Makefile
@@ -1,13 +1,10 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/avl
+.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/avl
LIB= avl
-SHLIB_MAJOR?=1
-
SRCS= avl.c
-
-CFLAGS+=-I${.CURDIR}/../../../sys/compat/opensolaris
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../../sys/compat/opensolaris
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
.include <bsd.lib.mk>
diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile
index d9e3ed717fd9..57ced0609663 100644
--- a/cddl/lib/libnvpair/Makefile
+++ b/cddl/lib/libnvpair/Makefile
@@ -1,18 +1,17 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../contrib/opensolaris/lib/libnvpair
-.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/nvpair
+.PATH: ${.CURDIR}/../../../contrib/opensolaris/lib/libnvpair
+.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/nvpair
LIB= nvpair
-SHLIB_MAJOR?=1
-SRCS= libnvpair.c
-SRCS+= nvpair_alloc_system.c
-SRCS+= nvpair_alloc_fixed.c
-SRCS+= nvpair.c
+SRCS= libnvpair.c \
+ nvpair_alloc_system.c \
+ nvpair_alloc_fixed.c \
+ nvpair.c
-CFLAGS+=-I${.CURDIR}/../../../sys/compat/opensolaris
-CFLAGS+=-I${.CURDIR}/../../../include
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../../sys/compat/opensolaris
+CFLAGS+= -I${.CURDIR}/../../../include # XXX
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
.include <bsd.lib.mk>
diff --git a/cddl/lib/libumem/Makefile b/cddl/lib/libumem/Makefile
index 03368a0e16fb..ba033011ec75 100644
--- a/cddl/lib/libumem/Makefile
+++ b/cddl/lib/libumem/Makefile
@@ -1,12 +1,9 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../compat/opensolaris/lib/libumem
+.PATH: ${.CURDIR}/../../../compat/opensolaris/lib/libumem
LIB= umem
-SHLIB_MAJOR?=1
-
SRCS= umem.c
-
-CFLAGS+=-I${.CURDIR}/../../../compat/opensolaris/lib/libumem
+CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris/lib/libumem
.include <bsd.lib.mk>
diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile
index fa3c9a1876fc..5fc4a261683e 100644
--- a/cddl/lib/libuutil/Makefile
+++ b/cddl/lib/libuutil/Makefile
@@ -1,27 +1,25 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../contrib/opensolaris/lib/libuutil/common
-.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/avl
+.PATH: ${.CURDIR}/../../../contrib/opensolaris/lib/libuutil/common
+.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/avl
LIB= uutil
-SHLIB_MAJOR?=1
+SRCS= avl.c \
+ uu_alloc.c \
+ uu_avl.c \
+ uu_dprintf.c \
+ uu_ident.c \
+ uu_list.c \
+ uu_misc.c \
+ uu_open.c \
+ uu_pname.c \
+ uu_strtoint.c
-SRCS= avl.c
-SRCS+= uu_alloc.c
-SRCS+= uu_avl.c
-SRCS+= uu_dprintf.c
-SRCS+= uu_ident.c
-SRCS+= uu_list.c
-SRCS+= uu_misc.c
-SRCS+= uu_open.c
-SRCS+= uu_pname.c
-SRCS+= uu_strtoint.c
-
-CFLAGS+=-DNATIVE_BUILD
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libuutil/common
-CFLAGS+=-I${.CURDIR}/../../../sys/compat/opensolaris
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
-CFLAGS+=-I${.CURDIR}/../../../compat/opensolaris/include
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/head
+CFLAGS+= -DNATIVE_BUILD
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libuutil/common
+CFLAGS+= -I${.CURDIR}/../../../sys/compat/opensolaris
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris/include
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/head
.include <bsd.lib.mk>
diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile
index 59e426ea6fea..9c2921bfe38a 100644
--- a/cddl/lib/libzfs/Makefile
+++ b/cddl/lib/libzfs/Makefile
@@ -1,49 +1,46 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../compat/opensolaris/misc
-.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/zfs
-.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
-.PATH: ${.CURDIR}/../../../contrib/opensolaris/lib/libzfs/common
+.PATH: ${.CURDIR}/../../../compat/opensolaris/misc
+.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/zfs
+.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
+.PATH: ${.CURDIR}/../../../contrib/opensolaris/lib/libzfs/common
LIB= zfs
-SHLIB_MAJOR?=1
-
DPADD= ${LIBUTIL}
LDADD= -lutil
-SRCS= mnttab.c
-SRCS+= mkdirp.c
-SRCS+= zmount.c
-SRCS+= fsshare.c
-SRCS+= zone.c
+SRCS= mnttab.c \
+ mkdirp.c \
+ zmount.c \
+ fsshare.c \
+ zone.c
-SRCS+= zfs_namecheck.c
-SRCS+= zfs_prop.c
-SRCS+= libzfs_dataset.c
-SRCS+= libzfs_util.c
-SRCS+= libzfs_graph.c
-SRCS+= libzfs_mount.c
-SRCS+= libzfs_pool.c
-SRCS+= libzfs_changelist.c
-SRCS+= libzfs_config.c
-SRCS+= libzfs_import.c
-SRCS+= libzfs_status.c
+SRCS+= zfs_namecheck.c \
+ zfs_prop.c \
+ libzfs_dataset.c \
+ libzfs_util.c \
+ libzfs_graph.c \
+ libzfs_mount.c \
+ libzfs_pool.c \
+ libzfs_changelist.c \
+ libzfs_config.c \
+ libzfs_import.c \
+ libzfs_status.c
-CFLAGS+=-DZFS_NO_ACL
-CFLAGS+=-I${.CURDIR}/../../../sbin/mount
-CFLAGS+=-I${.CURDIR}/../../../cddl/lib/libumem
-CFLAGS+=-I${.CURDIR}/../../../sys/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/contrib/opensolaris/common/zfs
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/sys
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/head
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libnvpair
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libuutil/common
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libzfs/common
-CFLAGS+=-I${.CURDIR}/../../../sys
+CFLAGS+= -DZFS_NO_ACL
+CFLAGS+= -I${.CURDIR}/../../../sbin/mount
+CFLAGS+= -I${.CURDIR}/../../../cddl/lib/libumem
+CFLAGS+= -I${.CURDIR}/../../../sys/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/contrib/opensolaris/common/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/head
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libuutil/common
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libzfs/common
.include <bsd.lib.mk>
diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile
index 38d347ec36d9..9bf818c20b88 100644
--- a/cddl/lib/libzpool/Makefile
+++ b/cddl/lib/libzpool/Makefile
@@ -3,42 +3,41 @@
.include "${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/Makefile.files"
# ZFS_COMMON_SRCS
-.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
+.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
# ZFS_SHARED_SRCS
-.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/zfs
+.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/zfs
# KERNEL_SRCS
-.PATH: ${.CURDIR}/../../../contrib/opensolaris/lib/libzpool/common
+.PATH: ${.CURDIR}/../../../contrib/opensolaris/lib/libzpool/common
# LIST_SRCS
-.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/os
+.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/os
# ATOMIC_SRCS
-.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/atomic/${MACHINE_ARCH}
-
-LIB= zpool
-SHLIB_MAJOR?=1
-
-ZFS_COMMON_SRCS= ${ZFS_COMMON_OBJS:C/.o$/.c/} vdev_file.c
-ZFS_SHARED_SRCS= ${ZFS_SHARED_OBJS:C/.o$/.c/}
-KERNEL_SRCS= kernel.c taskq.c util.c
-LIST_SRCS= list.c
-ATOMIC_SRCS= atomic.S
-
-SRCS= ${ZFS_COMMON_SRCS} ${ZFS_SHARED_SRCS} ${KERNEL_SRCS} ${LIST_SRCS} ${ATOMIC_SRCS}
-
-CFLAGS+=-I${.CURDIR}/../../../sys/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/contrib/opensolaris/uts/common/sys
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/common/zfs
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/head
-CFLAGS+=-I${.CURDIR}/../../../cddl/lib/libumem
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libnvpair
-CFLAGS+=-I${.CURDIR}/../../../sys
-
-DPADD= ${LIBTHR} ${LIBZ}
-LDADD= -lthr -lz
+.PATH: ${.CURDIR}/../../../sys/contrib/opensolaris/common/atomic/${MACHINE_ARCH}
+
+LIB= zpool
+
+ZFS_COMMON_SRCS= ${ZFS_COMMON_OBJS:C/.o$/.c/} vdev_file.c
+ZFS_SHARED_SRCS= ${ZFS_SHARED_OBJS:C/.o$/.c/}
+KERNEL_SRCS= kernel.c taskq.c util.c
+LIST_SRCS= list.c
+ATOMIC_SRCS= atomic.S
+
+SRCS= ${ZFS_COMMON_SRCS} ${ZFS_SHARED_SRCS} \
+ ${KERNEL_SRCS} ${LIST_SRCS} ${ATOMIC_SRCS}
+
+CFLAGS+= -I${.CURDIR}/../../../sys/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/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/common/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/head
+CFLAGS+= -I${.CURDIR}/../../../cddl/lib/libumem
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libnvpair
+
+DPADD= ${LIBTHR} ${LIBZ}
+LDADD= -lthr -lz
# atomic.S doesn't like profiling.
NO_PROFILE=
diff --git a/cddl/sbin/Makefile b/cddl/sbin/Makefile
index 802bbfe02b22..f74307c5fd6a 100644
--- a/cddl/sbin/Makefile
+++ b/cddl/sbin/Makefile
@@ -2,10 +2,11 @@
.include <bsd.own.mk>
-SUBDIR=
+SUBDIR= ${_zfs} ${_zpool}
+
.if ${MK_ZFS} != "no"
-SUBDIR+=zfs
-SUBDIR+=zpool
+_zfs= zfs
+_zpool= zpool
.endif
.include <bsd.subdir.mk>
diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile
index 7fab5bc460d1..54ddb5bc9623 100644
--- a/cddl/sbin/zfs/Makefile
+++ b/cddl/sbin/zfs/Makefile
@@ -1,25 +1,23 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../contrib/opensolaris/cmd/zfs
+.PATH: ${.CURDIR}/../../../contrib/opensolaris/cmd/zfs
PROG= zfs
MAN= zfs.8
-SRCS= zfs_main.c
-SRCS+= zfs_iter.c
+SRCS= zfs_main.c zfs_iter.c
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libzpool/common
-CFLAGS+=-I${.CURDIR}/../../../compat/opensolaris/include
-CFLAGS+=-I${.CURDIR}/../../../compat/opensolaris/lib/libumem
-CFLAGS+=-I${.CURDIR}/../../../sys/compat/opensolaris
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/head
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libuutil/common
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libzfs/common
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libumem/common
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libnvpair
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/sys
-CFLAGS+=-I${.CURDIR}/../../../sys
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris/include
+CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris/lib/libumem
+CFLAGS+= -I${.CURDIR}/../../../sys/compat/opensolaris
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/head
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libuutil/common
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libumem/common
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/sys
DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUUTIL} ${LIBZFS}
LDADD= -lgeom -lm -lnvpair -luutil -lzfs
diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile
index 7a0f2625a09f..24ce7b68482d 100644
--- a/cddl/sbin/zpool/Makefile
+++ b/cddl/sbin/zpool/Makefile
@@ -1,27 +1,23 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../contrib/opensolaris/cmd/zpool
+.PATH: ${.CURDIR}/../../../contrib/opensolaris/cmd/zpool
PROG= zpool
MAN= zpool.8
-SRCS= zpool_main.c
-SRCS+= zpool_vdev.c
-SRCS+= zpool_iter.c
-SRCS+= zpool_util.c
+SRCS= zpool_main.c zpool_vdev.c zpool_iter.c zpool_util.c
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libzpool/common
-CFLAGS+=-I${.CURDIR}/../../../compat/opensolaris/include
-CFLAGS+=-I${.CURDIR}/../../../compat/opensolaris/lib/libumem
-CFLAGS+=-I${.CURDIR}/../../../sys/compat/opensolaris
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/head
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libuutil/common
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libumem/common
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libzfs/common
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/lib/libnvpair
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/sys
-CFLAGS+=-I${.CURDIR}/../../../sys
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris/include
+CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris/lib/libumem
+CFLAGS+= -I${.CURDIR}/../../../sys/compat/opensolaris
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/head
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libuutil/common
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libumem/common
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/sys
DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUUTIL} ${LIBZFS}
LDADD= -lavl -lgeom -lm -lnvpair -luutil -lzfs
diff --git a/cddl/usr.bin/Makefile b/cddl/usr.bin/Makefile
index b703d19d4aa4..0a9035a022c9 100644
--- a/cddl/usr.bin/Makefile
+++ b/cddl/usr.bin/Makefile
@@ -2,12 +2,12 @@
.include <bsd.own.mk>
-.if ${MK_ZFS} != "no"
SUBDIR= ${_ztest}
-.endif
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
+.if ${MK_ZFS} != "no"
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
_ztest= ztest
.endif
+.endif
.include <bsd.subdir.mk>
diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile
index 99173d5faad0..b38426cec2c3 100644
--- a/cddl/usr.bin/ztest/Makefile
+++ b/cddl/usr.bin/ztest/Makefile
@@ -1,23 +1,21 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../contrib/opensolaris/cmd/ztest
+.PATH: ${.CURDIR}/../../../contrib/opensolaris/cmd/ztest
PROG= ztest
+NO_MAN=
-CFLAGS+=-I${.CURDIR}/../../../sys/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/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/sys
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/head
-CFLAGS+=-I${.CURDIR}/../../lib/libumem
-CFLAGS+=-I${.CURDIR}/../../../sys
+CFLAGS+= -I${.CURDIR}/../../../sys/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/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/head
+CFLAGS+= -I${.CURDIR}/../../lib/libumem
DPADD= ${LIBAVL} ${LIBM} ${LIBNVPAIR} ${LIBTHR} ${LIBUMEM} ${LIBZPOOL}
LDADD= -lavl -lm -lnvpair -lthr -lumem -lzpool
-NO_MAN=
-
.include <bsd.prog.mk>
diff --git a/cddl/usr.sbin/Makefile b/cddl/usr.sbin/Makefile
index bfb917171321..65756fbf0eea 100644
--- a/cddl/usr.sbin/Makefile
+++ b/cddl/usr.sbin/Makefile
@@ -2,13 +2,12 @@
.include <bsd.own.mk>
-SUBDIR=
-.if ${MK_ZFS} != "no"
-SUBDIR+=${_zdb}
-.endif
+SUBDIR= ${_zdb}
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
+.if ${MK_ZFS} != "no"
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
_zdb= zdb
.endif
+.endif
.include <bsd.subdir.mk>
diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile
index cd624dad13c6..fd7cdec5af22 100644
--- a/cddl/usr.sbin/zdb/Makefile
+++ b/cddl/usr.sbin/zdb/Makefile
@@ -1,21 +1,20 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/../../../contrib/opensolaris/cmd/zdb
+.PATH: ${.CURDIR}/../../../contrib/opensolaris/cmd/zdb
PROG= zdb
MAN= zdb.8
-SRCS+= zdb.c zdb_il.c
+SRCS= zdb.c zdb_il.c
-CFLAGS+=-I${.CURDIR}/../../../sys/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/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
-CFLAGS+=-I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/sys
-CFLAGS+=-I${.CURDIR}/../../../contrib/opensolaris/head
-CFLAGS+=-I${.CURDIR}/../../lib/libumem
-CFLAGS+=-I${.CURDIR}/../../../sys
+CFLAGS+= -I${.CURDIR}/../../../sys/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/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../../sys/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/head
+CFLAGS+= -I${.CURDIR}/../../lib/libumem
DPADD= ${LIBAVL} ${LIBM} ${LIBNVPAIR} ${LIBTHR} ${LIBUMEM} ${LIBZPOOL}
LDADD= -lavl -lm -lnvpair -lthr -lumem -lzpool