## This Makefile compiles and installs language catalogs for Sympa

## Installation directory for catalogues
## Needs to match the MSGCAT field in sympa.conf
DIR	=	/home/sympa/nls

## Available catalogues (languages)
CAT	=	fr us es de it cn-gb cn-big5

## Path to gencat program (creates the .cat catalog file using the .msg)
GENCAT	= 	/usr/bin/gencat

##---------- STOP ---------- STOP ---------- STOP ---------- STOP ----------
##
## You should NOT be modifying what follows


all:	
	@for c in $(CAT); do \
                echo generating catalog $$c; \
		rm -f $$c.cat; \
                $(GENCAT) $$c.cat $$c.msg; \
        done


clean:
	rm -f *.cat

install: makedir 
	@for c in $(CAT); do \
		echo "Installing catalog...$(DIR)/$$c.cat"; \
		cp $$c.cat $(DIR); \
	done
makedir:
	@if [ ! -d $(DIR) ]; then \
		echo "Creating required directory $(DIR)"; \
		mkdir $(DIR); \
	fi
