aboutsummaryrefslogtreecommitdiff
path: root/unix/sun/mksuntool.csh
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /unix/sun/mksuntool.csh
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'unix/sun/mksuntool.csh')
-rwxr-xr-xunix/sun/mksuntool.csh39
1 files changed, 39 insertions, 0 deletions
diff --git a/unix/sun/mksuntool.csh b/unix/sun/mksuntool.csh
new file mode 100755
index 00000000..0c7a4175
--- /dev/null
+++ b/unix/sun/mksuntool.csh
@@ -0,0 +1,39 @@
+#! /bin/csh
+# MKSUNTOOL -- Configure the suntool subdirectory, used to link the suntools
+# executable. (Only used for SunOS versions prior to 4.0).
+
+# set echo
+
+unset noclobber
+unalias cd cmp echo ln mv rm sed set
+
+set OBJS = "imtool.o gterm.o gtermio.o screendump.o arrow.o notify_read.o"
+set sundir = /usr/src/sun/suntool
+
+if (! -e ./suntool) then
+ mkdir suntool
+endif
+cd suntool
+
+cmp -s Makefile $sundir/Makefile
+if ($status == 0 && `grep gterm basetools.h` != "") then
+ echo "suntool build directory is up to date"
+ exit 0
+else if (! -e $sundir/Makefile) then
+ echo "$sundir not found"
+ exit 1
+else
+ echo "rebuilding suntool subdirectory"
+endif
+
+set files = "`ls`"
+if ("$files" != "") then
+ rm -rf *
+endif
+(cd $sundir; tar -cf - . ) | tar -xpf -
+echo '"gterm",gterm_main,' >> basetools.h
+echo '"imtool",imtool_main', >> basetools.h
+echo '/cmdtool_main/i\' > Temp
+echo 'extern imtool_main();\' >> Temp
+echo 'extern gterm_main();' >> Temp
+sed -f Temp toolmerge.c > Temp2; mv -f Temp2 toolmerge.c; rm Temp