make-smbsrv revision b819cea2f73f98c5662230cc9affc8cc84f77fcf
#
# 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
export SOURCEDEBUG=yes
[ -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 smbsrv headers to be safe
# test -f $ROOT/usr/include/smbsrv/wintypes.h ||
fi
# Need some library headers too...
libbsm \
libdevid \
libidmap \
libpam \
libsec \
libscf \
libshare \
libsmbfs \
libuutil \
do
done
}
################################################################
case $1 in
lint) targ=modlintlib ;;
*) targ=$1 ;;
esac
( unset SOURCEDEBUG ;
}
################################################################
# Note lib1 builds prerequisite libraries not delivered by the
# skip these on clean (but still nuke them for clobber)
libavl \
do
done
}
# lib2 builds stuff we include in the tar file,
# or that we don't mind rebuilding after clean.
do
done
(cd $SRC/lib/passwdutil && $make $1)
(cd $SRC/lib/pam_modules/smb && $make $1)
}
################################################################
case $1 in
# mount programs need fslib.o
;;
;;
esac
# Build the MDB modules, WITH the linktest
do
case $1 in
;;
$make -k $1 )
;;
esac
$make $1 KMDB_LINKTEST_ENABLE= )
$make $1 KMDB_LINKTEST_ENABLE= )
$make $1 KMDB_LINKTEST_ENABLE= )
(cd $SRC/cmd/mdb/$x/$a/libfksmbsrv &&
$make $1 KMDB_LINKTEST_ENABLE= )
# We build these libraries (to the proto area), so we need to
# build the mdb modules too so mdb will load them.
(cd $SRC/cmd/mdb/$x/$a/libcmdutils &&
$make $1 )
$make $1 )
done
# Deal with mode 0400 file annoyance...
if [ $1 = install ]; then
fi
}
################################################################
# 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="
"
(cd $ROOT && tar cfj ../../smbsrv.tar.bz2 $files)
}
################################################################
if [ "$1" = "" ]; then
set '?' # force usage
fi
set -x
for arg
do
set -e
;;
lint)
;;
# intentionally skip: lib1, hdrs, tools
;;
;;
tags)
;;
tar)
;;
*)
echo "Usage: $0 {install|lint|clean|clobber|tags|tar}";
exit 1;
;;
esac
done