sane-project-backends/po/Makefile.in

132 wiersze
3.5 KiB
Makefile

# @configure_input@
#
# See po/README for documentation.
ALL_LINGUAS = bg cs de es fr it nl no pt ru sv
SRC_FILES = ../include/sane/saneopts.h ../backend/artec_eplus48u.c \
../backend/avision.h \
../backend/canon630u.c ../backend/epson.c ../backend/epson.h \
../backend/gt68xx.c ../backend/hp5400.c ../backend/leo.c ../backend/leo.h \
../backend/ma1509.c \
../backend/matsushita.c ../backend/matsushita.h ../backend/mustek.c \
../backend/microtek2.c ../backend/microtek2.h \
../backend/mustek_usb.c ../backend/plustek.c ../backend/plustek_pp.c \
../backend/pnm.c \
../backend/sceptre.c ../backend/sceptre.h ../backend/snapscan.c \
../backend/snapscan-options.c ../backend/teco1.c ../backend/teco1.h \
../backend/teco2.c ../backend/teco2.h ../backend/teco3.c \
../backend/teco3.h ../backend/test.c ../backend/umax1220u.c \
../backend/umax.c ../backend/umax_pp.c \
../backend/hp-option.h ../backend/hp-option.c
DISTFILES = Makefile.in README template.po \
$(foreach lang,$(ALL_LINGUAS),sane-backends.$(lang).po)
# End of configuration section
SHELL = /bin/sh
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
localedir = $(datadir)/locale
gnulocaledir = $(prefix)/share/locale
top_srcdir = @top_srcdir@
srcdir = @srcdir@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)
INSTALL_TRANSLATIONS = @INSTALL_TRANSLATIONS@
ifeq ($(INSTALL_TRANSLATIONS),install-translations)
UNINSTALL_TRANSLATIONS = uninstall-translations
ALL = all-mos
endif
MKDIR = $(top_srcdir)/mkinstalldirs
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
MSGMERGE = @MSGMERGE@
TMP_FILE_DIR = .tmp
DISTCLEAN_FILES = @DISTCLEAN_FILES@
.PHONY: all clean depend dist distclean install install-translations \
uninstall uninstall-translations all-mos update
all: $(ALL)
all-mos: $(foreach lang,$(ALL_LINGUAS),sane-backends.$(lang).mo)
%.mo: %.po
@echo "generating $@ from $^"
@$(MSGFMT) -o $@ $^
sane-backends.pot: $(SRC_FILES)
@echo "creating $@ from $^"
@rm -rf $(TMP_FILE_DIR)
@mkdir $(TMP_FILE_DIR) && \
for file in $^ ; do \
sed < $${file} -e 's/#define//g' \
> $(TMP_FILE_DIR)/`basename $${file}` ; \
done
@$(XGETTEXT) -dsane-backends -kSANE_I18N $(TMP_FILE_DIR)/*.*
@mv sane-backends.po sane-backends.pot
update: sane-backends.pot
@for lang in $(ALL_LINGUAS) ; do \
pofile=sane-backends.$${lang}.po ; \
if test ! -f $${pofile} ; then \
echo "creating $${pofile}" ; \
cp template.po $${pofile} ; \
fi ; \
echo "updating $${pofile}" ; \
cp $${pofile} $${pofile}.old ; \
$(MSGMERGE) $${pofile}.old $< -o $${pofile} ; \
rm -f $${pofile}.old ; \
done
install-translations:
@for lang in $(ALL_LINGUAS) ; do \
dir=$(gnulocaledir)/$${lang}/LC_MESSAGES ; \
echo "installing sane-backends.$${lang}.mo to $${dir}/sane-backends.mo..." ; \
$(MKDIR) $(DESTDIR)$${dir} && \
$(INSTALL_DATA) sane-backends.$${lang}.mo $(DESTDIR)$${dir}/sane-backends.mo ; \
done
install: $(INSTALL_TRANSLATIONS)
uninstall-translations:
@for lang in $(ALL_LINGUAS) ; do \
dir=$(gnulocaledir)/$${lang}/LC_MESSAGES ; \
echo removing $${dir}/sane-*.mo ; \
rm -f $${dir}/sane-*.mo ; \
done
uninstall: $(UNINSTALL_TRANSLATIONS)
clean:
rm -f *.mo
rm -f *.old
rm -f *.pot
distclean: clean
rm -f $(DISTCLEAN_FILES)
rm -f Makefile
rm -rf $(TMP_FILE_DIR)
depend:
dist: $(DISTFILES)
for file in $(DISTFILES); do \
ln $$file $(distdir)/po 2> /dev/null \
|| cp -p $$file $(distdir)/po ; \
done