#       BSDI Makefile,v 1.1.1.1 1992/02/14 05:29:45 trent Exp

PROG=	ksh
CFLAGS+=-I.

#
# Define the following to get Peter's history mechanism which
# allows multiple ksh sessions to share the same history file.
# This unfortunately disables multi-line edit history though...
#
# CFLAGS+=	-DCOMPLEX_HISTORY
CFLAGS+=	-DHAVE_CONFIG_H

SRCS=	alloc.c c_ksh.c c_sh.c c_test.c c_ulimit.c edit.c emacs.c \
	eval.c exec.c expr.c history.c io.c jobs.c lex.c mail.c \
	main.c misc.c missing.c path.c shf.c sigact.c syn.c table.c trap.c \
	tree.c tty.c var.c version.c vi.c

siglist.out: config.h sh.h siglist.in siglist.sh
	${.CURDIR}/siglist.sh "$(CPP) $(CPPFLAGS) $(DEFS) -I. -I${.CURDIR}" < ${.CURDIR}/siglist.in > tmpsiglist.out
	mv tmpsiglist.out siglist.out

.depend trap.o:	siglist.out

CLEANFILES+=siglist.out

afterinstall:
	rm -f ${DESTDIR}/bin/ksh
	ln -s ../usr/contrib/bin/ksh ${DESTDIR}/bin/ksh

.include <bsd.prog.mk>
