#
# run this under csh from the build directory as
#     buildall <SRCDIR> <GM-VER>

echo "Building the two flavors of source distributions"
echo " "

make clean
unsetenv CONF_OPTS
printenv CONF_OPTS
/bin/rm -f config.cache
$1/configure --enable-mcp-build
make -j 8 source_tarball
cp -p $2.tar.gz /tmp/$2.tar.gz
echo " "
echo "Done with normal build"
echo " "

make clean
unsetenv CONF_OPTS
setenv CONF_OPTS --enable-l7-only
printenv CONF_OPTS
/bin/rm -f config.cache
$1/configure --enable-mcp-build --enable-l7-only
make -j 8 source_tarball
cp -p $2.tar.gz /tmp/$2-l7-only.tar.gz
echo " "
echo "Done with --enable-l7-only build"
echo " "

#make clean
#unsetenv CONF_OPTS
#setenv CONF_OPTS --enable-compact
#printenv CONF_OPTS
#/bin/rm -f config.cache
#$1/configure --enable-mcp-build --enable-compact
#make -j 8 source_tarball
#cp -p $2.tar.gz /tmp/$2-compact.tar.gz
#echo " "
#echo "Done with --enable-compact build"
#echo " "
#
#make clean
#unsetenv CONF_OPTS
#setenv CONF_OPTS --enable-compact512
#printenv CONF_OPTS
#/bin/rm -f config.cache
#$1/configure --enable-mcp-build --enable-compact512
#make -j 8 source_tarball
#cp -p $2.tar.gz /tmp/$2-compact512.tar.gz
#echo " "
#echo "Done with --enable-compact512 build"
#echo " "
#
echo " "
echo "Compiles completed"

ls -lt /tmp/$2*.gz
