This directory contains all of the source code that made its way into
the GNU tools package. The sources are all available in CVS, suitably
tagged with each release. There is a to plevel build script, BUILD.sh,
that should be used for doing the actual builds. Here's how to use it.

First, create a directory in which you will be doing the build. This
directory should not be a subdirectory of this one, it should be completely
separate from the source directory. Lets call this directory $BUILD.
Next, create a directory where the compiled packages will be installed.
This should have, as its last component, the directory 'dist'. Parallel
to that should be a directory 'input'. This is so that the packaging
script will run. Lets call this directory $DIST. Lets call the root of
the source directory $SOURCE.

With the above setup, to build the full package, you simply run
   $SOURCE/BUILD.sh $SOURCE $BUILD $DIST

This will place all configure and build logs in the directory
$BUILD/$GNUOS/LOGS. After the build, look in that directory for any *.bad
files. They indicate a build failure.

Once the full build has succeeded, you create the installable packages
using metapkg. You need to specify the directory that contains 'dist'
and 'input'. Lets call that directory $CDMT. You would invoke metapkg thus:
  metapkg -d $CDMT -p $SOURCE/PACKAGING/metapkg.gnutools \
    -MGNUOS=OSR5 -MHANDOFFS=$SOURCE/PACKAGING

If you built on OSR6 then change -MGNUOS to be OSR6, and if you built
on UnixWare 7, change it to be UW7. The values are case sensitive. The
build script automatically detects the correct build type based on the
machine it was invoked on.

When the packaging files have been generated, you simply cd to $CDMT and
run make. It will build installable archives.

Here is a full example of start-from-nothing to installable archives:

  mkdir /u/gnu
  mkdir /u/gnu/gnutools
  mkdir /u/gnu/gnutools/dist /u/gnu/gnutools/input
  mkdir /u/gnu/build
  mkdir /u/gnu/src
  cd /u/gnu/src
  osdcvs checkout opensrc/gnutools
  /u/gnu/src/gnutools/BUILD.sh /u/gnu/src/gnutools \
    /u/gnu/build /u/gnu/gnutools/dist
  metapkg -d /u/gnu/gnutools \
    -p /u/gnu/src/gnutools/PACKAGING/metapkg.gnutools \
    -MGNUOS=OSR5 -MHANDOFFS=/u/gnu/src/gnutools/PACKAGING
  cd /u/gnu/gnutools
  make

If you want to build just a single package from the full set, or even just
a few packages, you still need the same infrastructural setup described
above, but you can set the variable GNUBUILD to be a space-separated list
of packages to build. For example:
  GNUBUILD="cvs grep" BUILD.sh ...

To prepare a source archive for posting on the web, make sure you start
with a fresh source archive, and that you use a release tag. For example:

  mkdir /u/tmp/web
  cd /u/tmp/web
  osdcvs checkout -rgnutools-5_0_7Ne opensrc/gnutools
  cd gnutools
  find . -name CVS -a -type d | xargs rm -fr
  cd ..
  mv gnutools gnutools-5.0.7Ne
  find gnutools-5.0.7Ne -depth -print | cpio -oc | \
    bzip2 > gnutools-5.0.7Ne-SRC.cpio.bz2

