dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libshell / misc / buildksh93.sh
blob03e3cab091dd44d890252b3ad01cf0f275bacefa
1 #!/bin/ksh -p
2 # (note we use "/bin/ksh -p" for Linux/pdksh support in this script)
5 # CDDL HEADER START
7 # The contents of this file are subject to the terms of the
8 # Common Development and Distribution License (the "License").
9 # You may not use this file except in compliance with the License.
11 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12 # or http://www.opensolaris.org/os/licensing.
13 # See the License for the specific language governing permissions
14 # and limitations under the License.
16 # When distributing Covered Code, include this CDDL HEADER in each
17 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18 # If applicable, add the following below this CDDL HEADER, with the
19 # fields enclosed by brackets "[]" replaced with your own identifying
20 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # CDDL HEADER END
26 # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
30 # buildksh93.sh - ast-ksh standalone build script for the
31 # OpenSolaris ksh93-integration project
34 # ksh93t sources can be downloaded like this from the AT&T site:
35 # wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/~gsf/download/tgz/INIT.2010-03-09.tgz'
36 # wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/~gsf/download/tgz/ast-ksh.2010-03-09.tgz'
38 function fatal_error
40 print -u2 "${progname}: $*"
41 exit 1
44 set -o errexit
45 set -o xtrace
47 typeset progname="$(basename "${0}")"
48 typeset buildmode="$1"
50 if [[ "${buildmode}" == "" ]] ; then
51 fatal_error "buildmode required."
54 # Make sure we use the C locale during building to avoid any unintended
55 # side-effects
56 export LANG=C
57 export LC_ALL=$LANG LC_MONETARY=$LANG LC_NUMERIC=$LANG LC_MESSAGES=$LANG LC_COLLATE=$LANG LC_CTYPE=$LANG
58 export PATH=/usr/ccs/bin:/usr/bin:/bin:/opt/SUNWspro/bin
60 function print_solaris_builtin_header
62 # Make sure to use \\ instead of \ for continuations
63 cat <<ENDOFTEXT
65 * CDDL HEADER START
67 * The contents of this file are subject to the terms of the
68 * Common Development and Distribution License (the "License").
69 * You may not use this file except in compliance with the License.
71 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
72 * or http://www.opensolaris.org/os/licensing.
73 * See the License for the specific language governing permissions
74 * and limitations under the License.
76 * When distributing Covered Code, include this CDDL HEADER in each
77 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
78 * If applicable, add the following below this CDDL HEADER, with the
79 * fields enclosed by brackets "[]" replaced with your own identifying
80 * information: Portions Copyright [yyyy] [name of copyright owner]
82 * CDDL HEADER END
86 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
89 #ifndef _SOLARIS_KSH_CMDLIST_H
90 #define _SOLARIS_KSH_CMDLIST_H
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
97 * List builtins for Solaris.
98 * The list here is partially autogenerated and partially hand-picked
99 * based on compatibility with the native Solaris versions of these
100 * tools
104 * Commands which are 100% compatible with native Solaris versions (/bin is
105 * a softlink to ./usr/bin, ksh93 takes care about the lookup)
107 #define BINCMDLIST(f) \\
108 { "/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
109 #define USRBINCMDLIST(f) \\
110 { "/usr/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
111 #define SBINCMDLIST(f) \\
112 { "/sbin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
113 #define SUSRBINCMDLIST(f) \\
114 { "/usr/sbin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
115 #ifdef SHOPT_USR_GNU_BIN_BUILTINS
116 /* GNU coreutils compatible commands */
117 #define GNUCMDLIST(f) \\
118 { "/usr/gnu/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
119 #else
120 #define GNUCMDLIST(f)
121 #endif
123 * Make all ksh93 builtins accessible when /usr/ast/bin was added to
124 * /usr/ccs/bin:/usr/bin:/bin:/opt/SUNWspro/bin
126 #define ASTCMDLIST(f) \\
127 { "/usr/ast/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
129 /* undo ast_map.h #defines to avoid collision */
130 #undef basename
131 #undef dirname
132 #undef mktemp
134 /* Generated data, do not edit. */
135 ASTCMDLIST(basename)
136 GNUCMDLIST(basename)
137 ASTCMDLIST(cat)
138 BINCMDLIST(cat)
139 ASTCMDLIST(chgrp)
140 ASTCMDLIST(chmod)
141 ASTCMDLIST(chown)
142 BINCMDLIST(chown)
143 ASTCMDLIST(cksum)
144 BINCMDLIST(cksum)
145 GNUCMDLIST(cksum)
146 ASTCMDLIST(cmp)
147 BINCMDLIST(cmp)
148 ASTCMDLIST(comm)
149 BINCMDLIST(comm)
150 GNUCMDLIST(comm)
151 ASTCMDLIST(cp)
152 ASTCMDLIST(cut)
153 BINCMDLIST(cut)
154 GNUCMDLIST(cut)
155 ASTCMDLIST(date)
156 ASTCMDLIST(dirname)
157 BINCMDLIST(dirname)
158 GNUCMDLIST(dirname)
159 // ASTCMDLIST(egrep)
160 ASTCMDLIST(expr)
161 GNUCMDLIST(expr)
162 ASTCMDLIST(fds)
163 // ASTCMDLIST(fgrep)
164 ASTCMDLIST(fmt)
165 ASTCMDLIST(fold)
166 BINCMDLIST(fold)
167 GNUCMDLIST(fold)
168 // ASTCMDLIST(grep)
169 ASTCMDLIST(head)
170 BINCMDLIST(head)
171 ASTCMDLIST(id)
172 ASTCMDLIST(join)
173 BINCMDLIST(join)
174 GNUCMDLIST(join)
175 ASTCMDLIST(ln)
176 ASTCMDLIST(logname)
177 BINCMDLIST(logname)
178 GNUCMDLIST(logname)
179 ASTCMDLIST(md5sum)
180 ASTCMDLIST(mkdir)
181 BINCMDLIST(mkdir)
182 GNUCMDLIST(mkdir)
183 ASTCMDLIST(mkfifo)
184 BINCMDLIST(mkfifo)
185 GNUCMDLIST(mkfifo)
186 ASTCMDLIST(mktemp)
187 BINCMDLIST(mktemp)
188 GNUCMDLIST(mktemp)
189 ASTCMDLIST(mv)
190 ASTCMDLIST(paste)
191 BINCMDLIST(paste)
192 GNUCMDLIST(paste)
193 ASTCMDLIST(pathchk)
194 BINCMDLIST(pathchk)
195 GNUCMDLIST(pathchk)
196 // ASTCMDLIST(readlink)
197 ASTCMDLIST(rev)
198 BINCMDLIST(rev)
199 ASTCMDLIST(rm)
200 ASTCMDLIST(rmdir)
201 BINCMDLIST(rmdir)
202 GNUCMDLIST(rmdir)
203 GNUCMDLIST(sleep)
204 ASTCMDLIST(stty)
205 ASTCMDLIST(sum)
206 BINCMDLIST(sum)
207 ASTCMDLIST(sync)
208 BINCMDLIST(sync)
209 GNUCMDLIST(sync)
210 SBINCMDLIST(sync)
211 SUSRBINCMDLIST(sync)
212 ASTCMDLIST(tail)
213 BINCMDLIST(tail)
214 ASTCMDLIST(tee)
215 BINCMDLIST(tee)
216 GNUCMDLIST(tee)
217 ASTCMDLIST(tty)
218 BINCMDLIST(tty)
219 GNUCMDLIST(tty)
220 ASTCMDLIST(uname)
221 ASTCMDLIST(uniq)
222 BINCMDLIST(uniq)
223 GNUCMDLIST(uniq)
224 ASTCMDLIST(wc)
225 BINCMDLIST(wc)
226 GNUCMDLIST(wc)
227 // ASTCMDLIST(xgrep)
228 // BINCMDLIST(xgrep)
230 /* Mandatory for ksh93 test suite and AST scripts */
231 BINCMDLIST(getconf)
233 #ifdef __cplusplus
235 #endif
236 #endif /* !_SOLARIS_KSH_CMDLIST_H */
238 ENDOFTEXT
241 function build_shell
243 set -o errexit
244 set -o xtrace
246 # OS.cputype.XXbit.compiler
247 case "${buildmode}" in
248 *.linux.*)
249 # ksh93+AST config flags
250 bast_flags="-DSHOPT_CMDLIB_BLTIN=0 -DSH_CMDLIB_DIR=\\\"/usr/ast/bin\\\" -DSHOPT_SYSRC -D_map_libc=1"
252 # gcc flags
253 bgcc99="gcc -std=gnu99 "
254 bgcc_ccflags="${bon_flags} ${bast_flags} -g"
256 case "${buildmode}" in
257 # Linux i386
258 *.i386.32bit.gcc*) HOSTTYPE="linux.i386" CC="${bgcc99} -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}"
261 fatal_error "build_shell: Illegal Linux type/compiler build mode \"${buildmode}\"."
263 esac
265 *.solaris.*)
266 # Notes:
267 # 1. Do not remove/modify these flags or their order before either
268 # asking the project leads at
269 # http://www.opensolaris.org/os/project/ksh93-integration/
270 # These flags all have a purpose, even if they look
271 # weird/redundant/etc. at the first look.
273 # 2. We use -KPIC here since -Kpic is too small on 64bit sparc and
274 # on 32bit it's close to the barrier so we use it for both 32bit and
275 # 64bit to avoid later suprises when people update libast in the
276 # future
278 # 3. "-D_map_libc=1" is needed to force map.c to add a "_ast_" prefix to all
279 # AST symbol names which may otherwise collide with Solaris/Linux libc
281 # 4. "-DSHOPT_SYSRC" enables /etc/ksh.kshrc support (AST default is currently
282 # to enable it if /etc/ksh.kshrc or /etc/bash.bashrc are available on the
283 # build machine).
285 # 6. "-xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1" is used to force
286 # the compiler into C99 mode. Otherwise ksh93 will be much slower and lacks
287 # lots of arithmethic functions.
289 # 7. bon_flags are flags taken from the default OS/Net
290 # build system.
292 # 8. "-xpagesize_stack=64K is used on SPARC to enhance the performace
294 # 9. -DSHOPT_CMDLIB_BLTIN=0 -DSH_CMDLIB_DIR=\\\"/usr/ast/bin\\\" -DSHOPT_CMDLIB_HDR=\\\"/home/test001/ksh93/ast_ksh_20070322/solaris_cmdlist.h\\\"
295 # is used to bind all ksh93 builtins to a "virtual" directory
296 # called "/usr/ast/bin/" and to adjust the list of builtins
297 # enabled by default to those defined by PSARC 2006/550
299 solaris_builtin_header="${PWD}/tmp_solaris_builtin_header.h"
300 print_solaris_builtin_header >"${solaris_builtin_header}"
302 # OS/Net build flags
303 bon_flags=""
305 # ksh93+AST config flags
306 bast_flags="-DSHOPT_CMDLIB_BLTIN=0 -DSH_CMDLIB_DIR=\\\"/usr/ast/bin\\\" -DSHOPT_CMDLIB_HDR=\\\"${solaris_builtin_header}\\\" -DSHOPT_SYSRC -D_map_libc=1"
308 # Sun Studio flags
309 bsunc99="/opt/SUNWspro/bin/cc -xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1"
310 bsuncc_app_ccflags_sparc="-xpagesize_stack=64K" # use bsuncc_app_ccflags_sparc only for final executables
311 bsuncc_ccflags="${bon_flags} -KPIC -g -xs -Xa -z combreloc -xcsi -errtags=yes ${bast_flags}"
313 # gcc flags
314 bgcc99="/usr/sfw/bin/gcc -std=gnu99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1"
315 bgcc_warnflags="-Wall -Wextra -Wno-unknown-pragmas -Wno-missing-braces -Wno-sign-compare -Wno-parentheses -Wno-uninitialized -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs -Wno-char-subscripts -Wno-switch"
316 bgcc_ccflags="${bon_flags} ${bgcc_warnflags} ${bast_flags}"
318 case "${buildmode}" in
319 # for -m32/-m64 flags see usr/src/Makefile.master, makefile symbols *_XARCH/co.
320 *.i386.32bit.suncc*) HOSTTYPE="sol11.i386" CC="${bsunc99} -m32" cc_sharedlib="-G" CCFLAGS="${bsuncc_ccflags}" ;;
321 *.i386.64bit.suncc*) HOSTTYPE="sol11.i386" CC="${bsunc99} -m64 -KPIC" cc_sharedlib="-G" CCFLAGS="${bsuncc_ccflags}" ;;
322 *.sparc.32bit.suncc*) HOSTTYPE="sol11.sun4" CC="${bsunc99} -m32" cc_sharedlib="-G" CCFLAGS="${bsuncc_ccflags}" bsuncc_app_ccflags="${bsuncc_app_ccflags_sparc}" ;;
323 *.sparc.64bit.suncc*) HOSTTYPE="sol11.sun4" CC="${bsunc99} -m64 -KPIC" cc_sharedlib="-G" CCFLAGS="${bsuncc_ccflags}" bsuncc_app_ccflags="${bsuncc_app_ccflags_sparc}" ;;
325 *.i386.32bit.gcc*) HOSTTYPE="sol11.i386" CC="${bgcc99} -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
326 *.i386.64bit.gcc*) HOSTTYPE="sol11.i386" CC="${bgcc99} -m64 -mtune=opteron -Ui386 -U__i386 -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
327 *.sparc.32bit.gcc*) HOSTTYPE="sol11.sun4" CC="${bgcc99} -m32 -mcpu=v8 -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
328 *.sparc.64bit.gcc*) HOSTTYPE="sol11.sun4" CC="${bgcc99} -m64 -mcpu=v9 -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
329 *.s390.32bit.gcc*) HOSTTYPE="sol11.s390" CC="${bgcc99} -m32 -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
330 *.s390.64bit.gcc*) HOSTTYPE="sol11.s390" CC="${bgcc99} -m64 -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
333 fatal_error "build_shell: Illegal Solaris type/compiler build mode \"${buildmode}\"."
335 esac
338 fatal_error "Illegal OS build mode \"${buildmode}\"."
340 esac
342 # some prechecks
343 [[ -z "${CCFLAGS}" ]] && fatal_error "build_shell: CCFLAGS is empty."
344 [[ -z "${CC}" ]] && fatal_error "build_shell: CC is empty."
345 [[ -z "${HOSTTYPE}" ]] && fatal_error "build_shell: HOSTTYPE is empty."
346 [[ ! -f "bin/package" ]] && fatal_error "build_shell: bin/package missing."
347 [[ ! -x "bin/package" ]] && fatal_error "build_shell: bin/package not executable."
349 export CCFLAGS CC HOSTTYPE
351 # build ksh93
352 bin/package make CCFLAGS="${CCFLAGS}" CC="${CC}" HOSTTYPE="${HOSTTYPE}"
354 root="${PWD}/arch/${HOSTTYPE}"
355 [[ -d "$root" ]] || fatal_error "build_shell: directory ${root} not found."
356 log="${root}/lib/package/gen/make.out"
358 [[ -s $log ]] || fatal_error "build_shell: no make.out log found."
360 if [[ -f ${root}/lib/libast-g.a ]] then link_libast="ast-g" ; else link_libast="ast" ; fi
361 if [[ -f ${root}/lib/libdll-g.a ]] then link_libdll="dll-g" ; else link_libdll="dll" ; fi
362 if [[ -f ${root}/lib/libsum-g.a ]] then link_libsum="sum-g" ; else link_libsum="sum" ; fi
363 if [[ -f ${root}/lib/libcmd-g.a ]] then link_libcmd="cmd-g" ; else link_libcmd="cmd" ; fi
364 if [[ -f ${root}/lib/libshell-g.a ]] then link_libshell="shell-g" ; else link_libshell="shell" ; fi
366 if [[ "${buildmode}" != *.staticshell* ]] ; then
367 # libcmd causes some trouble since there is a squatter in solaris
368 # This has been fixed in Solaris 11/B48 but may require adjustments
369 # for older Solaris releases
370 for lib in libast libdll libsum libcmd libshell ; do
371 case "$lib" in
372 libshell)
373 base="src/cmd/ksh93/"
374 vers=1
375 link="-L${root}/lib/ -l${link_libcmd} -l${link_libsum} -l${link_libdll} -l${link_libast} -lm"
377 libdll)
378 base="src/lib/${lib}"
379 vers=1
380 link="-ldl"
382 libast)
383 base="src/lib/${lib}"
384 vers=1
385 link="-lm"
388 base="src/lib/${lib}"
389 vers=1
390 link="-L${root}/lib/ -l${link_libast} -lm"
392 esac
395 cd "${root}/${base}"
397 if [[ -f ${lib}-g.a ]] ; then lib_a="${lib}-g.a" ; else lib_a="${lib}.a" ; fi
399 if [[ "${buildmode}" == *solaris* ]] ; then
400 ${CC} ${cc_sharedlib} ${CCFLAGS} -Bdirect -Wl,-zallextract -Wl,-zmuldefs -o "${root}/lib/${lib}.so.${vers}" "${lib_a}" $link
401 else
402 ${CC} ${cc_sharedlib} ${CCFLAGS} -Wl,--whole-archive -Wl,-zmuldefs "${lib_a}" -Wl,--no-whole-archive -o "${root}/lib/${lib}.so.${vers}" $link
405 #rm ${lib}.a
406 mv "${lib_a}" "disabled_${lib_a}_"
408 cd "${root}/lib"
409 ln -sf "${lib}.so.${vers}" "${lib}.so"
411 done
414 base=src/cmd/ksh93
415 cd "${root}/${base}"
416 rm -f \
417 "${root}/lib/libshell.a" "${root}/lib/libshell-g.a" \
418 "${root}/lib/libsum.a" "${root}/lib/libsum-g.a" \
419 "${root}/lib/libdll.a" "${root}/lib/libdll-g.a" \
420 "${root}/lib/libast.a" "${root}/lib/libast-g.a"
422 if [[ "${buildmode}" == *solaris* ]] ; then
423 ${CC} ${CCFLAGS} ${bsuncc_app_ccflags} -L${root}/lib/ -Bdirect -o ksh pmain.o -lshell -Bstatic -l${link_libcmd} -Bdynamic -lsum -ldll -last -lm -lmd -lsecdb
424 else
425 ${CC} ${CCFLAGS} ${bsuncc_app_ccflags} -L${root}/lib/ -o ksh pmain.o -lshell -lcmd -lsum -ldll -last -lm
428 file ksh
429 file shcomp
431 export LD_LIBRARY_PATH="${root}/lib:${LD_LIBRARY_PATH}"
432 export LD_LIBRARY_PATH_32="${root}/lib:${LD_LIBRARY_PATH_32}"
433 export LD_LIBRARY_PATH_64="${root}/lib:${LD_LIBRARY_PATH_64}"
434 ldd ksh
439 function test_builtin_getconf
442 print "# testing getconf builtin..."
443 set +o errexit
444 export PATH=/bin:/usr/bin
445 for lang in ${TEST_LANG} ; do
447 printf "## testing LANG=%s\n" "${lang}"
448 export LC_ALL="${lang}" LANG="${lang}"
449 ${SHELL} -c '/usr/bin/getconf -a |
450 while read i ; do
451 t="${i%:*}" ; a="$(getconf "$t" 2>/dev/null)" ;
452 b="$(/usr/bin/getconf "$t" 2>/dev/null)" ; [ "$a" != "$b" ] && print "# |$t|:|$a| != |$b|" ;
453 done'
455 done
456 print "# testing getconf done."
460 function test_shell
462 set -o errexit
463 set -o xtrace
465 ulimit -s 65536 # need larger stack on 64bit SPARC to pass all tests
467 export SHELL="$(ls -1 $PWD/arch/*/src/cmd/ksh93/ksh)"
468 export LD_LIBRARY_PATH="$(ls -1ad $PWD/arch/*/lib):${LD_LIBRARY_PATH}"
469 export LD_LIBRARY_PATH_32="$(ls -1ad $PWD/arch/*/lib):${LD_LIBRARY_PATH_32}"
470 export LD_LIBRARY_PATH_64="$(ls -1ad $PWD/arch/*/lib):${LD_LIBRARY_PATH_64}"
471 printf "## SHELL is |%s|\n" "${SHELL}"
472 printf "## LD_LIBRARY_PATH is |%s|\n" "${LD_LIBRARY_PATH}"
474 [[ ! -f "${SHELL}" ]] && fatal_error "test_shell: |${SHELL}| is not a file."
475 [[ ! -x "${SHELL}" ]] && fatal_error "test_shell: |${SHELL}| is not executable."
477 [[ "${TEST_LANG}" == "" ]] && TEST_LANG="C zh_CN.GB18030 en_US.UTF-8"
479 case "${buildmode}" in
480 testshell.bcheck*)
481 for lang in ${TEST_LANG} ; do
483 export LC_ALL="${lang}" LANG="${lang}"
484 for i in ./src/cmd/ksh93/tests/*.sh ; do
485 bc_logfile="$(basename "$i").$$.bcheck"
486 rm -f "${bc_logfile}"
487 /opt/SUNWspro/bin/bcheck -q -access -o "${bc_logfile}" ${SHELL} ./src/cmd/ksh93/tests/shtests \
488 LD_LIBRARY_PATH_64="$LD_LIBRARY_PATH_64" \
489 LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
490 LD_LIBRARY_PATH_32="$LD_LIBRARY_PATH_32"\
491 LC_ALL="${lang}" LANG="${lang}" \
492 VMALLOC_OPTIONS=abort \
493 "$i"
494 cat "${bc_logfile}"
495 done
497 done
499 testshell.builtin.getconf)
500 test_builtin_getconf
502 testshell)
503 for lang in ${TEST_LANG} ; do
505 export LC_ALL="${lang}" LANG="${lang}"
506 for i in ./src/cmd/ksh93/tests/*.sh ; do
507 ${SHELL} ./src/cmd/ksh93/tests/shtests -a \
508 LD_LIBRARY_PATH_64="$LD_LIBRARY_PATH_64" \
509 LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
510 LD_LIBRARY_PATH_32="$LD_LIBRARY_PATH_32" \
511 LC_ALL="${lang}" LANG="${lang}" \
512 VMALLOC_OPTIONS=abort \
513 SHCOMP=$PWD/arch/*/bin/shcomp \
514 "$i"
515 done
517 done
518 test_builtin_getconf
520 esac
523 # main
524 case "${buildmode}" in
525 build.*) build_shell ;;
526 testshell*) test_shell ;;
527 *) fatal_error "Illegal build mode \"${buildmode}\"." ;;
528 esac
529 # EOF.