Mirror of the Common Desktop Environment
Martijn Dekker ce3e080c0e Release 1.0.0-beta.2 | 2 gadi atpakaļ | |
---|---|---|
.github | 3 gadi atpakaļ | |
bin | 2 gadi atpakaļ | |
docs | 2 gadi atpakaļ | |
src | 2 gadi atpakaļ | |
.gitignore | 2 gadi atpakaļ | |
ANNOUNCE | 2 gadi atpakaļ | |
COPYRIGHT | 2 gadi atpakaļ | |
LICENSE.md | 3 gadi atpakaļ | |
NEWS | 2 gadi atpakaļ | |
README.md | 2 gadi atpakaļ | |
TODO | 2 gadi atpakaļ |
This repository is used to develop bugfixes to the last stable release (93u+ 2012-08-01) of ksh93, formerly developed by AT&T Software Technology (AST). The sources in this repository were forked from the GitHub AST repository which is no longer under active development.
For user-visible fixes, see NEWS and click on commit messages for full details. For all fixes, see the commit log. To see what's left to fix, see the issue tracker.
/*
...*/
.Between 2017 and 2020 there was an ultimately unsuccessful attempt to breathe new life into the KornShell by extensively refactoring the last unstable AST beta version (93v-). While that ksh2020 branch is now abandoned and still has many critical bugs, it also had a lot of bugs fixed. More importantly, the AST issue tracker now contains a lot of documentation on how to fix those bugs, which made it possible to backport many of them to the last stable release instead. This ksh 93u+m reboot now incorporates many of these bugfixes, plus patches from OpenSUSE, Red Hat, and Solaris, as well as many new fixes from the community (1, 2). Though there are many bugs left to fix, we are confident at this point that 93u+m is already the least buggy branch of ksh93 ever released.
To build ksh with a custom configuration of features, edit
src/cmd/ksh93/SHOPT.sh
.
Then cd
to the top directory and run:
bin/package make
The compiled binaries are stored in the arch
directory, in a subdirectory
that corresponds to your architecture. The command bin/package host type
outputs the name of this subdirectory.
If you have trouble or want to tune the binaries, you may pass additional
compiler and linker flags. It is usually best to export these as environment
variables before running bin/package
as they could change the name of
the build subdirectory of the arch
directory, so exporting them is a
convenient way to keep them consistent between build and test commands.
Note that this system uses CCFLAGS
instead of the usual CFLAGS
.
An example that makes Solaris Studio cc produce a 64-bit binary:
export CCFLAGS="-m64 -O" LDFLAGS="-m64"
bin/package make
Alternatively you can append these to the command, and they will only be used for that command. You can also specify an alternative shell in which to run the build scripts this way. For example:
bin/package make SHELL=/bin/bash CCFLAGS="-O2 -I/opt/local/include" LDFLAGS="-L/opt/local/lib"
For more information run
bin/package help
Many other commands in this repo self-document via the --help
, --man
and
--html
options; those that do have no separate manual page.
After compiling, you can run the regression tests. Start by reading the information printed by:
bin/shtests --man
Automated installation is not supported yet. To install manually:
cp arch/$(bin/package host type)/bin/ksh /usr/local/bin/
cp src/cmd/ksh93/sh.1 /usr/local/share/man/man1/ksh.1
(adapting the destination directories as required).
The following is the official AT&T description from 1993 that came with the ast-open distribution. The text is original, but hyperlinks were added here.
KSH-93 is the most recent version of the KornShell Language described in "The KornShell Command and Programming Language," by Morris Bolsky and David Korn of AT&T Bell Laboratories, ISBN 0-13-182700-6. The KornShell is a shell programming language, which is upward compatible with "sh" (the Bourne Shell), and is intended to conform to the IEEE P1003.2/ISO 9945.2 Shell and Utilities standard. KSH-93 provides an enhanced programming environment in addition to the major command-entry features of the BSD shell "csh". With KSH-93, medium-sized programming tasks can be performed at shell-level without a significant loss in performance. In addition, "sh" scripts can be run on KSH-93 without modification.
The code should conform to the IEEE POSIX 1003.1 standard and to the proposed ANSI C standard so that it should be portable to all such systems. Like the previous version, KSH-88, it is designed to accept eight bit character sets transparently, thereby making it internationally compatible. It can support multi-byte characters sets with some characteristics of the character set given at run time.
KSH-93 provides the following features, many of which were also inherent in KSH-88:
Documentation for KSH-93 consists of an "Introduction to KSH-93", "Compatibility with the Bourne Shell" and a manual page and a README file. In addition, the "New KornShell Command and Programming Language" book is available from Prentice Hall.