make-smbsrv (8d94f651) | make-smbsrv (6f1fa39e) |
---|---|
1#!/bin/ksh 2# 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 6# 1.0 of the CDDL. 7# 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. 11# 12 13# | 1#!/bin/ksh 2# 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 6# 1.0 of the CDDL. 7# 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. 11# 12 13# |
14# Copyright 2019 Nexenta Systems, Inc. All rights reserved. | 14# Copyright 2020 Tintri by DDN, Inc. All rights reserved. |
15# 16 17# Use normal make (not dmake) by default. 18make=${MAKE:-make} 19 20CLOSED_IS_PRESENT=no 21export CLOSED_IS_PRESENT 22 --- 62 unchanged lines hidden (view full) --- 85 # ... stuff under $ROOT (proto area) 86 test -d $ROOT/usr/include/sys || 87 (cd $SRC && $make rootdirs) 88 test -f $ROOT/usr/include/sys/types.h || 89 (cd $SRC/uts && $make -k $targ) 90 test -f $ROOT/usr/include/rpcsvc/daemon_utils.h || 91 (cd $SRC/head && $make $targ) 92 | 15# 16 17# Use normal make (not dmake) by default. 18make=${MAKE:-make} 19 20CLOSED_IS_PRESENT=no 21export CLOSED_IS_PRESENT 22 --- 62 unchanged lines hidden (view full) --- 85 # ... stuff under $ROOT (proto area) 86 test -d $ROOT/usr/include/sys || 87 (cd $SRC && $make rootdirs) 88 test -f $ROOT/usr/include/sys/types.h || 89 (cd $SRC/uts && $make -k $targ) 90 test -f $ROOT/usr/include/rpcsvc/daemon_utils.h || 91 (cd $SRC/head && $make $targ) 92 |
93 # always update the smbsrv headers to be safe | 93 # always update the sys,smbsrv headers to be safe |
94 (cd $SRC/uts/common/gssapi && $make -k $targ) 95 (cd $SRC/uts/common/sys && $make -k $targ) 96 (cd $SRC/uts/common/smb && $make -k $targ) 97 (cd $SRC/uts/common/smbsrv && $make -k $targ) | 94 (cd $SRC/uts/common/gssapi && $make -k $targ) 95 (cd $SRC/uts/common/sys && $make -k $targ) 96 (cd $SRC/uts/common/smb && $make -k $targ) 97 (cd $SRC/uts/common/smbsrv && $make -k $targ) |
98 (cd $SRC/uts/common/c2 && $make -k $targ) |
|
98fi 99 100if [ "$targ" = lint ] 101then 102 targ=check 103 (cd $SRC/uts/common/smb && $make -k $targ) 104 (cd $SRC/uts/common/smbsrv && $make -k $targ) 105fi 106 107# Need some library headers too... 108for lib in \ | 99fi 100 101if [ "$targ" = lint ] 102then 103 targ=check 104 (cd $SRC/uts/common/smb && $make -k $targ) 105 (cd $SRC/uts/common/smbsrv && $make -k $targ) 106fi 107 108# Need some library headers too... 109for lib in \ |
110 libc \ 111 libnsl \ 112 libnvpair \ 113 libsocket \ 114 \ |
|
109 libads \ | 115 libads \ |
116 libbrand \ |
|
110 libbsm \ 111 libcmdutils \ 112 libcryptoutil \ 113 libdevid \ | 117 libbsm \ 118 libcmdutils \ 119 libcryptoutil \ 120 libdevid \ |
121 libdisasm \ |
|
114 libfakekernel \ 115 libgss \ 116 libidmap \ | 122 libfakekernel \ 123 libgss \ 124 libidmap \ |
125 libinetutil \ 126 libipsecutil \ |
|
117 libkrb5 \ 118 libmlrpc \ 119 libpam \ | 127 libkrb5 \ 128 libmlrpc \ 129 libpam \ |
130 libsaveargs \ |
|
120 libsec \ 121 libscf \ 122 libshare \ 123 libsmbfs \ 124 libsqlite \ 125 libuutil \ 126 libzfs_core \ 127 libzfs \ --- 8 unchanged lines hidden (view full) --- 136################################################################ 137 138do_kern() { 139 case $1 in 140 lint) targ=modlintlib ;; 141 *) targ=$1 ;; 142 esac 143 ( unset SOURCEDEBUG ; | 131 libsec \ 132 libscf \ 133 libshare \ 134 libsmbfs \ 135 libsqlite \ 136 libuutil \ 137 libzfs_core \ 138 libzfs \ --- 8 unchanged lines hidden (view full) --- 147################################################################ 148 149do_kern() { 150 case $1 in 151 lint) targ=modlintlib ;; 152 *) targ=$1 ;; 153 esac 154 ( unset SOURCEDEBUG ; |
144 (cd $SRC/uts/$x/nsmb && $make $targ) ; 145 (cd $SRC/uts/$x/smbfs && $make $targ) ; | |
146 (cd $SRC/uts/$x/smbsrv && $make $targ) ) 147} 148 149################################################################ | 155 (cd $SRC/uts/$x/smbsrv && $make $targ) ) 156} 157 158################################################################ |
159# 160# Build all libraries used by the other targets in here. 161# 162# Run this once (at least) in each new workspace where you 163# will run "make-smbsrv install", if you want to avoid linking 164# against the libraries from your build host. 165# 166do_deplibs() { |
|
150 | 167 |
151# Note lib1 builds prerequisite libraries not delivered by the 152# tar file we create below. To accelerate clean/install, we 153# skip these on clean (but still nuke them for clobber) | 168(cd $SRC/lib/ssp_ns && $make $1) 169(cd $SRC/lib/libc && $make $1) |
154 | 170 |
155do_lib1() { 156 | |
157for lib in \ | 171for lib in \ |
172 libm \ 173 libmd \ 174 libnsl \ 175 libnvpair \ 176 libsocket \ |
|
158 libavl \ 159 libgss \ | 177 libavl \ 178 libgss \ |
179 libgen \ |
|
160 libkrb5 \ | 180 libkrb5 \ |
181 libkstat \ |
|
161 libcmdutils \ | 182 libcmdutils \ |
183 libresolv2 \ 184 libldap5 \ 185 libsldap \ 186 libreparse \ 187 libpam \ 188 libuutil \ 189 libidmap \ 190 libinetutil \ 191 libdlpi \ 192 libbsm \ 193 libsec \ 194 libsecdb \ |
|
162 libsqlite \ | 195 libsqlite \ |
163 libuutil | 196 libumem \ 197 libuuid \ 198 libsaveargs \ 199 libproc \ 200 libscf \ 201 libcryptoutil \ 202 libmd5 \ 203 libzfs_core \ 204 libzfs \ 205 pkcs11/libpkcs11 |
164do | 206do |
165 (cd $SRC/lib/$lib && $make $1) | 207 # So we don't have to build EVERYTHING, set LDCHECKS= 208 # when building the dependent libraries. 209 (cd $SRC/lib/$lib && LDCHECKS='' $make $1) |
166done 167} 168 | 210done 211} 212 |
169# lib2 builds stuff we include in the tar file, 170# or that we don't mind rebuilding after clean. | 213################################################################ |
171 | 214 |
172do_lib2() { | 215do_libs() { |
173 174for lib in \ 175 libfakekernel \ 176 libads \ 177 libsmbfs \ 178 libmlrpc 179do 180 (cd $SRC/lib/$lib && $make $1) --- 41 unchanged lines hidden (view full) --- 222 for lib in libfksmbsrv libmlsvc libcmdutils libavl 223 do 224 (cd $SRC/cmd/mdb/$x/$a/$lib && $make $1 ) 225 226 done 227done 228} 229 | 216 217for lib in \ 218 libfakekernel \ 219 libads \ 220 libsmbfs \ 221 libmlrpc 222do 223 (cd $SRC/lib/$lib && $make $1) --- 41 unchanged lines hidden (view full) --- 265 for lib in libfksmbsrv libmlsvc libcmdutils libavl 266 do 267 (cd $SRC/cmd/mdb/$x/$a/$lib && $make $1 ) 268 269 done 270done 271} 272 |
230 | |
231################################################################ 232# This builds $SRC/TAGS (and cscope.files) in a helpful order. 233 234do_tags() { 235 (cd $SRC ; 236 find uts/common/sys -name '*.[ch]' -print |sort 237 find uts/common/net -name '*.[ch]' -print |sort 238 find uts/common/netinet -name '*.[ch]' -print |sort --- 39 unchanged lines hidden (view full) --- 278usr/lib/smbsrv/libmlsvc.so.1 279usr/lib/smbsrv/libsmb.so.1 280usr/lib/smbsrv/libsmbns.so.1 281usr/lib/smbsrv/nvlprint 282usr/lib/smbsrv/smbd 283usr/sbin/smbadm 284usr/sbin/smbstat 285" | 273################################################################ 274# This builds $SRC/TAGS (and cscope.files) in a helpful order. 275 276do_tags() { 277 (cd $SRC ; 278 find uts/common/sys -name '*.[ch]' -print |sort 279 find uts/common/net -name '*.[ch]' -print |sort 280 find uts/common/netinet -name '*.[ch]' -print |sort --- 39 unchanged lines hidden (view full) --- 320usr/lib/smbsrv/libmlsvc.so.1 321usr/lib/smbsrv/libsmb.so.1 322usr/lib/smbsrv/libsmbns.so.1 323usr/lib/smbsrv/nvlprint 324usr/lib/smbsrv/smbd 325usr/sbin/smbadm 326usr/sbin/smbstat 327" |
286 | |
287 (cd $ROOT && tar cfj ../../smbsrv-${git_rev}.tar.bz2 $files) 288} 289 290################################################################ 291 292if [ "$1" = "" ]; then 293 set '?' # force usage 294fi 295 296set -x 297 298for arg 299do 300 case "$arg" in 301 install) 302 build_tools 303 set -e 304 do_hdrs $arg 305 do_kern $arg | 328 (cd $ROOT && tar cfj ../../smbsrv-${git_rev}.tar.bz2 $files) 329} 330 331################################################################ 332 333if [ "$1" = "" ]; then 334 set '?' # force usage 335fi 336 337set -x 338 339for arg 340do 341 case "$arg" in 342 install) 343 build_tools 344 set -e 345 do_hdrs $arg 346 do_kern $arg |
306 do_lib1 $arg 307 do_lib2 $arg | 347 do_libs $arg |
308 do_cmds $arg 309 ;; 310 lint) 311 do_hdrs $arg 312 do_kern $arg | 348 do_cmds $arg 349 ;; 350 lint) 351 do_hdrs $arg 352 do_kern $arg |
313 do_lib1 $arg 314 do_lib2 $arg | 353 do_libs $arg |
315 do_cmds $arg 316 ;; 317 clean) 318 # intentionally skip: lib1, hdrs, tools 319 do_cmds $arg | 354 do_cmds $arg 355 ;; 356 clean) 357 # intentionally skip: lib1, hdrs, tools 358 do_cmds $arg |
320 do_lib2 $arg | 359 do_libs $arg |
321 do_kern $arg 322 ;; 323 clobber) 324 do_cmds $arg | 360 do_kern $arg 361 ;; 362 clobber) 363 do_cmds $arg |
325 do_lib2 $arg 326 do_lib1 $arg | 364 do_libs $arg |
327 do_kern $arg 328 do_hdrs $arg | 365 do_kern $arg 366 do_hdrs $arg |
367 do_deplibs $arg |
|
329 clobber_tools 330 ;; | 368 clobber_tools 369 ;; |
370 deplibs) 371 build_tools 372 set -e 373 do_hdrs install 374 do_deplibs install 375 ;; |
|
331 tags) 332 do_tags 333 ;; 334 tar) 335 do_tar 336 ;; 337 *) | 376 tags) 377 do_tags 378 ;; 379 tar) 380 do_tar 381 ;; 382 *) |
338 echo "Usage: $0 {install|lint|clean|clobber|tags|tar}"; | 383 echo "Usage: $0 {install|lint|clean|clobber|deplibs|tags|tar}"; |
339 exit 1; 340 ;; 341 esac 342done | 384 exit 1; 385 ;; 386 esac 387done |