This repository has been archived on 2024-03-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
kpasman/po/Makefile.am
2014-11-26 08:33:20 -06:00

70 lines
1.4 KiB
Makefile

####### kdevelop will overwrite this part!!! (begin)##########
POFILES =
####### kdevelop will overwrite this part!!! (end)############
GMOFILES = $(POFILES:.po=.gmo)
localedir = $(kde_locale)
MAINTAINERCLEANFILES = $(GMOFILES)
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
EXTRA_DIST = $(PACKAGE).pot $(POFILES) $(GMOFILES)
all: all-@USE_NLS@
install-data-local: install-@USE_NLS@
SUFFIXES = .po .gmo
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
all-yes: $(GMOFILES)
all-no:
install-yes: all
@catalogs='$(GMOFILES)'; \
for cat in $$catalogs; do \
destdir=$(localedir); \
lang=`echo $$cat | sed 's/\.gmo//'`; \
name=$(PACKAGE).mo \
dir=$$destdir/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $$dir; \
$(INSTALL_DATA) $$cat $$dir/$$name; \
echo "installing $$cat as $$dir/$$name"; \
done
install-no:
uninstall-local:
@catalogs='$(GMOFILES)'; \
for cat in $$catalogs; do \
destdir=$(localedir); \
lang=`echo $$cat | sed 's/\.gmo//'`; \
name=$(PACKAGE).mo; \
dir=$$destdir/$$lang/LC_MESSAGES; \
rm -f $$cat $$dir/$$name; \
echo "removing $$dir/$$name" ; \
done
merge:
@catalogs='$(POFILES)'; \
for cat in $$catalogs; do \
name=$(PACKAGE).pot ; \
echo $$cat $$name; \
msgmerge $$cat $$name > $$cat.new ; \
if diff $$cat $$cat.new; then \
rm $$cat.new; \
else \
mv $$cat.new $$cat ; \
fi; \
done