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