Build and install instructions for etsh!

--------
SYNOPSIS
	env [variable=value ...] make [target ...]
	make [variable=value ...] [target ...]

If the defaults described below match your desires and/or the
requirements of your system, you can build and install the etsh
package (binaries and manual pages) by doing the following.

	% ./configure
	% make
	# make install

...
NOTE: You can do `./configure -h' for help.

Otherwise, continue reading for full build and install details.
See the EXAMPLES section at the end of this file for additional
help if needed.

---------
VARIABLES
The Makefile defines the following configuration variables (default
value listed).  The user can modify the default configuration by
passing the desired variable=value pair(s) on the command line.

	DESTDIR		Unset by default.  This may be used as a
			target directory for building/packaging
			binary packages if needed.

	PREFIX		Defaults to /usr/local.  This is the target directory
			where BINDIR, LIBEXECDIR*, DOCDIR, EXPDIR, MANDIR,
			and SYSCONFDIR are located by default.

	BINDIR		Defaults to $(PREFIX)/bin.
			This is the target directory where
			the etsh and tsh binaries are installed.

	LIBEXECDIR	Defaults to $(PREFIX)/libexec/$(OSH_VERSION).
			This is the target directory that contains two
			subdirectories, etsh and tsh.

	LIBEXECDIROSH	Defaults to $(PREFIX)/libexec/$(OSH_VERSION)/etsh.
			This is the target directory for etsh(1) support
			scripts and files.

	LIBEXECDIRSH6	Defaults to $(PREFIX)/libexec/$(OSH_VERSION)/tsh.
			This is the target directory where tsh(1) external
			utilities (glob, if, goto, and fd2) are installed
			and where tsh(1) expects to find them.

	DOCDIR		Defaults to $(PREFIX)/share/doc/etsh.
			This is the target directory for the [ACDILNP]* and
			R*E package documentation files.

	EXPDIR		Defaults to $(PREFIX)/share/examples/etsh.  This is the
			target directory for the examples/* files.

	MANDIR		Defaults to $(PREFIX)/man/man1.  This is the
			target directory where the manual pages are
			installed.

	SYSCONFDIR	Defaults to $(PREFIX)/etc.  This is the target
			directory where etsh searches for its system-wide
			rc (init and logout) files if such files are
			available on the system.  See also:

				https://etsh.io/rc_files

			...
			for example rc files.

	INSTALL		Defaults to /usr/bin/install.  The install(1)
			utility is used to copy the resulting binaries,
			manual pages, and other files to final targets.

(Mac) OS X only:
The following configuration variables specify the desired target
architecture(s) for compiling universal binaries and/or 64-bit
binaries and/or 32-bit binaries for (Mac) OS X running on Intel
and PowerPC Macs.

	OSXCFLAGS	Unset by default.

	OSXLDFLAGS	Unset by default.

			Possible value(s) for OSXCFLAGS and OSXLDFLAGS may
			include one or more of the following on supported
			systems:

				-arch x86_64, -arch ppc64, -arch i386, -arch ppc

			...
			See also EXAMPLES.

-------
TARGETS
The following targets are available.

	all		Default target is the same as typing `make'.
			Compiles everything and generates manual pages.

	oshall		Compiles osh and generates manual pages.

	sh6all		Compiles sh6, glob, if, goto, fd2 and
			generates manual pages.

	check		Runs the regression test suite with osh and sh6.
	check-osh	...                                 osh.
	check-oshall	...                                 osh.
	check-sh6	...                                         sh6.
	check-sh6all	...                                         sh6.

	check-newlog	Generates new test logs for the osh and sh6
			regression test suite.

	install		Installs all binaries and manual pages.

	install-oshall	Installs osh binary and manual pages.

	install-sh6all	Installs sh6all binaries and manual pages.

	install-doc	Installs package documentation.

	install-exp	Installs examples.

	clean-obj	Removes all object files.

	clean		Removes all binaries, object files, and other
			files generated during the build.

--------
EXAMPLES
The following configures and compiles tsh and its external utilities
(glob, if, goto, and fd2) for /usr/pkg.  Then, it installs the tsh
binary into /usr/pkg/bin, its external utilities into LIBEXECDIRSH6,
and the manual pages into /usr/pkg/man/man1.

	% ./configure
	% make PREFIX=/usr/pkg sh6all
	# make PREFIX=/usr/pkg install-sh6all

The following configures and compiles everything, setting up etsh to
search for its system-wide rc files in /etc instead of /usr/local/etc
by default.  Then, it installs the entire etsh package, including
package documentation and examples, into the default locations.

	% ./configure
	% make SYSCONFDIR=/etc
	# make install install-doc install-exp

The following is the same as above, but with statically-linked binaries,
instead of dynamically-linked, which is the default.

	% ./configure
	% make LDFLAGS=-static SYSCONFDIR=/etc
	# make install install-doc install-exp

The following configures and compiles each program as a 2-way 64/32-bit
universal binary for Mac OS X running on Intel Macs.  Then, it installs
the entire etsh package, including package documentation and examples,
into the default locations.
 
	% ./configure
	% make OSXCFLAGS='-arch x86_64 -arch i386' \
	       OSXLDFLAGS='-arch x86_64 -arch i386'
	# make install install-doc install-exp

The following may or may not work on OpenIndiana.  Please send me
your feedback about installing etsh there, if you would be so kind.
I haven't tested it myself yet, but (minus the ./configure step)
this is what used to work for me on OpenSolaris.

	% ./configure
	% uname -srvm
	SunOS 5.11 snv_111b i86pc
	% which cc gmake ginstall
	/usr/gnu/bin/cc
	/usr/bin/gmake
	/usr/bin/ginstall
	% gmake
	# gmake INSTALL=/usr/bin/ginstall install install-doc install-exp

Jeffrey Allen Neitzel						2017/07/27

@(#)$Id: 12e1386339519181885b6e7f3c38cd2c87cc6e31 $
