These are instructions to build GNU Sh-utils for MS-DOS and
MS-Windows using DJGPP tools.


Required tools
==============

To build the package, you will need the DJGPP development environment
(GCC, header files and the libraries) and DJGPP ports of the following
tools:

	- GNU Make 3.75 or later
	- Bash (or some other Unix-like shell)
	- GNU Sed
	- GNU Fileutils
	- GNU Textutils
	- A previous version of GNU Sh-utils
	- GNU Grep

These should be available from the DJGPP sites (see the FAQ for
Simtelnet mirrors).

The package should be built with the port of Make 3.75 or later.
Previous versions of Make ported to DJGPP didn't support Unix shells,
and the Makefiles for this package won't work without a Unix shell.


Unpacking the sources
=====================

If you download the source distribution from one of the DJGPP
archives, just unzip it preserving the directory structure (use -d
switch if you do that with PKUNZIP).  You are now ready to build the
programs; see the section "How to build" below.

Source distributions downloaded from one of the GNU FTP sites need
some more work to unpack.  First, you MUST use the `djtar' program to
unzip the package.  That's because some file names in the official
distributions need to be changed to avoid problems on the various
platforms supported by DJGPP.  `djtar' can rename files on the fly
given a file with name mappings.  The distribution includes a file
`djgpp/fnchange.lst' with the necessary mappings.  So you need first
to retrieve that file, and then invoke `djtar' to unpack the
distribution.  Here's how:


  djtar -x -p -o sh-utils-2.0g/djgpp/fnchange.lst sh-utils-2.0g.tar.gz > lst
  djtar -x -n lst sh-utils-2.0g.tar.gz

(The name of the distribution archive and the top-level directory will
be different for versions other than 2.0g.)



How to build
============


To build the package downloaded from a GNU FTP site, you will need o
configure it first.  You will also need to configure it if you want to
change the configuration options (e.g., use Rx instead of Regex, or
add the National Language Support).  To configure Sh-utils, use the
CONFIG.BAT batch file in the DJGPP subdirectory.  It sets a few
environment variables, then calls BASH to run the configure script, so
you should run CONFIG.BAT, then Make:

		djgpp\config
		make

If you are building from a directory other than that where the sources
were unpacked, give the source directory as an argument o CONFIG.BAT:

	f:\gnu\sh-utils-2.0g\djgpp\config f:/gnu/sh-utils-2.0g

Note that you MUST use forward slashes in the argument to CONFIG.BAT.

The configure script run by CONFIG.BAT supports a few options (e.g.,
you could build the package with the GNU Rx library instead of the
default Regex).  Run "sh ./configure --help" to see all the options
recognized by the script.

When Make finishes, you can install the package:

		make install

To support compilation unders DOS (8.3 style filenames), the file
charset.alias is renamed as charset.al and installed in DJGPP/LIB.
Run djgpp/finish.sh and the installation is complete.

Notes
=====

The absolute majority of the DOS-specific changes for this package
take care of the filename issues such as backward and forward slashes.
Some utilities like users, who, pinky, etc. are not available under DOS.
Running them just prints an error message.

The GNU Gettext package is not supported yet in the DJGPP version, so
don't expect the programs to talk to you in any language but English.
(**Comments about this required**).

		Enjoy,
				Prashant TR <prashant_tr@yahoo.com>
