#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
#
#
# buildksh93.readme
#
* Intro:
"buildksh93.sh" is a small build script used to build the AT&T "ast-ksh"
and "ast-open" packages using its native (nmake-based) build system
which is needed to build the iffe-generated (header) files (each time
for { 32bit SPARC, 64bit SPARC, 32bit i386, 64bit AMD64, 32bit S390,
64bit S390x }) which are moved later to their matching OS/Net build
directories.
THIS SCRIPT IS NOT INTENDED FOR NORMAL USAGE.
* Note that buildksh93.sh modifies the build behaviour of the AST build
system, including enforcing C99/XPG6 semantics (which is MANDATORY!!)
and feeding additional libraries (like libnsl, libsocket, librt etc.)
to the feature look system (called "iffe" (="if feature exists")) to
ensure all features needed for the Solaris version of ksh93 are
properly found.
* Example usage of the script (more information can be found in the
script itself):
## Download AT&T ksh93 sources
$ wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www2.research.att.com/~gsf/download/tgz/INIT.2011-02-08.tgz'
$ wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www2.research.att.com/~gsf/download/tgz/ast-ksh.2011-02-08.tgz'
$ wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www2.research.att.com/~gsf/download/tgz/ast-open.2011-02-08.tgz'
## Unpack the sources (32bit SPARC):
$ mkdir build_sparc_32bit
$ cd build_sparc_32bit
$ gunzip -c <'../INIT.2011-02-08.tgz' | tar -xf -
$ gunzip -c <'../ast-ksh.2011-02-08.tgz' | tar -xf -
## Build ast-ksh for 32bit SPARC
# (build other build flags are:
# - 'build.debug.solaris.sparc.32bit.suncc' - 32bit SPARC
# - 'build.debug.solaris.sparc.64bit.suncc' - 64bit SPARC
# - 'build.debug.solaris.i386.32bit.suncc' - 32bit x86/i386
# - 'build.debug.solaris.i386.64bit.suncc' - 64bit x86/AMD64
# - 'build.debug.solaris.s390.32bit.gcc' - 32bit SystemZ/S390
# - 'build.debug.solaris.s390.64bit.gcc' - 64bit SystemZ/S390x
# )
$ time nice ksh ../buildksh93.sh 'build.solaris.sparc.32bit.suncc' 2>&1 | tee -a buildlog.log
## Test ksh93:
$ time nice ksh ../buildksh93.sh 'testshell' 2>&1 | tee -a buildlog.log
## Generated binaries and headers can be found in the arch/$(PLATFORM)/
## subdirectory.
# EOF.