# file: src/common/lib/locale/es_ES/Makefile
#
#  2001 OpenCA Group

TOP	= ../../../../..
include $(TOP)/Makefile.global-vars

DEST_CGI_LIBDIR	= ${lib_prefix}/locale/es_ES/LC_MESSAGES

LIBS	= \
	openca.mo

DEST_LIBS	= $(LIBS:%=$(DEST_CGI_LIBDIR)/%)

#---- variable settings above, rules below ----

.PHONY:	default install clean distclean

default::

.SUFFIXES: .mo .po

.po.mo:
	msgfmt -o $@ $<

# openca.mo: openca.po

# openca-html.mo: openca-html.po

language::	$(LIBS) openca-html.mo
	@if [ -d LC_MESSAGES ]; then \
		echo "LC_MESSAGES already exists, skipping"; \
	else \
		set -x; \
		$(MKDIR) LC_MESSAGES; \
	fi
	$(CP) *.mo LC_MESSAGES

install::	$(DEST_LIBS)

$(DEST_CGI_LIBDIR):
	@if [ -d $@ ]; then \
		echo "$@ already exists, skipping"; \
	else \
		set -x; \
		$(MKDIR) $@; \
	fi

$(DEST_LIBS)::	$(DEST_CGI_LIBDIR) $(LIBS)
$(DEST_LIBS)::
		$(INSTALL) -o ${openca_user} -g ${openca_group} -m 644 $(@:$(DEST_CGI_LIBDIR)/%=%) $@

distclean::
		#$(RM)
