# Altered by Unix TeX
# to make only the programs dviselect and dviconcat
# as well as that portion of the MC-TeX's User's Guide
# that covers the use of those programs.
#
# The original Makefile has been retained as Makefile.orig.
#
# Copyright (c) 1987, 1989 University of Maryland
# Department of Computer Science.  All rights reserved.
# Permission to copy for any purpose is hereby granted
# so long as this copyright notice remains intact.
#
# Makefile for MC-TeX V3: dviselect and dviconcat
#

SHELL=	/bin/sh
MAKE=	make
MFLAGS=

# where things get installed
PREFIX= /usr/local
BINDIR=	$(PREFIX)/bin
LIBDIR=	$(PREFIX)/lib/texmf

# TeX and LaTeX input directories.
# Both might be `${LIBDIR}/inputs', or not.
TEXDIR=	${LIBDIR}/tex/plain
LATEXDIR=${LIBDIR}/tex/latex

# where manuals get installed---note that `/man1' is tacked on
# for section 1 manuals, etc.
MANDIR=	$(PREFIX)/man

# how to install binaries
# on 4BSD, you can use `install'; if not, see misc/bsdinstall.sh
# or use /usr/ucb/install.
INSTALL=install

# The subdirectories.  N.B.: "lib" must appear first! (aside from doc)
SUBDIR=	doc lib dvi

OPTS=	MFLAGS="${MFLAGS}" \
	BINDIR=${BINDIR} LIBDIR=${LIBDIR} MANDIR=${MANDIR} \
	TEXDIR=${TEXDIR} LATEXDIR=${LATEXDIR} TEXTFM=${TEXTFM} \
	INSTALL="${INSTALL}" FONTDESC=${FONTDESC} \
	CC=${CC} ${MFLAGS}

all:
	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${OPTS}); done

install clean cleandir depend lint:
	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${OPTS} $@); done
