1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-26 00:12:31 +01:00
Files
wmaker/util/po/Makefile.am
Christophe CURIS 2cfb2b5276 configure: rewrote detection for 'xgettext'
The main change is to use Autoconf's syntax for consistency;

Now the detected program is used in the makefiles (user has the possibility
to change the name of the command);

A conditional is used to avoid enabling make targets that would fail if
the command does not exist.

Took opportunity to implement the silent-rules compliance to POT generation
rules.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00

45 lines
932 B
Makefile

DOMAIN = wmgenmenu
CATALOGS = @UTILMOFILES@
nlsdir = $(NLSDIR)
CLEANFILES = $(DOMAIN).pot $(CATALOGS)
EXTRA_DIST = de.po es.po fr.po nl.po pt.po
POTFILES = \
$(top_srcdir)/util/wmgenmenu.c \
$(top_srcdir)/util/wmgenmenu.h
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
all-local: $(CATALOGS)
if HAVE_XGETTEXT
$(DOMAIN).pot: $(POTFILES)
$(AM_V_GEN)$(XGETTEXT) --default-domain=$(DOMAIN) \
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
@if cmp -s $(DOMAIN).po $(DOMAIN).pot; then \
rm -f $(DOMAIN).po; \
else \
mv -f $(DOMAIN).po $(DOMAIN).pot; \
fi
endif
install-data-local: $(CATALOGS)
$(mkinstalldirs) $(DESTDIR)$(nlsdir)
for n in $(CATALOGS) __DuMmY ; do \
if test "$$n" -a "$$n" != "__DuMmY" ; then \
l=`basename $$n .mo`; \
$(mkinstalldirs) $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/$(DOMAIN).mo; \
fi; \
done