#
# Copyright (C) 1996 Ken MacLeod
# See the file COPYING for distribution terms.
#
# $Id: Makefile.in,v 1.4 1997/11/23 21:04:32 cg Exp $
#

SHELL = /bin/sh

PACKAGE=@PACKAGE@
VERSION=@VERSION@

prefix=@prefix@
exec_prefix=@exec_prefix@

datadir=@datadir@
docdir=@docdir@
sgmldir=@sgmldir@
isoentdir=@isoentdir@

srcdir=@srcdir@
VPATH=@srcdir@

@SET_MAKE@

INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
SED=@SED@
PERL5=@PERL5@

DOCS = \
  COPYING \
  README
  

.SUFFIXES:
.SUFFIXES: .pl .sgml

all:

install: all installdirs
	${INSTALL_DATA} iso-entities.cat ${isoentdir}/iso-entities.cat
	for ii in `cd entities; find . -type f`; do \
	  ${INSTALL_DATA} entities/$$ii ${isoentdir}/$$ii; \
	done

installdirs:
	for ii in ${sgmldir} ${isoentdir}; do \
	  ./config/install-sh -d $$ii; \
	done

installdoc:
	./config/install-sh -d ${docdir}
	for ii in ${DOCS}; do \
	  ${INSTALL_DATA} $$ii ${docdir}/$$ii; \
	done

Makefile: Makefile.in configure
	./configure

configure: configure.in
	autoconf

check:
	@echo "no checks available"

clean:
	${RM} make-dist MANIFEST.bak
	${RM} *~

realclean: clean

distclean: clean
	${RM} config.cache config.log config.status

maintainerclean: distclean
	${RM} Makefile configure

dist: distclean make-dist
	cd ${srcdir}; ./make-dist

SEDPL= \
  -e's;\@PACKAGE\@;${PACKAGE};' \
  -e's;\@VERSION\@;${VERSION};' \
  -e's;\@PERL5\@;${PERL5};'

.pl:
	${RM} $@
	${SED} ${SEDPL} <$< >$@ || (${RM} $@; exit 1)
	chmod +x $@
