2002-01-08 19:49:16 +00:00
|
|
|
# po/Makefile.in
|
2002-01-09 23:45:01 +00:00
|
|
|
# See po/README for documentation.
|
2002-01-24 20:19:48 +00:00
|
|
|
SHELL = /bin/sh
|
2002-01-21 21:51:43 +00:00
|
|
|
all: check-mo
|
2002-01-07 22:13:09 +00:00
|
|
|
|
2002-01-08 19:49:16 +00:00
|
|
|
# Create one line per backend with all files containing translatable text:
|
2002-02-09 15:03:07 +00:00
|
|
|
epson.*.po: ../backend/epson.c ../backend/epson.h
|
2002-03-06 23:54:26 +00:00
|
|
|
matsushita.*.po: ../backend/matsushita.c ../backend/matsushita.h
|
2002-01-09 23:45:01 +00:00
|
|
|
mustek.*.po: ../backend/mustek.c
|
|
|
|
mustek_usb.*.po: ../backend/mustek_usb.c
|
2002-01-15 23:55:36 +00:00
|
|
|
plustek.*.po: ../backend/plustek.c ../backend/plustek.h
|
2002-01-09 23:45:01 +00:00
|
|
|
pnm.*.po: ../backend/pnm.c
|
|
|
|
umax.*.po: ../backend/umax.c
|
2002-03-15 16:25:44 +00:00
|
|
|
umax_pp.*.po: ../backend/umax_pp.c
|
2002-02-21 18:55:54 +00:00
|
|
|
sceptre.*.po: ../backend/sceptre.c ../backend/sceptre.h
|
2002-02-09 15:03:07 +00:00
|
|
|
snapscan.*.po: ../backend/snapscan.c
|
2002-01-07 22:13:09 +00:00
|
|
|
|
|
|
|
# end of configuration
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
datadir = @datadir@
|
|
|
|
localedir = $(datadir)/locale
|
|
|
|
gnulocaledir = $(prefix)/share/locale
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
|
2002-01-08 19:06:54 +00:00
|
|
|
PACKAGE = @PACKAGE@
|
|
|
|
VERSION = @VERSION@
|
|
|
|
distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)
|
|
|
|
|
2002-01-21 21:51:43 +00:00
|
|
|
INSTALL_TRANSLATIONS = @INSTALL_TRANSLATIONS@
|
|
|
|
ifeq ($(INSTALL_TRANSLATIONS),install-translations)
|
|
|
|
UNINSTALL_TRANSLATIONS = uninstall-translations
|
|
|
|
UPDATE_MO = update-mo
|
|
|
|
endif
|
|
|
|
|
2002-01-07 22:13:09 +00:00
|
|
|
MKDIR = $(top_srcdir)/mkinstalldirs
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
|
2002-01-09 23:45:01 +00:00
|
|
|
MSGFMT = msgfmt
|
|
|
|
XGETTEXT = xgettext
|
|
|
|
MSGMERGE = msgmerge
|
|
|
|
|
2002-01-07 22:13:09 +00:00
|
|
|
TMP_FILE_DIR = .tmp
|
2002-01-09 23:45:01 +00:00
|
|
|
|
|
|
|
ALL_POS = $(wildcard *.po)
|
|
|
|
ALL_BACKENDS = $(sort $(basename $(basename $(ALL_POS))))
|
|
|
|
ALL_POTS = $(addsuffix .pot,$(ALL_BACKENDS))
|
2002-01-19 20:42:17 +00:00
|
|
|
ALL_MOS = $(filter-out saneopts.%.mo,$(addsuffix .mo,$(basename $(ALL_POS))))
|
2002-01-09 23:45:01 +00:00
|
|
|
ALL_LINGUAS = $(sort $(subst .,,$(suffix $(basename $(ALL_POS)))))
|
2002-01-07 22:13:09 +00:00
|
|
|
|
2002-02-13 20:48:29 +00:00
|
|
|
DISTCLEAN_FILES = @DISTCLEAN_FILES@
|
|
|
|
|
2002-03-06 23:54:26 +00:00
|
|
|
DISTFILES = Makefile.in README epson.de.po mustek.de.po matsushita.fr.po \
|
2002-03-10 13:14:30 +00:00
|
|
|
mustek_usb.de.po plustek.de.po plustek.es.po pnm.de.po \
|
|
|
|
saneopts.de.po saneopts.fr.po saneopts.es.po \
|
2002-03-15 16:25:44 +00:00
|
|
|
sceptre.fr.po umax.de.po umax.fr.po umax_pp.fr.po snapscan.de.po
|
2002-01-08 19:06:54 +00:00
|
|
|
|
|
|
|
.PHONY: all clean depend dist distclean install install-translations \
|
2002-01-09 23:45:01 +00:00
|
|
|
uninstall update-mo update-po generate-%
|
2002-01-08 19:06:54 +00:00
|
|
|
|
2002-01-07 22:13:09 +00:00
|
|
|
.SUFFIXES: .po .mo
|
|
|
|
|
2002-01-21 21:51:43 +00:00
|
|
|
saneopts.*.po: ../include/sane/saneopts.h
|
|
|
|
|
2002-01-09 23:45:01 +00:00
|
|
|
# backend.lang.po -> backend.lang.mo
|
2002-01-07 22:13:09 +00:00
|
|
|
.po.mo:
|
2002-01-19 20:42:17 +00:00
|
|
|
@lang=$(subst .,,$(suffix $(basename $(subst install-,,$@)))) ; \
|
|
|
|
echo generating $@ from $< and saneopts.$${lang}.po ; \
|
|
|
|
$(MSGFMT) -o $@ $< saneopts.$${lang}.po
|
2002-01-07 22:13:09 +00:00
|
|
|
|
2002-01-09 23:45:01 +00:00
|
|
|
# Sourcefiles -> backend.lang.po (updating po)
|
2002-01-19 20:42:17 +00:00
|
|
|
$(foreach lang,$(ALL_LINGUAS),%.$(lang).po):
|
2002-01-09 23:45:01 +00:00
|
|
|
@echo -n "updating $@ from $^ "
|
2002-01-07 22:13:09 +00:00
|
|
|
@rm -rf $(TMP_FILE_DIR)
|
|
|
|
@mkdir $(TMP_FILE_DIR) && \
|
|
|
|
for file in $^ ; do \
|
|
|
|
sed < $${file} -e 's/#define//g' \
|
2002-01-09 23:45:01 +00:00
|
|
|
> $(TMP_FILE_DIR)/`basename $${file}` ; \
|
|
|
|
done
|
|
|
|
@$(XGETTEXT) -d$* -kSANE_I18N $(TMP_FILE_DIR)/*.*
|
|
|
|
@mv $*.po $*.pot
|
|
|
|
@cp $@ $@.old
|
|
|
|
@$(MSGMERGE) $@.old $*.pot -o $@
|
|
|
|
@rm -f $@.old
|
|
|
|
|
|
|
|
# Generate new po file
|
|
|
|
%-gen:
|
|
|
|
@if test ! -e $* ; then \
|
|
|
|
touch $* -d "1980-01-01" ; \
|
|
|
|
echo created new file: $* ; \
|
|
|
|
$(MAKE) $* ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
update-po: $(ALL_POS)
|
|
|
|
|
|
|
|
update-mo: $(ALL_MOS)
|
|
|
|
|
2002-01-21 21:51:43 +00:00
|
|
|
check-mo: $(UPDATE_MO)
|
|
|
|
|
2002-01-09 23:45:01 +00:00
|
|
|
$(addprefix install-,$(ALL_MOS)):
|
|
|
|
@mo_file=$(subst install-,,$@) ; \
|
|
|
|
backend=$(basename $(basename $(subst install-,,$@))) ; \
|
|
|
|
lang=$(subst .,,$(suffix $(basename $(subst install-,,$@)))) ; \
|
|
|
|
dir=$(gnulocaledir)/$${lang}/LC_MESSAGES ; \
|
|
|
|
echo installing $${mo_file} to $${dir}/sane-$${backend}.mo ; \
|
|
|
|
$(MKDIR) $${dir} && \
|
|
|
|
$(INSTALL_DATA) $${mo_file} $${dir}/sane-$${backend}.mo ;
|
|
|
|
|
2002-01-21 21:51:43 +00:00
|
|
|
install-translations: $(addprefix install-,$(ALL_MOS))
|
|
|
|
|
|
|
|
install: $(INSTALL_TRANSLATIONS)
|
2002-01-09 23:45:01 +00:00
|
|
|
|
|
|
|
uninstall-translations:
|
|
|
|
@for lang in $(ALL_LINGUAS) ; do \
|
|
|
|
dir=$(gnulocaledir)/$${lang}/LC_MESSAGES ; \
|
|
|
|
echo removing $${dir}/sane-*.mo ; \
|
|
|
|
rm -f $${dir}/sane-*.mo ; \
|
|
|
|
done
|
|
|
|
|
2002-01-21 21:51:43 +00:00
|
|
|
uninstall: $(UNINSTALL_TRANSLATIONS)
|
2002-01-07 22:13:09 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.mo
|
|
|
|
rm -f *.old
|
|
|
|
|
|
|
|
distclean: clean
|
2002-02-13 20:48:29 +00:00
|
|
|
rm -f $(DISTCLEAN_FILES)
|
2002-01-07 22:13:09 +00:00
|
|
|
rm -f Makefile
|
|
|
|
rm -f *.pot
|
|
|
|
rm -rf $(TMP_FILE_DIR)
|
|
|
|
|
|
|
|
depend:
|
|
|
|
|
2002-01-08 19:06:54 +00:00
|
|
|
dist: $(DISTFILES)
|
|
|
|
for file in $(DISTFILES); do \
|
|
|
|
ln $$file $(distdir)/po 2> /dev/null \
|
|
|
|
|| cp -p $$file $(distdir)/po ; \
|
|
|
|
done
|
|
|
|
|
2002-01-07 22:13:09 +00:00
|
|
|
|