#! /bin/sh
#
# $Id: autoconf_compile_wrapper 32336 2000-04-29 23:18:09Z othman $
#
# Usually cron setups a really miserable enviroment, this script
# serves two purposes:
# 1. Setup a good enviroment for auto_compile.
# 2. Invoke auto_compile with the proper arguments for each site.
#
# The idea is to modify this script on a per-site basis and leave
# auto_compile unmodified.
#

# Setup a proper path, remember that cvs, make, perl5 and your
# compiler must be there.
PATH=.:$HOME/bin:/pkg/gnu/bin:/opt/SUNWspro/bin:$PATH
export PATH

# Obvious enough.
CVSROOT=/project/cvs-repository
export CVSROOT

# It could be a good idea to set CVSREAD this will make the staging
# area read-only, but our staging areas are public.
# CVSREAD=Y
# export CVSREAD

# Here we define the cvs working copy for our staging area.
CHECKOUT=$HOME/head

# In some sites the building directory differs from the cvs working
# copy. The directory is updated running
# $ACE_ROOT/bin/create_ace_build; but it must be setup manually the
# first time.
# TODO: Arrange for automatic creation of platform_macros.GNU &
# config.h.
BUILD=SUNCC

# Here is where we store autoconf_compile output and keep a history of
# each run.
LOGDIR=$HOME/head/ACE_wrappers/build/$BUILD/autoconf_compile

# Who do we send email when compilation (or anything else) fails.
ADMIN=PUT_YOUR_ADDRESS_HERE ; echo "You must edit this file" ; exit 0

# You must select a mail tool that can understand the -s option such
# as:
#
# /usr/bin/mailx 		Solaris
# /usr/bin/mailx 		HP-UX
# /usr/sbin/mailx		IRIX
# /bin/mail 			Linux

exec /pkg/gnu/bin/perl $CHECKOUT/ACE_wrappers/bin/autoconf_compile \
    $CHECKOUT $BUILD $LOGDIR $ADMIN /usr/bin/mailx

