[comp.lang.icon] Holiday TidBit, part 3 of 3

goer@ellis.uchicago.edu (Richard L. Goerwitz) (05/29/91)

---- Cut Here and feed the following to sh ----
#!/bin/sh
# this is yahtz.03 (part 3 of a multipart archive)
# do not concatenate these parts, unpack them in order with /bin/sh
# file Makefile.dist continued
#
if test ! -r _shar_seq_.tmp; then
	echo 'Please unpack part 1 first!'
	exit 1
fi
(read Scheck
 if test "$Scheck" != 3; then
	echo Please unpack part "$Scheck" next!
	exit 1
 else
	exit 0
 fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
	echo 'x - still skipping Makefile.dist'
else
echo 'x - continuing file Makefile.dist'
sed 's/^X//' << 'SHAR_EOF' >> 'Makefile.dist' &&
XPROGNAME = yahtz
X
X# You may need to change this.
XICONC = /usr/icon/v8/bin/icont
X
X# Don't change this, unless you happen to have a copy of itlib.icn
X# around, and know it works for your system.
XITLIB = iolib
X
X# Please edit these to reflect your local file structure & conventions.
XDESTDIR = /usr/local/games
XOWNER = root
XGROUP = root
X
X# Please don't change these.
XSRC = $(PROGNAME).icn $(ITLIB).icn
XSHELL = /bin/sh
X
X# I hope you won't have to use this.
X# DEBUGFLAG = -t
X
X$(PROGNAME): $(SRC)
X	$(ICONC) $(DEBUGFLAG) -o $(PROGNAME) $(SRC)
X
X# Pessimistic assumptions regarding the environment (in particular,
X# I don't assume you have the BSD "install" shell script).
Xinstall: $(PROGNAME)
X	test -d $(DESTDIR) || (mkdir $(DESTDIR) && chmod 755 $(DESTDIR))
X	cp $(PROGNAME) $(DESTDIR)/
X	chgrp $(GROUP) $(DESTDIR)/$(PROGNAME)
X	chown $(OWNER) $(DESTDIR)/$(PROGNAME)
X	@echo "\nInstallation done.\n"
X
Xclobber:
X	-rm -f *~ .u?
X	-rm -f $(PROGNAME)
SHAR_EOF
echo 'File Makefile.dist is complete' &&
true || echo 'restore of Makefile.dist failed'
rm -f _shar_wnt_.tmp
fi
# ============= README ==============
if test -f 'README' -a X"$1" != X"-c"; then
	echo 'x - skipping README (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting README (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'README' &&
XThis hacked version of Chris Tenaglia's yahtzee program will run under
XUNIX, and under DOS as well.  To run it under DOS, you need
Xnnansi.sys.  Sorry, but the old ansi driver doesn't cut it.  Check out
Xthe iolib.icn file for directions on how to set your environment
Xvariables so that iolib can find your termcap file regardless of what
Xdirectory it's in, and so that you can tell iolib that you aren't
Xusing the old ansi.sys driver.
X
XUnix users, type "make" and relax.  If you have root privileges, type
X"make install," and relax.  If you're worried, check the default vari-
Xables in the makefile.  Oh, be sure to cp Makefile.dist makefile before
Xtrying to make anything.
X
XThis is a test version!!  In accordance with the author's wishes, I'd
Xlike to make it clear that I've altered all the screen I/O routines,
Xand have removed characters peculiar to VT terminals.  I've tried to
Xkeep intact the author's indentation and brace style.  Changes, where
Xpresent, have been indicated by my initials.
X
XOne more thing: There are lots of yahtzee programs out there, so I had
Xto rename the program.  I've seen yahtzee, yahtzee2, and yaht.  I guess
Xyahtz was all that was left ;-).
X
X-Richard Goerwitz.
SHAR_EOF
true || echo 'restore of README failed'
rm -f _shar_wnt_.tmp
fi
rm -f _shar_seq_.tmp
echo You have unpacked the last part
exit 0
-- 

   -Richard L. Goerwitz              goer%sophist@uchicago.bitnet
   goer@sophist.uchicago.edu         rutgers!oddjob!gide!sophist!goer