#=======================================================================
# Copyright (C) 2000-2004 Daniele Giacomini daniele@swlibero.org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=======================================================================

#-----------------------------------------------------------------------
# Create PO file.
#-----------------------------------------------------------------------
create:
	alml-extra --perl-to-gettext < ../bin/alml > ../bin/alml~
	alml-extra --perl-to-gettext < ../bin/alml-sp2sp > ../bin/alml-sp2sp~
	alml-extra --perl-to-gettext < ../bin/alml-sp2be > ../bin/alml-sp2be~
	alml-extra --perl-to-gettext < ../bin/alml-extra > ../bin/alml-extra~
	xgettext ../bin/alml~		\
	          ../bin/alml-sp2sp~	\
	          ../bin/alml-sp2be~	\
	          ../bin/alml-extra~

#-----------------------------------------------------------------------
# Join PO files.
#-----------------------------------------------------------------------
update: create
	@mv it.po it.po.orig				; \
	msgmerge it.po.orig messages.po > it.po

#-----------------------------------------------------------------------
# Compile MO files.
#-----------------------------------------------------------------------
compile:
	@mkdir /tmp/alml				; \
	mkdir /tmp/alml/it				; \
	msgfmt -vvvv -o /tmp/alml/it/alml.mo it.po

