Imported scripts for make/gdb integration
authorshort <>
Tue, 2 Oct 2001 02:13:10 +0000 (02:13 +0000)
committershort <>
Tue, 2 Oct 2001 02:13:10 +0000 (02:13 +0000)
bin/md [new file with mode: 0755]
bin/mr [new file with mode: 0755]

diff --git a/bin/md b/bin/md
new file mode 100755 (executable)
index 0000000..e503dfe
--- /dev/null
+++ b/bin/md
@@ -0,0 +1,31 @@
+#! /bin/sh
+if [ -f .print_userprogs ];then
+       if [ `wc -l <.print_userprogs` = 1 ];then
+               arg="./`sed 's/:.*//' <.print_userprogs`"
+       fi
+fi
+if [ -z "$arg" ];then
+       arg="`basename "$PWD"`"
+fi
+
+run_args="`mdr_args "$arg"`"
+
+if [ -z "$1" ];then
+       cmd="run"
+else
+       cmd="rtl $1";shift
+fi
+
+echo "ARG: $arg  CMD: $cmd"
+t="/tmp/mr.$$";rm -f "$t"
+trap 'rm -f "$t"' EXIT
+cat >"$t" <<EOCMDS
+set args $run_args
+`stty size|awk '{print "set height "$1"\nset width "$2}'`
+echo $cmd\n
+$cmd
+shell rm -vf "$t"
+EOCMDS
+set -xe
+make "$arg"
+gdb --command="$t" ./"$arg"
diff --git a/bin/mr b/bin/mr
new file mode 100755 (executable)
index 0000000..3a5a49c
--- /dev/null
+++ b/bin/mr
@@ -0,0 +1,17 @@
+#! /bin/sh
+if [ -f .print_userprogs ];then
+       if [ `wc -l <.print_userprogs` = 1 ];then
+               arg="./`sed 's/:.*//' <.print_userprogs`"
+       fi
+### elif [ -n "$1" ];then arg="$1";shift
+fi
+if [ -z "$arg" ];then
+       arg="`basename "$PWD"`"
+fi
+
+run_args="`mdr_args "$arg"`"
+
+echo "ARG: $arg"
+set -xe
+make "$arg"
+./"$arg" $run_args