Thomas Huriaux <[EMAIL PROTECTED]> (04/10/2005):
> To avoid this problem, I suggest you to apply the attached patch for
> Makefile.in.

Here is the patch, sorry for the noise.

-- 
Thomas Huriaux
--- Makefile.in.orig    2005-10-04 16:31:04.000000000 +0200
+++ Makefile.in 2005-10-04 16:46:17.000000000 +0200
@@ -29,10 +29,14 @@
 MSGFMT = @MSGFMT@
 MKINSTALLDIRS = $(srcdir)/mkinstalldirs
 
+PO = $(wildcard po/*.po)
+LANG = $(notdir $(basename $(PO)))
+MO = $(patsubst %.mo,%.po,$(PO))
+
 target = help2man
 preload = hacklocaledir
 
-all: $(target) man info @extra_make_all@ 
+all: $(target) update-po $(MO) man info @extra_make_all@ 
 
 install: all install_base @extra_make_install@
 install_base:
@@ -52,14 +56,16 @@
 install_preload: preload
        $(INSTALL_PROGRAM) $(preload).so $(DESTDIR)$(libdir)
 
-install_l10n: man_l10n
+install_l10n: man_l10n update-po $(MO)
        for lang in $(LINGUAS); \
        do \
            $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/$$lang/man1; \
            $(MKINSTALLDIRS) $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
            $(INSTALL_DATA) $(target).$$lang.1 \
                $(DESTDIR)$(mandir)/$$lang/man1/$(target).1; \
-           $(INSTALL_DATA) po/$$lang.gmo \
+       done
+       for lang in $(LANG) ; do \
+         $(INSTALL_DATA) po/$$lang.mo \
                $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(target).mo; \
        done
 
@@ -69,9 +75,10 @@
            $(DESTDIR)$(mandir)/man1/$(target).1 \
            $(DESTDIR)$(mandir)/fr/man1/$(target).1 \
            $(DESTDIR)$(mandir)/pl/man1/$(target).1 \
-           $(DESTDIR)$(localedir)/fr/LC_MESSAGES/$(target).mo \
-           $(DESTDIR)$(localedir)/pl/LC_MESSAGES/$(target).mo \
            $(DESTDIR)$(infodir)/$(target).info
+       for lang in $(LANG) ; do \
+           rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(target).mo; \
+       done
 
        if test -f $(DESTDIR)$(infodir)/dir; \
        then \
@@ -80,7 +87,7 @@
        fi
 
 clean:
-       -rm -f $(target) $(preload).so
+       -rm -f $(target) $(preload).so po/*~
 
 mostlyclean: clean
        rm -f $(target).dvi $(target).aux $(target).cp $(target).cps \
@@ -92,7 +99,7 @@
 
 realclean: distclean
        -rm -f $(target).info $(target).1 $(target).fr.1 $(target).pl.1 \
-           po/*.gmo
+           po/*.mo
 
 maintainer-clean: realclean
        rm -f configure
@@ -108,35 +115,27 @@
 man_l10n:
        for lang in $(LINGUAS); \
        do \
-           $(MAKE) po/$$lang.gmo $(target).$$lang.1; \
+           $(MAKE) $(target).$$lang.1; \
        done
 
 $(target).1: $(target) $(srcdir)/$(target).h2m
        ./$(target) --include=$(srcdir)/$(target).h2m \
            --output=$@ ./$(target)
 
-$(target).fr.1: po/fr.gmo $(target) $(srcdir)/$(target).fr.h2m
+$(target).fr.1: $(target) $(srcdir)/$(target).fr.h2m
        $(MAKE) preload
        LD_PRELOAD="./$(preload).so preloadable_libintl.so" \
        TEXTDOMAIN=help2man \
        ./$(target) --include=$(srcdir)/$(target).fr.h2m \
            --output=$@ [EMAIL PROTECTED] ./$(target)
 
-$(target).pl.1: po/pl.gmo $(target) $(srcdir)/$(target).pl.h2m
+$(target).pl.1: $(target) $(srcdir)/$(target).pl.h2m
        $(MAKE) preload
        LD_PRELOAD="./$(preload).so preloadable_libintl.so" \
        TEXTDOMAIN=help2man \
        ./$(target) --include=$(srcdir)/$(target).pl.h2m \
            --output=$@ --locale=pl_PL ./$(target)
 
-po/fr.gmo: $(srcdir)/po/fr.po
-       test -d po || mkdir po
-       $(MSGFMT) -o $@ $?
-
-po/pl.gmo: $(srcdir)/po/pl.po
-       test -d po || mkdir po
-       $(MSGFMT) -o $@ $?
-
 info: $(target).info
 $(target).info: $(srcdir)/$(target).texi
        $(MAKEINFO) $? -o $@
@@ -148,8 +147,20 @@
 Makefile: $(srcdir)/Makefile.in
        ./config.status
 
+update-po: po/$(target).pot
+       [EMAIL PROTECTED] po in $(PO); do \
+         echo -n "Updating $$po"; \
+         msgmerge -U $$po po/$(target).pot; \
+       done;
+
+po/$(target).pot: $(target)
+       xgettext -L Perl -k_ -kN_ -o $@ $?
+
+po/%.mo: po/%.po
+       $(MSGFMT) -o $@ $<
+
 .PHONY: all clean distclean preload man man_l10n info dvi install \
     install_base install_preload install_l10n mostlyclean realclean \
-    uninstall
+    uninstall update-po
 
 .SUFFIXES:

Attachment: signature.asc
Description: Digital signature

Reply via email to