#!/bin/sh
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
#
# This file is part of HDF5.  The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
# Build HDF5 library by doing configure, make, and tests.
# Usage: See USAGE()
# Programmer: Albert Cheng
# Creation date: Jul  9, 2003
# Some handy definitions
USAGE()
cat <<EOF
Buildhdf5 builds the HDF5 library by running configure, make and make check.
It skips the configure part if one has been done already.  In effect, one
can continue from a previous build.
Command Syntax
==============
buildhdf5 [-config] [-szlib] [-help] [-n] [-srcdir dir] [-fortran] [-cxx] [-pp] config-arguments ...
   -config: run configure only. [default to do build too]
   -szlib:      configure in the szlib option
   -help:   show this help page
   -n:      no execution, just show commands
   -srcdir: use dir as the source directory
                   [Note: this is different from --srcdir
                    which will be passed to configure]
   -fortran:    add --enable-fortran
   -cxx:    add --enable-cxx
   -pp:     add --enable-parallel
   all other arguments are passed to configure
Configure in place or by srcdir
===============================
By default, the command looks for the configure command in
'.' and then '../hdf5'.  When it finds it, it uses it to do
the configure part.  In effect, if ./configure is found, it
does the build in place.  If it finds ../hdf5/configure, it
does the --srcdir (that is separated source) build.  Therefore,
if you have the following structure setup, you can run multiple
hosts building simultantously using a common source code.