#
# Copyright (c) 1992 Jill Kliger and Wesley Craig.  All Rights Reserved.
#

# BINDIR is where the vilearn shell script will live. It should be in the
# path of new users.
BINDIR=	/usr/local/bin

# MANDIR is the man area where vilearn's man page will be installed. It
# should be somewhere that the default man command will search.

MANDIR=	/usr/local/man

# SEC is the section of the manual that vilearn's man page will be
# installed in.

SEC=	1

# TUTORIALS is the directory where the master copies of the tutorials
# will live.
TUTORIALS=	/usr/local/lib/vilearn

# Shouldn't have to edit below here.

TUTS=	1basics 2moving 3cutpaste 3temp 4inserting 5tricks

all : vilearn vilearn.${SEC}

vilearn : vilearn.sh
	sed -e s@:TUTORIALS:@${TUTORIALS}@ < vilearn.sh > vilearn

vilearn.${SEC} : vilearn.man
	sed -e s@:SEC:@${SEC}@ < vilearn.man > vilearn.${SEC}

install : all
	-mkdir ${TUTORIALS}
	for i in ${TUTS} ; do \
	    rm -f ${TUTORIALS}/$$i; \
	    install -c -m 444 $$i ${TUTORIALS}/$$i ; \
	done
	install -m 755 vilearn ${BINDIR}/vilearn
	install -m 444 vilearn.${SEC} ${MANDIR}/man${SEC}/vilearn.${SEC}

clean :
	rm -f vilearn vilearn.${SEC}
