2011-04-26 21:39:44 +02:00
|
|
|
# Makefile for autospec
|
|
|
|
# Copyright (C) 2008 by Davide Madrisan <davide.madrisan@gmail.com>
|
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify it under
|
|
|
|
# the terms of version 2 of the GNU General Public License as published by the
|
|
|
|
# Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY, to the extent permitted by law; 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.,
|
|
|
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
srcdir = ../..
|
|
|
|
|
|
|
|
include $(srcdir)/Makefile.env
|
|
|
|
|
2012-11-25 15:54:34 +01:00
|
|
|
pck_catalogs_tmpl := autospec_fe.pot \
|
|
|
|
config-getvar.pot \
|
|
|
|
libapse.pot \
|
|
|
|
libcfg.pot \
|
|
|
|
libmsgmng.pot \
|
|
|
|
libnetwork.pot \
|
|
|
|
libspec.pot \
|
|
|
|
libtest.pot \
|
|
|
|
pck-extract.pot \
|
|
|
|
pck-update.pot \
|
|
|
|
spec-create.pot \
|
|
|
|
test00_specsyntax.pot \
|
|
|
|
test01_pkgquality.pot \
|
|
|
|
test02_pkgsecurity.pot
|
2011-04-26 21:39:44 +02:00
|
|
|
|
2012-11-25 17:16:42 +01:00
|
|
|
pck_catalog_tmpl := $(PACKAGE).pot
|
|
|
|
pck_catalog := $(PACKAGE).po
|
|
|
|
|
2011-04-26 21:39:44 +02:00
|
|
|
LANG=it
|
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
.SUFFIXES: .po .mo .in
|
|
|
|
.po.mo:; @echo "Generating binary message catalog '$@'..."; \
|
|
|
|
msgfmt $< -o $@
|
|
|
|
|
|
|
|
all: locales
|
|
|
|
|
2012-11-23 23:17:17 +01:00
|
|
|
pck_manpages :=
|
|
|
|
|
2012-11-25 15:54:34 +01:00
|
|
|
merge-pot-files: $(patsubst %,$(srcdir)/po/%,$(pck_catalogs_tmpl))
|
2012-11-27 23:42:25 +01:00
|
|
|
@echo -n "Creating global pot file: $(pck_catalog_tmpl)... "
|
|
|
|
@/bin/cat $(patsubst %,$(srcdir)/po/%,$(pck_catalogs_tmpl)) \
|
2012-11-25 15:54:34 +01:00
|
|
|
> $(srcdir)/po/$(PACKAGE)-all.pot;\
|
2012-11-27 23:42:25 +01:00
|
|
|
/usr/bin/msguniq \
|
|
|
|
--use-first --no-location --no-wrap --to-code=UTF-8 \
|
2012-11-25 15:54:34 +01:00
|
|
|
$(srcdir)/po/$(PACKAGE)-all.pot \
|
2012-11-25 17:16:42 +01:00
|
|
|
-o $(srcdir)/po/$(pck_catalog_tmpl) && \
|
2012-11-27 23:42:25 +01:00
|
|
|
echo "[DONE]" || { echo "[FAILED]"; exit 1; }
|
2012-11-22 22:40:21 +01:00
|
|
|
|
2012-11-25 15:54:34 +01:00
|
|
|
locales: merge-pot-files
|
2012-11-27 23:42:25 +01:00
|
|
|
@echo -n "Generating global locale: $(pck_catalog)... "
|
|
|
|
@/usr/bin/msgmerge --quiet \
|
|
|
|
--update --no-fuzzy-matching --indent \
|
2012-11-25 17:16:42 +01:00
|
|
|
$(pck_catalog) \
|
|
|
|
$(srcdir)/po/$(pck_catalog_tmpl) && \
|
2012-11-27 23:42:25 +01:00
|
|
|
echo "[DONE]" || { echo "[FAILED]"; exit 1; }
|
|
|
|
@echo -n "Checking $(pck_catalog) for untranslated strings... "
|
2024-02-08 17:32:11 +01:00
|
|
|
@/bin/grep -q 'msgstr[ \t]*""' $(pck_catalog) && \
|
|
|
|
{ echo "[UNTRANSLATED STRING]"; exit 1; } || \
|
2012-11-27 19:21:10 +01:00
|
|
|
echo "[NONE]"
|
2012-11-23 23:17:17 +01:00
|
|
|
|
2012-11-25 17:16:42 +01:00
|
|
|
install: $(pck_catalog:.po=.mo)
|
2011-04-26 21:39:44 +02:00
|
|
|
@destdir="$(DESTDIR)$(localedir)/$(LANG)/LC_MESSAGES";\
|
|
|
|
$(INSTALL_DIR) $$destdir;\
|
2012-11-25 15:54:34 +01:00
|
|
|
$(INSTALL_DATA) $(PACKAGE).mo $$destdir/$(PACKAGE).mo
|
2011-04-26 21:39:44 +02:00
|
|
|
|
|
|
|
uninstall:
|
2012-11-25 16:39:12 +01:00
|
|
|
rm -f $(DESTDIR)$(localedir)/$(LANG)/LC_MESSAGES/$(PACKAGE).mo
|
2011-04-26 21:39:44 +02:00
|
|
|
|
|
|
|
clean:
|
2012-11-25 16:39:12 +01:00
|
|
|
rm -f $(PACKAGE).mo
|
|
|
|
rm -f $(srcdir)/po/*.pot
|
2012-11-22 22:40:21 +01:00
|
|
|
rm -f *.po~
|