diff --git a/backend/Makefile.in b/backend/Makefile.in index d064a4e1b..70ca38f01 100644 --- a/backend/Makefile.in +++ b/backend/Makefile.in @@ -96,7 +96,7 @@ DISTFILES = Makefile.in abaton.c abaton.conf abaton.desc abaton.h \ mustek_pp.h mustek_usb.c mustek_usb.conf mustek_usb.desc \ mustek_usb.h mustek_usb_high.c mustek_usb_high.h mustek_usb_low.c \ mustek_usb_low.h mustek_usb_mid.c mustek_usb_mid.h nec.c nec.conf \ - nec.desc nec.h net.c net.conf net.desc net.h pie-scsidef.h pie.c \ + nec.desc nec.h net.c net.conf net.desc net.h niash.desc pie-scsidef.h pie.c \ pie.conf pie.desc pint.c pint.desc pint.h plustek-devs.c \ plustek-pp.c plustek-share.h plustek-usb.c plustek-usb.h \ plustek-usbhw.c plustek-usbimg.c plustek-usbio.c plustek-usbmap.c \ diff --git a/po/Makefile.in b/po/Makefile.in index 81745b3d6..a181a9186 100644 --- a/po/Makefile.in +++ b/po/Makefile.in @@ -1,8 +1,6 @@ # po/Makefile.in -INSTALL_TRANSLATIONS = @INSTALL_TRANSLATIONS@ -all: $(if $(INSTALL_TRANSLATIONS),update-mo) - # See po/README for documentation. +all: check-mo # Create one line per backend with all files containing translatable text: epson.*.po: ../backend/epson.c ../backend/epson.h @@ -12,8 +10,6 @@ plustek.*.po: ../backend/plustek.c ../backend/plustek.h pnm.*.po: ../backend/pnm.c umax.*.po: ../backend/umax.c -saneopts.*.po: ../include/sane/saneopts.h - # end of configuration prefix = @prefix@ @@ -28,6 +24,12 @@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION) +INSTALL_TRANSLATIONS = @INSTALL_TRANSLATIONS@ +ifeq ($(INSTALL_TRANSLATIONS),install-translations) +UNINSTALL_TRANSLATIONS = uninstall-translations +UPDATE_MO = update-mo +endif + MKDIR = $(top_srcdir)/mkinstalldirs INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -45,16 +47,16 @@ ALL_POTS = $(addsuffix .pot,$(ALL_BACKENDS)) ALL_MOS = $(filter-out saneopts.%.mo,$(addsuffix .mo,$(basename $(ALL_POS)))) ALL_LINGUAS = $(sort $(subst .,,$(suffix $(basename $(ALL_POS))))) -INSTALL_TRANSLATIONS = @INSTALL_TRANSLATIONS@ - DISTFILES = Makefile.in README epson.de.po mustek.de.po \ - mustek_usb.de.po plustek.de.po pnm.de.po saneopts.po umax.de.po + mustek_usb.de.po plustek.de.po pnm.de.po saneopts.de.po umax.de.po .PHONY: all clean depend dist distclean install install-translations \ uninstall update-mo update-po generate-% .SUFFIXES: .po .mo +saneopts.*.po: ../include/sane/saneopts.h + # backend.lang.po -> backend.lang.mo .po.mo: @lang=$(subst .,,$(suffix $(basename $(subst install-,,$@)))) ; \ @@ -88,6 +90,8 @@ update-po: $(ALL_POS) update-mo: $(ALL_MOS) +check-mo: $(UPDATE_MO) + $(addprefix install-,$(ALL_MOS)): @mo_file=$(subst install-,,$@) ; \ backend=$(basename $(basename $(subst install-,,$@))) ; \ @@ -97,7 +101,9 @@ $(addprefix install-,$(ALL_MOS)): $(MKDIR) $${dir} && \ $(INSTALL_DATA) $${mo_file} $${dir}/sane-$${backend}.mo ; -install: $(if $(INSTALL_TRANSLATIONS),$(addprefix install-,$(ALL_MOS))) +install-translations: $(addprefix install-,$(ALL_MOS)) + +install: $(INSTALL_TRANSLATIONS) uninstall-translations: @for lang in $(ALL_LINGUAS) ; do \ @@ -106,7 +112,7 @@ uninstall-translations: rm -f $${dir}/sane-*.mo ; \ done -uninstall: $(if $(INSTALL_TRANSLATIONS),uninstall-translations) +uninstall: $(UNINSTALL_TRANSLATIONS) clean: rm -f *.mo