aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
authorUlrich Spörlein <uqs@FreeBSD.org>2010-03-02 19:04:07 +0000
committerUlrich Spörlein <uqs@FreeBSD.org>2010-03-02 19:04:07 +0000
commit4ef20db290841afbfce7fe484e2037e084e79238 (patch)
tree70c9d8907f70b1034bd6e7417000ab87703c1bd2 /cddl
parent7729e3ba4017a3af96cff64b68751cb9d72c79b8 (diff)
downloadsrc-4ef20db290841afbfce7fe484e2037e084e79238.tar.gz
src-4ef20db290841afbfce7fe484e2037e084e79238.zip
Remove manual .includes in cddl Makefiles
- Break the dependency on ../Makefile.inc for .PATH, and include ../Makefile.inc implicitly. This is required to ... - Set WARNS?=6 in top-level Makefile.inc - Remove now redundant WARNS settings, add WARNS?=0 where appropriate - Remove redundant SHLIB_MAJOR overrides - Use NO_MAN, not MK_MAN=no - Remove redundant inclusion of bsd.own.mk - Order Makefiles more according to style.Makefile(9) - Reduce diff of cddl Makefiles against each other No objection: pjd Approved by: ed (co-mentor)
Notes
Notes: svn path=/head/; revision=204597
Diffstat (limited to 'cddl')
-rw-r--r--cddl/Makefile.inc1
-rw-r--r--cddl/lib/drti/Makefile5
-rw-r--r--cddl/lib/libavl/Makefile1
-rw-r--r--cddl/lib/libctf/Makefile11
-rw-r--r--cddl/lib/libdtrace/Makefile10
-rw-r--r--cddl/lib/libnvpair/Makefile1
-rw-r--r--cddl/lib/libumem/Makefile1
-rw-r--r--cddl/lib/libuutil/Makefile1
-rw-r--r--cddl/lib/libzfs/Makefile1
-rw-r--r--cddl/lib/libzpool/Makefile1
-rw-r--r--cddl/sbin/zfs/Makefile1
-rw-r--r--cddl/sbin/zpool/Makefile1
-rw-r--r--cddl/usr.bin/ctfconvert/Makefile15
-rw-r--r--cddl/usr.bin/ctfdump/Makefile12
-rw-r--r--cddl/usr.bin/ctfmerge/Makefile16
-rw-r--r--cddl/usr.bin/sgsmsg/Makefile11
-rw-r--r--cddl/usr.bin/zinject/Makefile1
-rw-r--r--cddl/usr.bin/ztest/Makefile1
-rw-r--r--cddl/usr.sbin/dtrace/Makefile10
-rw-r--r--cddl/usr.sbin/lockstat/Makefile13
-rw-r--r--cddl/usr.sbin/zdb/Makefile4
21 files changed, 43 insertions, 75 deletions
diff --git a/cddl/Makefile.inc b/cddl/Makefile.inc
index 4161c27a2ad6..d3a491443884 100644
--- a/cddl/Makefile.inc
+++ b/cddl/Makefile.inc
@@ -7,4 +7,5 @@ IGNORE_PRAGMA= YES
CFLAGS+= -DNEED_SOLARIS_BOOLEAN
+WARNS?= 6
CSTD?= gnu89
diff --git a/cddl/lib/drti/Makefile b/cddl/lib/drti/Makefile
index 4be57a54b2c4..ffd161c89d2a 100644
--- a/cddl/lib/drti/Makefile
+++ b/cddl/lib/drti/Makefile
@@ -1,8 +1,6 @@
# $FreeBSD$
-.include "../../Makefile.inc"
-
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/common
SRCS= drti.c
FILES= ${SRCS:R:S/$/.o/g}
@@ -10,7 +8,6 @@ FILESOWN= ${LIBOWN}
FILESGRP= ${LIBGRP}
FILESMODE= ${LIBMODE}
FILESDIR= ${LIBDIR}/dtrace
-WARNS?= 6
CLEANFILES= ${FILES}
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile
index 8cbaff1eca82..f4db92f01291 100644
--- a/cddl/lib/libavl/Makefile
+++ b/cddl/lib/libavl/Makefile
@@ -4,6 +4,7 @@
LIB= avl
SRCS= avl.c
+WARNS?= 0
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
diff --git a/cddl/lib/libctf/Makefile b/cddl/lib/libctf/Makefile
index 6309ee499564..582911158b3c 100644
--- a/cddl/lib/libctf/Makefile
+++ b/cddl/lib/libctf/Makefile
@@ -1,10 +1,10 @@
# $FreeBSD$
-.include "../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/common/ctf
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libctf/common
+.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/ctf
LIB= ctf
-SHLIB_MAJOR= 2
-
SRCS= ctf_create.c \
ctf_decl.c \
ctf_error.c \
@@ -17,10 +17,7 @@ SRCS= ctf_create.c \
ctf_types.c \
ctf_util.c
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/common/ctf
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common
-.PATH: ${OPENSOLARIS_SYS_DISTDIR}/common/ctf
-
+WARNS?= 0
CFLAGS+= -DCTF_OLD_VERSIONS
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile
index 071d9504c0dd..7e500c71e73b 100644
--- a/cddl/lib/libdtrace/Makefile
+++ b/cddl/lib/libdtrace/Makefile
@@ -1,12 +1,9 @@
# $FreeBSD$
-.include "../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libgen/common
LIB= dtrace
-SHLIB_MAJOR= 2
-
-WARNS= 1
-
SRCS= dt_aggregate.c \
dt_as.c \
dt_buf.c \
@@ -51,8 +48,7 @@ DSRCS= errno.d \
signal.d \
unistd.d
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/lib/libgen/common
+WARNS?= 1
CFLAGS+= -I${.OBJDIR} \
-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile
index 7bf500193dc7..da0c7f3c2990 100644
--- a/cddl/lib/libnvpair/Makefile
+++ b/cddl/lib/libnvpair/Makefile
@@ -10,6 +10,7 @@ SRCS= libnvpair.c \
nvpair_alloc_fixed.c \
nvpair.c
+WARNS?= 0
CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
diff --git a/cddl/lib/libumem/Makefile b/cddl/lib/libumem/Makefile
index 6b6881e327a9..0ce73f8e5f21 100644
--- a/cddl/lib/libumem/Makefile
+++ b/cddl/lib/libumem/Makefile
@@ -4,6 +4,7 @@
LIB= umem
SRCS= umem.c
+WARNS?= 0
CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
.include <bsd.lib.mk>
diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile
index 309ffd0eb76f..7521747a4c04 100644
--- a/cddl/lib/libuutil/Makefile
+++ b/cddl/lib/libuutil/Makefile
@@ -15,6 +15,7 @@ SRCS= avl.c \
uu_pname.c \
uu_strtoint.c
+WARNS?= 0
CFLAGS+= -DNATIVE_BUILD
CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile
index 30c516bd9548..3023a1de43b4 100644
--- a/cddl/lib/libzfs/Makefile
+++ b/cddl/lib/libzfs/Makefile
@@ -32,6 +32,7 @@ SRCS+= zfs_deleg.c \
libzfs_sendrecv.c \
libzfs_status.c
+WARNS?= 0
CFLAGS+= -DZFS_NO_ACL
CFLAGS+= -I${.CURDIR}/../../../sbin/mount
CFLAGS+= -I${.CURDIR}/../../../cddl/lib/libumem
diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile
index fec99d92f1d8..045e13d71dbf 100644
--- a/cddl/lib/libzpool/Makefile
+++ b/cddl/lib/libzpool/Makefile
@@ -33,6 +33,7 @@ SRCS= ${ZFS_COMMON_SRCS} ${ZFS_SHARED_SRCS} \
${KERNEL_SRCS} ${LIST_SRCS} ${ATOMIC_SRCS} \
${UNICODE_SRCS}
+WARNS?= 0
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile
index 4a9274ef9fa3..591ef06be5a8 100644
--- a/cddl/sbin/zfs/Makefile
+++ b/cddl/sbin/zfs/Makefile
@@ -6,6 +6,7 @@ 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
diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile
index 4b24dfba3429..06fd238fabfa 100644
--- a/cddl/sbin/zpool/Makefile
+++ b/cddl/sbin/zpool/Makefile
@@ -7,6 +7,7 @@ PROG= zpool
MAN= zpool.8
SRCS= zpool_main.c zpool_vdev.c zpool_iter.c zpool_util.c zfs_comutil.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
diff --git a/cddl/usr.bin/ctfconvert/Makefile b/cddl/usr.bin/ctfconvert/Makefile
index aea32c73e04d..08be1f0ce326 100644
--- a/cddl/usr.bin/ctfconvert/Makefile
+++ b/cddl/usr.bin/ctfconvert/Makefile
@@ -1,13 +1,12 @@
# $FreeBSD$
-.include <bsd.own.mk>
-
-.include "../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt
DEBUG_FLAGS= -g
PROG= ctfconvert
-
+NO_MAN=
SRCS= alist.c \
ctf.c \
ctfconvert.c \
@@ -29,8 +28,6 @@ SRCS= alist.c \
traverse.c \
util.c
-WARNS?= 6
-
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR} \
@@ -43,10 +40,4 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD}
LDADD= -lctf -ldwarf -lelf -lz -lpthread
-.PATH: ${.CURDIR}
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt
-
-MK_MAN= no
-
.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/ctfdump/Makefile b/cddl/usr.bin/ctfdump/Makefile
index 700b070d0c40..9b713c21f76c 100644
--- a/cddl/usr.bin/ctfdump/Makefile
+++ b/cddl/usr.bin/ctfdump/Makefile
@@ -1,15 +1,14 @@
# $FreeBSD$
-.include "../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/dump
PROG= ctfdump
-
+NO_MAN=
SRCS= dump.c \
symbol.c \
utils.c
-WARNS?= 6
-
CFLAGS+= -I${OPENSOLARIS_USR_DISTDIR} \
-I${OPENSOLARIS_SYS_DISTDIR} \
-I${OPENSOLARIS_USR_DISTDIR}/head \
@@ -22,9 +21,4 @@ CFLAGS+= -I${OPENSOLARIS_USR_DISTDIR} \
DPADD= ${LIBPTHREAD} ${LIBELF} ${LIBZ}
LDADD= -lpthread -lelf -lz
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/tools/ctf/dump
-
-NO_MAN=
-
.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/ctfmerge/Makefile b/cddl/usr.bin/ctfmerge/Makefile
index 7c96d366e8bf..ef3b4bf097ee 100644
--- a/cddl/usr.bin/ctfmerge/Makefile
+++ b/cddl/usr.bin/ctfmerge/Makefile
@@ -1,13 +1,10 @@
# $FreeBSD$
-.include <bsd.own.mk>
-
-.include "../../Makefile.inc"
-
-WARNS= 1
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt
PROG= ctfmerge
-
+NO_MAN=
SRCS= alist.c \
barrier.c \
ctf.c \
@@ -26,7 +23,7 @@ SRCS= alist.c \
traverse.c \
util.c
-WARNS?= 6
+WARNS?= 1
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
@@ -40,9 +37,4 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD}
LDADD= -lctf -ldwarf -lelf -lz -lpthread
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt
-
-MK_MAN= no
-
.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/sgsmsg/Makefile b/cddl/usr.bin/sgsmsg/Makefile
index 541441481dda..8d1f70fceed4 100644
--- a/cddl/usr.bin/sgsmsg/Makefile
+++ b/cddl/usr.bin/sgsmsg/Makefile
@@ -1,20 +1,17 @@
# $FreeBSD$
-.include "../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/sgs/tools/common
+.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/avl
# This program is required as a bootstrap tool for 'make buildworld'
PROG= sgsmsg
-
+NO_MAN=
SRCS= avl.c sgsmsg.c string_table.c findprime.c
+WARNS?= 0
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR}/cmd/sgs/include \
-I${OPENSOLARIS_SYS_DISTDIR}/uts/common
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/cmd/sgs/tools/common
-.PATH: ${OPENSOLARIS_SYS_DISTDIR}/common/avl
-
-NO_MAN=
-
.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile
index 82505a875f65..dc6de451a401 100644
--- a/cddl/usr.bin/zinject/Makefile
+++ b/cddl/usr.bin/zinject/Makefile
@@ -6,6 +6,7 @@ PROG= zinject
SRCS= zinject.c translate.c
NO_MAN=
+WARNS?= 0
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile
index 67ade45ad021..8bb69b1658f3 100644
--- a/cddl/usr.bin/ztest/Makefile
+++ b/cddl/usr.bin/ztest/Makefile
@@ -5,6 +5,7 @@
PROG= ztest
NO_MAN=
+WARNS?= 0
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
diff --git a/cddl/usr.sbin/dtrace/Makefile b/cddl/usr.sbin/dtrace/Makefile
index 56e88153bdbc..b8c668bd3dc4 100644
--- a/cddl/usr.sbin/dtrace/Makefile
+++ b/cddl/usr.sbin/dtrace/Makefile
@@ -1,14 +1,12 @@
# $FreeBSD$
-.include "../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/dtrace
PROG= dtrace
-
-BINDIR?= /usr/sbin
-
SRCS= dtrace.c
+BINDIR?= /usr/sbin
-WARNS= 1
+WARNS?= 1
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
@@ -18,8 +16,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-I${OPENSOLARIS_SYS_DISTDIR}/uts/common \
-I${OPENSOLARIS_SYS_DISTDIR}/compat
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/cmd/dtrace
-
# Optional debugging stuff...
#CFLAGS+= -DNEED_ERRLOC
#YFLAGS+= -d
diff --git a/cddl/usr.sbin/lockstat/Makefile b/cddl/usr.sbin/lockstat/Makefile
index 4fbddef3fbf1..6cf7009324b7 100644
--- a/cddl/usr.sbin/lockstat/Makefile
+++ b/cddl/usr.sbin/lockstat/Makefile
@@ -1,14 +1,13 @@
# $FreeBSD$
-.include "../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/lockstat
PROG= lockstat
-
-BINDIR?= /usr/sbin
-
+NO_MAN=
SRCS= lockstat.c sym.c
+BINDIR?= /usr/sbin
-WARNS= 1
+WARNS?= 1
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
@@ -19,8 +18,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-I${OPENSOLARIS_SYS_DISTDIR}/compat \
-I${.CURDIR}/../../../sys
-.PATH: ${OPENSOLARIS_USR_DISTDIR}/cmd/lockstat
-
CFLAGS+= -DNEED_ERRLOC -g
#YFLAGS+= -d
@@ -28,6 +25,4 @@ CFLAGS+= -DNEED_ERRLOC -g
DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} ${LIBCTF} ${LIBELF} ${LIBZ} ${LIBRT}
LDADD= -lpthread -ldtrace -ly -ll -lproc -lctf -lelf -lz -lrt
-NO_MAN=
-
.include <bsd.prog.mk>
diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile
index 35ad2a141d2a..b98038ed819f 100644
--- a/cddl/usr.sbin/zdb/Makefile
+++ b/cddl/usr.sbin/zdb/Makefile
@@ -6,6 +6,9 @@ PROG= zdb
MAN= zdb.8
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
@@ -23,6 +26,5 @@ DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \
${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL}
LDADD= -lavl -lgeom -lm -lnvpair -lpthread -lumem -luutil -lz -lzfs -lzpool
-CSTD= c99
.include <bsd.prog.mk>