From ceef0c312c45e7c90d77464504d7d03f844353a1 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Fri, 6 Apr 2007 02:13:30 +0000 Subject: [PATCH] Connect ZFS to the build. --- Makefile.inc1 | 14 +++++++++-- etc/mtree/BSD.root.dist | 2 ++ share/mk/bsd.own.mk | 7 +++++- sys/modules/Makefile | 4 +++ tools/build/mk/OptionalObsoleteFiles.inc | 31 ++++++++++++++++++++++++ tools/build/options/WITHOUT_ZFS | 2 ++ 6 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 tools/build/options/WITHOUT_ZFS diff --git a/Makefile.inc1 b/Makefile.inc1 index 411b56892aeb..42913f57f014 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -40,6 +40,9 @@ SUBDIR+=bin .if ${MK_GAMES} != "no" SUBDIR+=games .endif +.if ${MK_CDDL} != "no" +SUBDIR+=cddl +.endif SUBDIR+=gnu include .if ${MK_KERBEROS} != "no" SUBDIR+=kerberos5 @@ -430,6 +433,9 @@ build32: .for _t in obj includes cd ${.CURDIR}/include; ${LIB32WMAKE} ${_t} cd ${.CURDIR}/lib; ${LIB32WMAKE} ${_t} +.if ${MK_CDDL} != "no" + cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} ${_t} +.endif cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} ${_t} .if ${MK_CRYPT} != "no" cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} ${_t} @@ -1014,12 +1020,16 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \ lib/libradius lib/libsbuf lib/libtacplus lib/libutil \ ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ - ${_secure_lib_libssl} + ${_secure_lib_libssl} lib/libthr -_generic_libs= gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib +_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib lib/libopie__L lib/libtacplus__L: lib/libmd__L +.if ${MK_CDDL} != "no" +_cddl_lib= cddl/lib +.endif + .if ${MK_CRYPT} != "no" .if ${MK_OPENSSL} != "no" _secure_lib_libcrypto= secure/lib/libcrypto diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index 4557af72f8a4..d502f39ebe35 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -62,6 +62,8 @@ .. ssl .. + zfs + .. .. lib geom diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 04233001b66b..0b1e9c452240 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -352,7 +352,8 @@ WITH_IDEA= TCSH \ TOOLCHAIN \ USB \ - WPA_SUPPLICANT_EAPOL + WPA_SUPPLICANT_EAPOL \ + ZFS .if defined(WITH_${var}) && defined(WITHOUT_${var}) .error WITH_${var} and WITHOUT_${var} can't both be set. .endif @@ -403,6 +404,10 @@ MK_BIND_UTILS:= no MK_BIND_ETC:= no .endif +.if ${MK_CDDL} == "no" +MK_ZFS:= no +.endif + .if ${MK_CRYPT} == "no" MK_OPENSSL:= no MK_OPENSSH:= no diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 53daa7864b83..360d38b19172 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -302,6 +302,7 @@ SUBDIR= ${_3dfx} \ ${_xe} \ xfs \ xl \ + ${_zfs} \ zlib .if ${MACHINE_ARCH} != "powerpc" @@ -444,6 +445,9 @@ _rr232x= rr232x _s3= s3 _twa= twa _vesa= vesa +.if ${MK_ZFS} != "no" || defined(ALL_MODULES) +_zfs= zfs +.endif .elif ${MACHINE} == "pc98" _canbepm= canbepm _canbus= canbus diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 9776b06a00c9..2575f2d416de 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -326,6 +326,37 @@ OLD_FILES+=usr/share/man/man8/sdpd.8.gz # to be filled in #.endif +.if ${MK_CDDL} == no +OLD_LIBS+=lib/libavl.so.1 +OLD_LIBS+=lib/libnvpair.so.1 +OLD_LIBS+=lib/libumem.so.1 +OLD_LIBS+=lib/libuutil.so.1 +OLD_FILES+=usr/lib/libavl.a +OLD_FILES+=usr/lib/libavl.so +OLD_FILES+=usr/lib/libnvpair.a +OLD_FILES+=usr/lib/libnvpair.so +OLD_FILES+=usr/lib/libumem.a +OLD_FILES+=usr/lib/libumem.so +OLD_FILES+=usr/lib/libuutil.a +OLD_FILES+=usr/lib/libuutil.so +.endif + +.if ${MK_ZFS} == no +OLD_LIBS+=lib/libzfs.so.1 +OLD_LIBS+=lib/libzpool.so.1 +OLD_FILES+=sbin/zfs +OLD_FILES+=sbin/zpool +OLD_FILES+=usr/lib/libzfs.a +OLD_FILES+=usr/lib/libzfs.so +OLD_FILES+=usr/lib/libzpool.a +OLD_FILES+=usr/lib/libzpool.so +OLD_FILES+=usr/bin/ztest +OLD_FILES+=usr/sbin/zdb +OLD_FILES+=usr/share/man/man8/zdb.8.gz +OLD_FILES+=usr/share/man/man8/zfs.8.gz +OLD_FILES+=usr/share/man/man8/zpool.8.gz +.endif + #.if ${MK_CPP} == no # to be filled in #.endif diff --git a/tools/build/options/WITHOUT_ZFS b/tools/build/options/WITHOUT_ZFS new file mode 100644 index 000000000000..bd21b7889e77 --- /dev/null +++ b/tools/build/options/WITHOUT_ZFS @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build ZFS file system.