#
# Makefile for http-analyze message catalogs
#
# $Id: Makefile,v 1.10 1999/11/02 11:06:55 stefan Exp $
#

# Shell to use for executing commands by make.
SHELL	= /bin/sh

# Available message catalogs
MSGLIST = en en_US de de_BY it fr pt_BR

# XPG/4 message catalogs
# Uses string source files, needs explicit name of
# the locale directory to install the catalogs.
#
LOCALE = /usr/lib/locale
MSGNAM = LC_MESSAGES/http-analyze
MSGSTR = ha-en.str ha-en_US.str ha-de.str ha-de_BY.str ha-it.str \
	 ha-fr.str ha-pt_BR.str

# SVR4 MNLS message catalogs
# Needs temporary '.cat' file generated by gen-msgcat,
# automatically selects corresponding locale directory.
#
MSGCAT = ha-en.cat ha-en_US.cat ha-de.cat ha-de_BY.cat ha-it.cat \
	 ha-fr.cat ha-pt_BR.cat

# Built-in MNLS message catalogs
# Needs SVR4-style catalog file, places them into `HA_LIBDIR'.
HA_LIBDIR = /usr/local/lib/http-analyze

# ----------------- end of config section --------------------

.SUFFIXES: .str .cat
.str.cat:
	perl gen-msgcat $? >$@

TARGET	= xpgcat

all:	$(TARGET)

xpgcat:	$(MSGSTR)
	for idx in $(MSGLIST); do \
	gencat $(LOCALE)/$$idx/$(MSGNAM) ha-$$idx.str; done
	@touch $@

svr4cat: $(MSGCAT)
	for idx in $(MSGLIST); do \
	mkmsgs -o -i $$idx ha-$$idx.cat http-analyze; done
	@touch $@

mycat: $(MSGCAT)
	test -d $(HA_LIBDIR)/msgcat || mkdir $(HA_LIBDIR)/msgcat
	cp $(MSGCAT) $(HA_LIBDIR)/msgcat
	@touch $@

clean:
	-rm -f $(MSGCAT) xpgcat svr4cat mycat

