# $Id: Makefile.in,v 1.10 1995/09/03 00:12:36 duane Exp $
#
#  Makefile for the SGML summarizers for the Essence system.
#
prefix = @prefix@
INSTALL_BINDIR	= $(prefix)/bin
INSTALL_LIBDIR	= $(prefix)/lib
INSTALL_UTILDIR	= $(prefix)/lib/gatherer
INSTALL_MANDIR 	= $(prefix)/man

INSTALL		= @INSTALL@
INSTALL_BIN 	= @INSTALL_PROGRAM@
INSTALL_FILE 	= @INSTALL_DATA@

SCRIPTS		= RTF.sum MIF.sum

SGMLS_LIB_FILES	= Rainbow.decl Rainbow.dtd Rainbow.sum.tbl rbwents.sgml
SGMLS_LIBDIR	= $(INSTALL_UTILDIR)/sgmls-lib/Rainbow

all clean:

install:	all
	if test ! -d $(SGMLS_LIBDIR); then \
		mkdir $(SGMLS_LIBDIR); \
	fi
	@for f in $(SCRIPTS); do \
		echo $(INSTALL_BIN) $$f $(INSTALL_UTILDIR)/$$f; \
		$(INSTALL_BIN) $$f $(INSTALL_UTILDIR)/$$f; \
	done
	@for f in $(SGMLS_LIB_FILES); do \
		echo $(INSTALL_FILE) $$f $(SGMLS_LIBDIR)/$$f; \
		$(INSTALL_FILE) $$f $(SGMLS_LIBDIR)/$$f; \
	done
	if test -r rbmaker/rbmaker.`uname -sr | sed -e 's/ /_/g'`; then \
		$(INSTALL_BIN) rbmaker/rbmaker.`uname -sr | sed -e 's/ /_/g'` $(INSTALL_UTILDIR)/rbmaker; \
		cp -rp rbmaker.dat $(INSTALL_UTILDIR); \
	else \
		echo "Cannot install rbmaker binary"; \
	fi;
