bin/package, src/cmd/INIT/package.sh:
- Automatically update an existing flat view even if 'flat' wasn't
given for a make action. This stops a flat view becoming
inaccurate if you forget to use 'bin/package flat make'
consistently. If the $PACKAGEROOT/lib/package/gen directory
exists, an existing flat view is assumed.
- Correct symlink fallbacks. We need an absolute path for the
symlink target or it's going to be broken.
.gitignore:
- Update.
I called the flat view featuritis, but it turns out the dtksh build
system depends on it. But it was broken, so let's make a proper
version instead. This new approach does not symlink directories
before make, but hardlinks files after make. To make performance
tolerable, it requires a modern POSIX 'find' utility with '{} +'.
bin/package, src/cmd/INIT/package.sh:
- We're going to depend on 'test X -ef Y' to check if X is the same
file as Y, so add that to the $min_posix checks even though it is
not technically POSIX. But it's so close to universally available
it doesn't really make a difference.
- After 'make', create a flat view by hardlinking arch/$HOSTTYPE
files, minus build system internals, onto their corresponding
paths in $PACKAGEROOT. Fall back to symlinking if hardlinking
fails (this would happen when crossing device boundaries).
- Clean up flat view when doing clean/clobber. This is done by
using 'find' to loop through the files in arch/ again and
removing any root paths that are the same file as their
corresponding arch/ path (this is where test X -ef Y comes in).
Then delete arch/$HOSTTYPE, then delete empty directories left.
- Check for the 'flat' qualifier when doing clean/clobber. If
given, do not delete arch/$HOSTTYPE but only clean up the flat
view and remove empty directories.
src/cmd/INIT/Mamfile:
- Do not create the lib/package directory. (re: beb3c64a)
.gitignore:
- Update.
There is a feature test for brk(2)/sbrk(2), but it was not checked
for in one place in vmbest.c, causing libdll to fail to build on
FreeBSD aarch64 because the features/dll output{...}end block
failed to link. This commit allows libdll to build on that system,
though another mysterious build failure apparently remains.
https://github.com/ksh93/ksh/issues/154
src/lib/libast/include/vmalloc.h,
src/lib/libast/vmalloc/vmbest.c:
- Add missing '#if _mem_sbrk' directives to disable uses of sbrk(2)
on systems that have removed this deprecated interface.
src/cmd/builtin/features/pty,
src/lib/libast/features/common,
src/lib/libast/features/float,
src/lib/libast/features/lib,
src/lib/libast/features/sfio,
src/lib/libast/features/sizeof:
- Add a fail clause to more 'tst - output{' blocks so they write an
informative #error directive if they fail to compile and write
required header identifiers. This should avoid much more obscure
compile errors later on. (re: e20c0c6b)
.gitignore:
- Add pattern for emacs #backup# files.
To ignore binaries generated by 'bin/package flat make', the
entries all need an initial '/' or they will be ignored on deeper
hierarchy levels as well.
The following is quoted from Marcin Cieślak [*]:
When running under FreeBSD /bin/sh (and not ksh) we get spurious
file named '=' created in the root. This is because the "checksh"
function runs /bin/sh -c '(( .sh.version >= 20111111 ))' which
produces a "=" file with /bin/sh as a side effect.
Fixes https://github.com/ksh93/ksh/issues/13
bin/package,
src/cmd/INIT/package.sh:
- Fix the creation of a spurious '=' file by making sure the shell
has support for (( ... )) expressions.
.gitignore:
- Remove the '=' file entry since it no longer has a purpose.
[*]: https://bsd.network/@saper/103196289917156347
This commit reboots ksh 93u+m development with a new fork based off
the archived official AT&T ast repo, master branch.
README:
- Removed. Having two READMEs is a botch.
README.md:
- Imported and edited from the archived fork,
https://github.com/modernish/ksh -- the newer instructions will
become applicable as I cherry-pick all the changes from there :)
- Copy-edits.
- Added policy and rationale for this 93u+m fork.
- Incorporated info from old README that is still relevant.
.gitignore:
- Added.
bin/execrate:
- Removed. This one keeps changing its license header, causing git
to show an uncommitted file. It's always re-copied anyway, and
not for direct invocation, so, exclude and add to .gitignore.
The source file is: src/cmd/INIT/execrate.sh
src/cmd/*,
src/lib/*:
- Remove historical baggage: everything except ksh93 and
dependencies. This is the same stuff the ksh-community fork
removed. I wouldn't mind keeping it, but some of this stuff
causes build failures on macOS (and probably other systems), and
I need to get on with fixing ksh93.
Hopefully, we can figure out how to re-add stuff we can use
later -- particularly the pty command (pseudo-terminal utility
for scripting interactive sessions) which is needed for
regression-testing the interactive shell.