Skip to content

Commit

Permalink
Reduce diffs ZFS build infrastructure and src.libnames.mk
Browse files Browse the repository at this point in the history
This reverts commits 0cbe25c and
eb15e17.
  • Loading branch information
bsdjhb committed Feb 2, 2024
1 parent 3b7e3b5 commit e221444
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
2 changes: 1 addition & 1 deletion cddl/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SUBDIR.${MK_ZFS}+= \

SUBDIR.${MK_ZFS}.${MK_OPENSSL} = pam_zfs_key

SUBDIR_DEPEND_libavl= libnvpair libspl
SUBDIR_DEPEND_libavl= libspl
SUBDIR_DEPEND_libctf= libspl
SUBDIR_DEPEND_libdtrace= libctf
SUBDIR_DEPEND_libnvpair= libspl
Expand Down
3 changes: 1 addition & 2 deletions cddl/lib/libavl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

PACKAGE= zfs
LIB= avl
# The assert macro needs `int aok` (which is in nvpair)
LIBADD= nvpair spl
LIBADD= spl
SRCS= avl.c
WARNS?= 3
CFLAGS+= -DIN_BASE
Expand Down
6 changes: 0 additions & 6 deletions cddl/lib/libuutil/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,4 @@ CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h

LIBADD= avl spl

# The aok vairable used by assert() is defined in
# sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c so we need
# to link against nvpair in order to get size information for that file
# (at least for purecap)
LIBADD+= nvpair

.include <bsd.lib.mk>
20 changes: 8 additions & 12 deletions share/mk/src.libnames.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# The include file <src.libnames.mk> define library names suitable
# for INTERNALLIB and PRIVATELIB definition

.if !target(__<bsd.init.mk>__) && !target(__<Makefile.libcompat>__)
.if !target(__<bsd.init.mk>__)
.error src.libnames.mk cannot be included directly.
.endif

Expand Down Expand Up @@ -41,6 +41,7 @@ _PRIVATELIBS+= ${LOCAL_PRIVATELIBS}

_INTERNALLIBS= \
amu \
bsnmptools \
c_nossp_pic \
cron \
elftc \
Expand Down Expand Up @@ -83,10 +84,6 @@ _INTERNALLIBS= \
wpautils \
wpawps

.if ${MK_BSNMP} == "yes"
_INTERNALLIBS+= bsnmptools
.endif

# Let projects based on FreeBSD append to _INTERNALLIBS
# by maintaining their own LOCAL_INTERNALLIBS list.
_INTERNALLIBS+= ${LOCAL_INTERNALLIBS}
Expand Down Expand Up @@ -289,7 +286,7 @@ _DP_9p+= casper cap_pwd cap_grp
.if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING)
_DP_archive= z bz2 lzma bsdxml zstd
.endif
_DP_avl= nvpair spl
_DP_avl= spl
_DP_bsddialog= formw ncursesw tinfow
_DP_zstd= pthread
.if ${MK_BLACKLIST} != "no"
Expand Down Expand Up @@ -424,7 +421,7 @@ _DP_ulog= md
_DP_fifolog= z
_DP_ipf= kvm
_DP_tpool= spl
_DP_uutil= avl nvpair spl
_DP_uutil= avl spl
_DP_zfs= md pthread rt umem util uutil m avl bsdxml crypto geom nvpair \
z zfs_core zutil
_DP_zfsbootenv= zfs nvpair
Expand All @@ -449,8 +446,8 @@ _DP_mlx4= ibverbs pthread
_DP_mlx5= ibverbs pthread
_DP_rdmacm= ibverbs
_DP_osmcomp= pthread
_DP_opensm= pthread osmcomp
_DP_osmvendor= ibumad pthread osmcomp
_DP_opensm= pthread
_DP_osmvendor= ibumad pthread
.endif

# Define special cases
Expand Down Expand Up @@ -620,7 +617,6 @@ LIBFIFOLOG?= ${LIBFIFOLOGDIR}/libfifolog${PIE_SUFFIX}.a
LIBBSNMPTOOLSDIR= ${_LIB_OBJTOP}/usr.sbin/bsnmpd/tools/libbsnmptools
LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libbsnmptools${PIE_SUFFIX}.a

LIBBEDIR= ${_LIB_OBJTOP}/lib/libbe
LIBBE?= ${LIBBEDIR}/libbe${PIE_SUFFIX}.a

LIBPMCSTATDIR= ${_LIB_OBJTOP}/lib/libpmcstat
Expand Down Expand Up @@ -798,8 +794,8 @@ _BADLIBADD+= ${_l}
.endif
# Note that OBJTOP is not yet defined here but for the purpose of the check
# it is fine as it resolves to the SRC directory.
.if !defined(LIB${LIB:tu}DIR) || !exists(${SRCTOP}/${LIB${LIB:tu}DIR:S,^${_LIB_OBJTOP}/,,})
.error ${.CURDIR}: Missing or incorrect value for LIB${LIB:tu}DIR in ${_this:T}: ${LIB${LIB:tu}DIR:S,^${_LIB_OBJTOP}/,,}
.if !defined(LIB${LIB:tu}DIR) || !exists(${SRCTOP}/${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,})
.error ${.CURDIR}: Missing or incorrect value for LIB${LIB:tu}DIR in ${_this:T}: ${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,}
.endif
.if ${_INTERNALLIBS:M${LIB}} != "" && !defined(LIB${LIB:tu})
.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIB${LIB:tu}DIR}/lib${LIB}.a
Expand Down

0 comments on commit e221444

Please sign in to comment.