make-idmap revision b3700b074e637f8c6991b70754c88a2cfffb246b
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson# This file and its contents are supplied under the terms of the
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson# Common Development and Distribution License ("CDDL"), version 1.0.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson# You may only use this file in accordance with the terms of version
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson# 1.0 of the CDDL.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson# A full copy of the text of the CDDL should have accompanied this
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson# source. A copy of the CDDL is also available via the Internet at
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson# Copyright 2014 Nexenta Systems, Inc. All rights reserved.
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson# Use distributed make (dmake) by default.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson# Do this if you want to use dbx or gdb
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson# export SOURCEDEBUG=yes
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson echo "SRC not set. Run 'ws' or 'bldenv' first."
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson################################################################
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson test -f $SRC/tools/proto/root_i386-nd/opt/onbld/bin/genoffsets ||
8cccaeaee13993c49009d3915806c1d0bd03743bAndreas Gustafsson################################################################
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson # Just the parts of "make sgs" we need, and
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson test -f $SRC/uts/common/sys/priv_names.h ||
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson test -f $ROOT/usr/include/rpcsvc/daemon_utils.h ||
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson # system and smbsrv headers (we need to build libsmb)
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson (cd $SRC/uts/common/sys && $make -k install_h)
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson (cd $SRC/uts/common/smb && $make -k install_h)
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson (cd $SRC/uts/common/smbsrv && $make -k install_h)
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson# Need some library headers too...
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson################################################################
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson################################################################
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson# need libsmb for cmd/idmap/idmapd (and libsmbfs for libsmb)
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson################################################################
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson################################################################
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson# This builds $SRC/TAGS (and cscope.files) in a helpful order.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson find uts/common/sys -name '*.[ch]' -print |sort
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson find uts/common/net -name '*.[ch]' -print |sort
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson find uts/common/netinet -name '*.[ch]' -print |sort
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson find uts/common/rpcsvc -name '*.[ch]' -print |sort
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson find uts/common/idmap -name '*.[ch]' -print |sort
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson find lib/libidmap -name '*.[ch]' -print |sort
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson find lib/libadutils -name '*.[ch]' -print |sort
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson find lib/libldap5 -name '*.[ch]' -print |sort
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson find cmd/idmap -name '*.[ch]' -print |sort
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson exctags -e --langmap=c:+.ndl -h ndl -L - < cscope.files
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson################################################################
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson# This creates a tarfile one can use to update a test machine.
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson (cd $ROOT && tar cfj ../../idmap-${git_rev}.tar.bz2 $files)
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson################################################################
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson echo "Usage: $0 {build|lint|clean|clobber|tags|tar}";