# $Id: Makefile.in,v 1.6.2.1 2001/01/16 21:12:30 hno Exp $
#
prefix		= @prefix@
exec_prefix	= @exec_prefix@
top_srcdir	= @top_srcdir@
bindir		= @bindir@
libexecdir      = @libexecdir@
sysconfdir	= @sysconfdir@
localstatedir   = @localstatedir@
srcdir		= @srcdir@
VPATH		= @srcdir@
SH		= @SH@
RM		= @RM@
SHELL		= @SH@

INSTALL         	= @INSTALL@
INSTALL_FILE    	= @INSTALL_DATA@
DEFAULT_ERROR_DIR	= $(sysconfdir)/errors

LANGUAGE		= @ERR_LANGUAGE@

all:

install: install-mkdirs
	@for f in $(srcdir)/$(LANGUAGE)/ERR_*; do \
		if test -f $(DEFAULT_ERROR_DIR)/$$f ; then \
			:; \
		else \
			echo "$(INSTALL_FILE) $$f $(DEFAULT_ERROR_DIR)"; \
			$(INSTALL_FILE) $$f $(DEFAULT_ERROR_DIR); \
		fi; \
	done

install-mkdirs:
	-@if test ! -d $(prefix); then \
		echo "mkdir $(prefix)"; \
		mkdir -p $(prefix); \
	fi
	-@if test ! -d $(sysconfdir); then \
		echo "mkdir $(sysconfdir)"; \
		mkdir -p $(sysconfdir); \
	fi
	-@if test ! -d $(DEFAULT_ERROR_DIR); then \
		echo "mkdir $(DEFAULT_ERROR_DIR)"; \
		mkdir -p $(DEFAULT_ERROR_DIR); \
	fi

# undocumented hack.  You can use this target to create multi-lingual
# error pages.  For example:
#
#	make ADDLANG=English addlang
#
# by Andres Kroonmaa <andre@mail.lbi.ee>
#
addlang: all
	-@if test -d $(srcdir)/$(ADDLANG); then \
	cd $(srcdir)/$(ADDLANG)/ ; \
	for f in ERR_*; do \
		if test -f $(DEFAULT_ERROR_DIR)/$$f ; then \
			echo "appending $(ADDLANG)/$$f"; \
			echo "<HR>" >> $(DEFAULT_ERROR_DIR)/$$f ; \
			cat $$f >> $(DEFAULT_ERROR_DIR)/$$f; \
		fi; \
	done; \
	fi

clean:

distclean: clean
	-rm -f Makefile
