From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- unix/sun/mksuntool.csh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 unix/sun/mksuntool.csh (limited to 'unix/sun/mksuntool.csh') 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 -- cgit