xref: /titanic_41/usr/src/lib/libshell/misc/buildksh93.readme (revision 2a8d6eba033e4713ab12b61178f0513f1f075482)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20
21#
22# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26#
27# buildksh93.readme
28#
29
30* Intro:
31"buildksh93.sh" is a small build script used to build the AT&T "ast-ksh"
32and "ast-open" packages using its native (nmake-based) build system
33which is needed to build the iffe-generated (header) files (each time
34for { 32bit SPARC, 64bit SPARC, 32bit i386, 64bit AMD64 }) which are
35moved later to their matching OS/Net build directories.
36THIS SCRIPT IS NOT INTENDED FOR NORMAL USAGE.
37
38
39* Note that buildksh93.sh modifies the build behaviour of the AST build
40system, including enforcing C99/XPG6 semantics (which is MANDATORY!!)
41and feeding additional libraries (like libnsl, libsocket, librt etc.)
42to the feature look system (called "iffe" (="if feature exists")) to
43ensure all features needed for the Solaris version of ksh93 are
44properly found.
45
46
47* Example usage of the script (more information can be found in the
48script itself):
49## Download AT&T ksh93 sources
50$ wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/~gsf/download/tgz/INIT.2008-11-04.tgz'
51$ wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/~gsf/download/tgz/ast-ksh.2008-11-04.tgz'
52
53## Unpack the sources (32bit SPARC):
54$ mkdir build_sparc_32bit
55$ cd build_sparc_32bit
56$ gunzip -c <../INIT.2008-11-04.tgz | tar -xf -
57$ gunzip -c <../ast-ksh.2008-11-04.tgz | tar -xf -
58
59## Build ast-ksh for 32bit SPARC
60# (build other build flags are:
61#   - "build.solaris.sparc.32bit.suncc" - 32bit SPARC
62#   - "build.solaris.sparc.64bit.suncc" - 64bit SPARC
63#   - "build.solaris.i386.32bit.suncc"  - 32bit x86/i386
64#   - "build.solaris.i386.64bit.suncc"  - 64bit x86/AMD64
65#   - "build.solaris.s390.32bit.gcc"    - 32bit SystemZ/S390
66#   - "build.solaris.s390.64bit.gcc"    - 64bit SystemZ/S390x
67# )
68$ time nice ksh ../buildksh93.sh "build.solaris.sparc.32bit.suncc" 2>&1 | tee -a buildlog.log
69
70## Test ksh93:
71$ time nice ksh ../buildksh93.sh "testshell" 2>&1 | tee -a buildlog.log
72
73## Generated binaries and headers can be found in the arch/$(PLATFORM)/
74## subdirectory.
75
76
77# EOF.
78