#!/bin/sh
# This file goes through all the necessary steps to build a release package.
-# You may specify a OS major version number (4, 5, or 6) to specify which
-# OS release to build. If no version number is given it will default to 6.
+# syntax:
+# mkrelease.sh [5] [clean] [targets ....]
+#
+# You may specify 5 to build for IRIX 5.3
+#
+# You can specify clean to do a make clean before building. Make clean
+# will also run configure and generate the required Makefile.
+#
+# You can specify which targets to build. If targets are specified, the
+# specified targets will be built but inst packages will not be generated.
doclean=""
SGI_ABI=-n32
CC=cc
+if [ ! -f ../../source/Makefile ]; then
+ doclean="clean"
+fi
+
if [ "$1" = "clean" ]; then
doclean=$1
shift
fi
cd ../../source
-if [ "$doclean" = "clean" -o ! -f Makefile ]; then
+if [ "$doclean" = "clean" ]; then
echo Create SGI specific Makefile
chmod +x configure
chmod +x configure.developer
cd ../packaging/SGI
+#
+# Don't generate packages if targets were specified
+#
+if [ "$1" != "" ]; then
+ exit 0;
+fi
+
# generate the packages
#
echo Generating Inst Packages