# makefile generated by mkold and edited by hand
# RCS ID: @(#) $Header: makefile,v 70.1.1.11 94/08/03 10:35:13 root Exp $
# Copyright (c) HP, 1990

.c.o		:
		  $(CC) -DKEYSHELL $(CFLAGS) -c $<

.c.a		:
		  $(CC) -DKEYSHELL $(CFLAGS) -c $<
		  ar rv $@ $*.o
		  rm -f $*.o

default		: TSM keyshell.a softkeys builtins KSH88 KEYSHELL keysh.cat

KSH88		:
		  cp -r ../../../bin/ksh88 .
		  mv ksh88/keysh.makefile ksh88/makefile
		  mv ksh88 KSH88
		  echo "# Keyshell sed(1)'d makefile" >KSH88/MAKEFILE
		  sed 's!LIBS =!LIBS = -lcurses!; s!-DKSHELL!-DKSHELL -DKEYSHELL!; s!^emacs\.o!EMACS.o!; s!^vi\.o!VI.o!; s!^hpux_rel\.o!HPUX_REL.o!; s!emacs\.o!../keyshell.a!; s!vi\.o!!; s!hpux_rel\.o!!; s!edit\.o:!edit.o: ../kshhooks.h!' <KSH88/makefile >>KSH88/MAKEFILE
		  (cd KSH88; make -f MAKEFILE clobber)

TSM		:
		  mkdir -p TSM/include
		  cp ../tsm/include/facetterm.h TSM/include

KEYSHELL	:
		  (cd KSH88; make -f MAKEFILE)
		  cp KSH88/ksh keysh

keyshell.a	: keyshell.a(keyshell.o)    \
		  keyshell.a(global.o)	    \
		  keyshell.a(translate.o)   \
		  keyshell.a(intrinsics.o)  \
		  keyshell.a(config.o)	    \
		  keyshell.a(extents.o)	    \
		  keyshell.a(word.o)	    \
		  keyshell.a(edit.o)	    \
		  keyshell.a(emacs.o)	    \
		  keyshell.a(vi.o)	    \
		  keyshell.a(keyboard.o)    \
		  keyshell.a(display.o)	    \
		  keyshell.a(message.o)	    \
		  keyshell.a(clist.o)	    \
		  keyshell.a(chunk.o)	    \
		  keyshell.a(hierarchy.o)   \
		  keyshell.a(linklist.o)    \
		  keyshell.a(string2.o)	    \
		  keyshell.a(select.o)	    \
		  keyshell.a(quote.o)	    \
		  keyshell.a(buffer.o)	    \
		  keyshell.a(hpux_rel.o)

###############################################################################

keyshell.o    : keyshell.c string2.h kshhooks.h message.h debug.h \
		display.h keyboard.h edit.h word.h extents.h config.h \
		intrinsics.h translate.h global.h linklist.h hierarchy.h \
		chunk.h keyshell.h

global.o      : global.c string2.h message.h keyboard.h vi.h global.h \
		linklist.h hierarchy.h chunk.h display.h keyshell.h

translate.o   : translate.c

translate.c   : translate.y quote.h chunk.h linklist.h string2.h \
		message.h debug.h display.h edit.h extents.h translate.h \
		intrinsics.h global.h hierarchy.h keyboard.h kshhooks.h \
		keyshell.h

intrinsics.o  : intrinsics.c clist.h buffer.h string2.h chunk.h \
		linklist.h kshhooks.h message.h debug.h display.h edit.h \
		config.h translate.h code.h global.h hierarchy.h \
		keyboard.h keyshell.h

config.o      : config.c buffer.h quote.h string2.h linklist.h hierarchy.h \
		chunk.h message.h debug.h display.h config.h global.h \
		keyboard.h keyshell.h

extents.o     : extents.c string2.h message.h debug.h display.h keyboard.h \
		edit.h word.h extents.h config.h global.h linklist.h \
		hierarchy.h chunk.h keyshell.h

word.o	      : word.c string2.h debug.h display.h keyboard.h edit.h word.h \
		global.h linklist.h hierarchy.h chunk.h keyshell.h

edit.o	      : edit.c clist.h kshhooks.h debug.h display.h keyboard.h vi.h \
		emacs.h edit.h global.h linklist.h hierarchy.h chunk.h \
		keyshell.h

emacs.o	      : emacs.c clist.h display.h keyboard.h emacs.h edit.h \
		keyshell.h

vi.o	      : vi.c clist.h display.h keyboard.h vi.h edit.h keyshell.h

keyboard.o    : keyboard.c select.h clist.h kshhooks.h message.h debug.h \
		display.h keyboard.h vi.h edit.h global.h linklist.h \
		hierarchy.h chunk.h keyshell.h

