#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
#
#
# Copyright 2014 Nexenta Systems, Inc. All rights reserved.
#
# Use distributed make (dmake) by default.
export CLOSED_IS_PRESENT
[ -n "$SRC" ] || {
echo "SRC not set. Run 'ws' or 'bldenv' first."
exit 1
}
i386)
x=intel
mdb_arch="ia32 amd64"
;;
x=sparc
;;
*) echo "Huh?" ; exit 1;;
esac
################################################################
test -f $SRC/tools/proto/root_i386-nd/opt/onbld/bin/genoffsets ||
}
}
################################################################
targ=$1
then
fi
then
# Just the parts of "make sgs" we need, and
# skip them if they appear to be done.
# ... stuff under $SRC
test -f $SRC/uts/common/sys/priv_names.h ||
test -f $SRC/head/rpcsvc/nispasswd.h ||
# ... stuff under $ROOT (proto area)
test -f $ROOT/usr/include/rpcsvc/daemon_utils.h ||
# always update the sys headers to be safe
fi
# Need some library headers too...
libbsm \
libdevid \
libidmap \
libpam \
libsec \
libscf \
libshare \
libuutil \
libzpool \
libzfs \
do
done
# Should fix the Makefile here so all_h or install_h works.
}
################################################################
case $1 in
lint) targ=modlintlib ;;
*) targ=$1 ;;
esac
}
################################################################
#
# Build all libraries used by the other targets in here.
#
# Run this once (at least) in each new workspace where you
# will run "make-zfs install", if you want to avoid linking
# against the libraries from your build host.
#
# install all the lib headers
fi
# Wow, building libc takes a while. Really want that?
libc \
libavl \
libsec \
libuutil \
libbrand \
libdladm \
libdlpi \
libumem \
libidmap \
libdevid \
do
done
}
################################################################
libavl \
libuutil \
libzpool \
libzfs \
do
done
}
################################################################
isaexec \
fstyp \
zdb \
zfs \
zhack \
zinject \
zpool \
ztest \
do
done
case $1 in
# mount programs need fslib.o
# Build just the ZFS devfsadm module
;;
;;
esac
# Build the MDB modules, WITH the linktest
do
case $1 in
;;
$make -k $1 )
;;
esac
$make $1 KMDB_LINKTEST_ENABLE= )
$make $1 )
done
}
################################################################
;;
lint)
(cd $SRC/man/man1m && make zdb.1m.check zfs.1m.check zpool.1m.check)
(cd $SRC/man/man5 && make zpool-features.5.check)
;;
*)
;;
esac
}
################################################################
# This builds $SRC/TAGS (and cscope.files) in a helpful order.
(cd $SRC ;
) > $SRC/cscope.files
(cd $SRC ;
exctags -e --langmap=c:+.ndl -h ndl -L - < cscope.files
cscope -b )
}
################################################################
# This creates a tarfile one can use to update a test machine.
files="
lib/$arch64/libzfs_core.so.1
"
}
################################################################
if [ "$1" = "" ]; then
set '?' # force usage
fi
set -x
for arg
do
set -e
;;
lint)
;;
;;
;;
set -e
;;
tags)
;;
tar)
;;
*)
echo "Usage: $0 {install|lint|clean|clobber|deplibs|tags|tar}";
exit 1;
;;
esac
done