AWK for DOS
===========
* About
* Documentation
* Build instructions
About
=====
AWK version 20230911b for DOS.
nawk.exe - 16-bit version built with Watcom C
nawk32.exe - 32-bit version built with DJGPP
I selected version 20230911 because some scripts would cause the
current version to crash on DOS. See also:
<
https://mail-index.netbsd.org/tech-pkg/2023/09/17/msg028190.html>
Documentation
=============
See nawk.txt for the manual.
See also:
<
https://pubs.opengroup.org/onlinepubs/009604499/utilities/awk.html>
<
https://en.wikibooks.org/wiki/AWK>
<
https://en.wikibooks.org/wiki/An_Awk_Primer>
<
https://wiki.alpinelinux.org/wiki/Awk>
<
http://awk.freeshell.org/AwkFeatureComparison>
<
gopher://tilde.club/7/~freet/gophhub/?
https://github.com/KamilaBorowska/awk-plus-plus>
<
gopher://tilde.club/0/~freet/cgi-bin/gophhub.sh?
repo=dubiousjim/awkenough&file=1&path=library.awk>
<
https://www.grymoire.com/Unix/Awk.html>
Build instructions
==================
How i cross-compile AWK for DOS from a Linux host.
Install DJGPP and OpenWatcom v2
-------------------------------
<
gopher://tilde.club/7/~freet/gophhub/?
https://github.com/andrewwutw/build-djgpp>
<
gopher://tilde.club/7/~freet/gophhub/?https://github.com/open-watcom>
Clone One True Awk sources
--------------------------
<
gopher://tilde.club/7/~freet/gophhub/?https://github.com/onetrueawk/awk>
Apply DOS patch
---------------
$ patch -p1 <dos.dif
Generate proctab.c, ytab.c, and ytab.h
--------------------------------------
$ make awkgram.tab.c
$ make proctab.c
Build nawk.exe
--------------
$ wmake -f makefile.watcom
$ cp awk.exe nawk.exe
$ cp awk.txt nawk.txt
$ wstrip nawk.exe
Clean up
--------
$ wmake -f makefile.watcom clean
$ make clean
Build nawk32.exe
----------------
$ make
$ cp a.exe nawk32.exe
$ i586-pc-msdosdjgpp-strip nawk32.exe
Package
-------
mkdir nawk
cp nawk.exe nawk32.exe dos.dif nawk/
cp dos.txt nawk.txt LICENSE README.md TODO nawk/