display.o     : display.c buffer.h string2.h kshhooks.h debug.h display.h \
		keyboard.h vi.h edit.h global.h linklist.h hierarchy.h \
		chunk.h keyshell.h

message.o     : message.c message.h chunk.h linklist.h

clist.o	      : clist.c clist.h

chunk.o	      : chunk.c chunk.h linklist.h

hierarchy.o   : hierarchy.c hierarchy.h linklist.h

linklist.o    : linklist.c linklist.h

string2.o     : string2.c string2.h

select.o      : select.c select.h

quote.o	      : quote.c kshhooks.h keyshell.h

buffer.o      : buffer.c buffer.h

hpux_rel.o    : hpux_rel.c

##############################################################################

softkeys	: softkeys.cpp code.h
		   rm -f softkeys
		   /lib/cpp -A softkeys.cpp | ssp >softkeys
		   chmod =r softkeys

builtins	: builtins.cpp code.h
		   rm -f builtins
		   /lib/cpp -A builtins.cpp | ssp >builtins
		   chmod =r builtins

keysh.cat	: message.c message.h
		   findmsg message.c >keysh.msg
		   chmod =r keysh.msg
		   gencat keysh.cat keysh.msg

clean		:
		   rm -f keyshell.a keysh.msg
		   (cd KSH88; make -f MAKEFILE clobber)

clobber		: clean
		   rm -f keysh softkeys builtins keysh.cat
		   rm -rf KSH88

# copy /usr/bin/keysh to the . relative fileset KEYSHELL-RUN
# change mode, owner, and group on /usr/bin/keysh
# to 0555, bin, and bin
# change mode, owner, and group on all the parent
# directories.

install:	keysh
	mkdir -p ../../../../Filesets.sl/KEYSHELL-RUN/usr/bin
	! cp keysh ../../../../Filesets.sl/KEYSHELL-RUN/usr/bin
	! chmog 0555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/bin/keysh
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/bin
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/
# copy /usr/bin/keysh to the . relative fileset KEYSHELL-RUN
# change mode, owner, and group on /usr/bin/keysh
# to 0555, bin, and bin
# change mode, owner, and group on all the parent
# directories.
	mkdir -p ../../../../Filesets.sl/KEYSHELL-RUN/usr/bin
	! cp keysh ../../../../Filesets.sl/KEYSHELL-RUN/usr/bin/keysh
	! chmog 0555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/bin/keysh
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/bin
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/
	! chmog 555 bin bin ../../../../Filesets.sl/
# copy /usr/bin/keysh to the . relative fileset KEYSHELL-RUN
# change mode, owner, and group on /usr/bin/keysh
# to 0444, bin, and bin
# change mode, owner, and group on all the parent
# directories.
	mkdir -p ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C
	! cp help ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C/help
	! chmog 0444 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C/help
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/
	! chmog 555 bin bin ../../../../Filesets.sl/
# copy /usr/bin/keysh to the . relative fileset KEYSHELL-RUN
# change mode, owner, and group on /usr/bin/keysh
# to 0444, bin, and bin
# change mode, owner, and group on all the parent
# directories.
	mkdir -p ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C
	! cp keyshrc ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C/keyshrc
	! chmog 0444 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C/keyshrc
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/
	! chmog 555 bin bin ../../../../Filesets.sl/
# copy /usr/bin/keysh to the . relative fileset KEYSHELL-RUN
# change mode, owner, and group on /usr/bin/keysh
# to 0444, bin, and bin
# change mode, owner, and group on all the parent
# directories.
	mkdir -p ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C
	! cp softkeys ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C/softkeys
	! chmog 0444 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C/softkeys
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/C
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/
	! chmog 555 bin bin ../../../../Filesets.sl/
# copy /usr/bin/keysh to the . relative fileset KEYSHELL-RUN
# change mode, owner, and group on /usr/bin/keysh
# to 0444, bin, and bin
# change mode, owner, and group on all the parent
# directories.
	mkdir -p ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh
	! cp builtins ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/builtins
	! chmog 0444 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh/builtins
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/keysh
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/
	! chmog 555 bin bin ../../../../Filesets.sl/
# copy /usr/bin/keysh to the . relative fileset KEYSHELL-RUN
# change mode, owner, and group on /usr/bin/keysh
# to 0444, bin, and bin
# change mode, owner, and group on all the parent
# directories.
	mkdir -p ../../../../Filesets.sl/KEYSHELL-RUN/usr/lib/nls/C
	! cp keysh.cat ../../../../Filesets.sl/KEYSHELL-RUN/usr/lib/nls/C/keysh.cat
	! chmog 0444 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/lib/nls/C/keysh.cat
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/lib/nls/C
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/lib/nls/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/lib/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/usr/
	! chmog 555 bin bin ../../../../Filesets.sl/KEYSHELL-RUN/
	! chmog 555 bin bin ../../../../Filesets.sl/
