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)
This commit is contained in:
Ulrich Spörlein 2010-03-02 19:04:07 +00:00
parent 7729e3ba40
commit 4ef20db290
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204597
21 changed files with 43 additions and 75 deletions

View File

@ -7,4 +7,5 @@ IGNORE_PRAGMA= YES
CFLAGS+= -DNEED_SOLARIS_BOOLEAN
WARNS?= 6
CSTD?= gnu89

View File

@ -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 \

View File

@ -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

View File

@ -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 \

View File

@ -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 \

View File

@ -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

View File

@ -4,6 +4,7 @@
LIB= umem
SRCS= umem.c
WARNS?= 0
CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
.include <bsd.lib.mk>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -1,14 +1,12 @@
# $FreeBSD$
.include "../../Makefile.inc"
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/dtrace
PROG= dtrace
SRCS= dtrace.c
BINDIR?= /usr/sbin
SRCS= dtrace.c
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

View File

@ -1,14 +1,13 @@
# $FreeBSD$
.include "../../Makefile.inc"
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/lockstat
PROG= lockstat
NO_MAN=
SRCS= lockstat.c sym.c
BINDIR?= /usr/sbin
SRCS= lockstat.c sym.c
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>

View File

@ -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>