3 # This file and its contents are supplied under the terms of the
4 # Common Development and Distribution License ("CDDL"), version 1.0.
5 # You may only use this file in accordance with the terms of version
8 # A full copy of the text of the CDDL should have accompanied this
9 # source. A copy of the CDDL is also available via the Internet at
10 # http://www.illumos.org/license/CDDL.
14 # Copyright 2014 Nexenta Systems, Inc. All rights reserved.
17 # Use distributed make (dmake) by default.
21 export CLOSED_IS_PRESENT
23 # Do this if you want to use dbx or gdb
24 # export SOURCEDEBUG=yes
27 echo "SRC not set. Run 'ws' or 'bldenv' first."
43 *) echo "Huh?" ; exit 1;;
46 ################################################################
49 test -f $SRC/tools
/proto
/root_i386-nd
/opt
/onbld
/bin
/genoffsets ||
50 (cd $SRC/tools
&& $make install)
51 (cd $SRC/common
/mapfiles
; $make install)
55 (cd $SRC/tools
&& $make clobber
)
56 (cd $SRC/common
/mapfiles
; $make clobber
)
59 ################################################################
64 if [ "$targ" = clobber
]
66 (cd $SRC/uts
&& $make -k clobber_h
)
67 (cd $SRC/head && $make clobber
)
70 if [ "$targ" = install ]
74 # Just the parts of "make sgs" we need, and
75 # skip them if they appear to be done.
76 # ... stuff under $SRC
77 test -f $SRC/uts
/common
/sys
/priv_names.h ||
78 (cd $SRC/uts
&& $make -k all_h
)
80 test -f $SRC/head
/rpcsvc
/nispasswd.h ||
81 (cd $SRC/head && $make -k install_h
)
83 # ... stuff under $ROOT (proto area)
84 test -d $ROOT/usr
/include
/sys ||
85 (cd $SRC && $make rootdirs
)
86 test -f $ROOT/usr
/include
/sys
/types.h ||
87 (cd $SRC/uts
&& $make -k install_h
)
88 test -f $ROOT/usr
/include
/rpcsvc
/daemon_utils.h ||
89 (cd $SRC/head && $make install_h
)
92 (cd $SRC/uts
/common
/sys
&& $make -k install_h
)
96 # Need some library headers too...
101 (cd $SRC/lib
/$lib && $make $targ)
105 ################################################################
109 lint
) targ
=modlintlib
;;
112 ( unset SOURCEDEBUG
;
113 (cd $SRC/uts
/$x/kgssapi
&& $make $targ) )
116 ################################################################
123 (cd $SRC/lib
/$lib && $make $1)
126 # For some reason, mech_krb5 does not build for debug.
127 # It also takes forever to lint. skip that.
128 if [ "$1" != "lint" ]; then
129 (cd $SRC/lib
/gss_mechs
/mech_krb5
&& unset SOURCEDEBUG
&& $make $1)
130 (cd $SRC/lib
/gss_mechs
/mech_spnego
&& $make $1)
135 ################################################################
139 (cd $SRC/cmd
/gss
&& $make $1)
144 ################################################################
145 # This builds $SRC/TAGS (and cscope.files) in a helpful order.
149 find uts
/common
/gssapi
-name '*.[ch]' -print |
sort
150 find ..
/..
/include
-name '*.h' -print |
sort
151 find lib
/gss_mechs
-name '*.[ch]' -print |
sort
152 find cmd
/gss
-name '*.[ch]' -print |
sort
153 ) > $SRC/cscope.files
156 exctags
-e --langmap=c
:+.ndl
-h ndl
-L - < cscope.files
160 ################################################################
161 # This creates a tarfile one can use to update a test machine.
164 git_rev
=`git rev-parse --short=8 HEAD`
167 usr/lib/gss/mech_krb5.so.1
168 usr/lib/$arch64/gss/mech_krb5.so.1
169 usr/lib/gss/mech_spnego.so.1
170 usr/lib/$arch64/gss/mech_spnego.so.1
172 usr/lib/$arch64/libgss.so.1
175 (cd $ROOT && tar cfj ..
/..
/gss-
${git_rev}.
tar.bz2
$files)
178 ################################################################
180 if [ "$1" = "" ]; then
181 set '?' # force usage
222 echo "Usage: $0 {build|lint|clean|clobber|tags|tar}";