mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-14 06:15:46 +01:00
7fe50fb4fa
Fix make without NLS support.
88 lines
1.9 KiB
Makefile
88 lines
1.9 KiB
Makefile
POFILES = ja.po
|
|
|
|
DOMAIN = alsaconf
|
|
GETTEXT_SRC = ../alsaconf.in
|
|
|
|
XGETTEXT_OPTIONS = -kxmsg -kxecho
|
|
|
|
top_builddir = ../..
|
|
|
|
datadir = @datadir@
|
|
exec_prefix = @exec_prefix@
|
|
prefix = @prefix@
|
|
localedir = $(datadir)/locale
|
|
|
|
USE_NLS = @USE_NLS@
|
|
INSTALL = @INSTALL@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
# mkdir_p = @mkdir_p@
|
|
mkdir_p = mkdir -p --
|
|
XGETTEXT = @XGETTEXT@
|
|
MSGFMT = @MSGFMT@
|
|
GMSGFMT = @GMSGFMT@
|
|
MSGMERGE = @MSGMERGE@
|
|
MSGMERGE_UPDATE = @MSGMERGE@ --update
|
|
|
|
DISTFILES = $(POFILES) Makefile.in
|
|
CATALOGS = $(POFILES:.po=.gmo)
|
|
|
|
all: all-@USE_NLS@
|
|
|
|
all-yes: $(CATALOGS)
|
|
all-no:
|
|
|
|
.SUFFIXES: .po .gmo .mo
|
|
|
|
.po.mo:
|
|
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
|
|
|
|
.po.gmo:
|
|
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
|
rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
|
|
|
|
$(DOMAIN).pot: $(GETTEXT_SRC)
|
|
$(XGETTEXT) -o$@ --default-domain=$(DOMAIN) \
|
|
--add-comments=TRANSLATORS: --language=Shell \
|
|
$(XGETTEXT_OPTIONS) $<
|
|
|
|
clean:
|
|
rm -f $(CATALOGS) $(POFILES:.po=.mo) $(DOMAIN).pot
|
|
|
|
update-po: $(DOMAIN).pot
|
|
@for po in $(POFILES); do \
|
|
$(MSGMERGE_UPDATE) $$po $(DOMAIN).pot; \
|
|
done
|
|
|
|
install-data-no:
|
|
install-data-yes: all
|
|
$(mkdir_p) $(DESTDIR)$(datadir)
|
|
@catalogs='$(CATALOGS)'; \
|
|
for cat in $$catalogs; do \
|
|
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
|
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
|
$(mkdir_p) $(DESTDIR)$$dir; \
|
|
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(DOMAIN).mo; \
|
|
done
|
|
|
|
install-data: install-data-@USE_NLS@
|
|
install: install-data
|
|
|
|
uninstall-data-no:
|
|
uninstall-data-yes:
|
|
@catalogs='$(CATALOGS)'; \
|
|
for cat in $$catalogs; do \
|
|
cat=`basename $$cat`; \
|
|
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
|
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo; \
|
|
done
|
|
|
|
uninstall-data: uninstall-data-@USE_NLS@
|
|
uninstall: uninstall-data
|
|
|
|
dist distdir: $(DISTFILES)
|
|
@for file in $(DISTFILES); do \
|
|
cp -p $$file $(distdir); \
|
|
done
|
|
|
|
distclean: clean
|
|
rm -f Makefile *~
|