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