1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-26 08:22:37 +01:00
Files
wmaker/util/po/Makefile.am
Christophe CURIS 740c812476 make: remove installed translations when performing Uninstall
When support for translated languages was enabled, the localisation files
were installed, but make uninstall did not take care to remove them. This
patch fixes this by properly removing them.

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

49 lines
1.1 KiB
Makefile

DOMAIN = wmgenmenu
CATALOGS = @UTILMOFILES@
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:
$(AM_V_GEN)$(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)$(localedir)
for n in $(CATALOGS) __DuMmY ; do \
if test "$$n" -a "$$n" != "__DuMmY" ; then \
l=`basename $$n .mo`; \
$(mkinstalldirs) $(DESTDIR)$(localedir)/$$l/LC_MESSAGES; \
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(localedir)/$$l/LC_MESSAGES/$(DOMAIN).mo; \
fi; \
done
uninstall-local:
for n in $(CATALOGS) ; do \
l=`basename $$n .mo`; \
rm -f $(DESTDIR)$(localedir)/$$l/LC_MESSAGES/$(DOMAIN).mo; \
done