--- a/lib/Tools/mkdir Sat Feb 05 16:58:58 2000 +0100
+++ b/lib/Tools/mkdir Sat Feb 05 16:59:50 2000 +0100
@@ -15,6 +15,7 @@
echo "Usage: $PRG [LOGIC] NAME"
echo
echo " Options are:"
+ echo " -I FILE alternative IsaMakefile output"
echo " -b setup build mode (session outputs heap image)"
echo " -d setup document"
echo " -p include parent logic target"
@@ -36,13 +37,17 @@
# options
+ISAMAKEFILE="IsaMakefile"
BUILD=""
DOCUMENT=""
PARENT=""
-while getopts "bdp" OPT
+while getopts "I:bdp" OPT
do
case "$OPT" in
+ I)
+ ISAMAKEFILE="$OPTARG"
+ ;;
b)
BUILD=true
;;
@@ -94,8 +99,8 @@
USEDIR="\$(USEDIR)"
fi
-if [ -f IsaMakefile ]; then
- echo "keeping $PWD/IsaMakefile" >&2
+if [ "$ISAMAKEFILE" != - -a -f "$ISAMAKEFILE" ]; then
+ echo "keeping $PWD/$ISAMAKEFILE" >&2
else
{ echo
echo "## targets"
@@ -138,7 +143,13 @@
echo "clean:"
echo -e "\t@rm -f $TARGET"
echo
- } >IsaMakefile
+ } | {
+ if [ -z "$ISAMAKEFILE" -o "$ISAMAKEFILE" = - ]; then
+ cat
+ else
+ cat > "$ISAMAKEFILE"
+ fi
+ }
fi