]> git.lyx.org Git - lyx.git/blobdiff - po/Makefile.in.in
read them back...
[lyx.git] / po / Makefile.in.in
index 025cf5a1830c8d94c3cc0f4c1d89a3c3ae7e251e..2802a8808c54a44e153cc1a4a45bfa3bec25273e 100644 (file)
@@ -48,7 +48,8 @@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
 POFILES = @POFILES@
 GMOFILES = @GMOFILES@
 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
-$(POFILES) $(GMOFILES)
+$(POFILES) $(GMOFILES) xforms_l10n.pot qt_l10n.pot layouts_l10n.pot \
+languages_l10n.pot default_ui_l10n.pot
 
 POTFILE_IN_DEPS = $(shell find $(top_srcdir)/src -name Makefile.am)
 
@@ -92,7 +93,7 @@ $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in l10n_pots
          --keyword=qt_ --files-from=$(srcdir)/POTFILES.in \
        && test ! -f $(PACKAGE).po \
           || ( rm -f $(srcdir)/$(PACKAGE).pot \
-               && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
+               && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot || true)
 
 install: install-exec install-data
 install-exec:
@@ -200,15 +201,15 @@ ${srcdir}/POTFILES.in: $(POTFILE_IN_DEPS)
        && ( cd $(top_srcdir); \
             grep -l "_(\".*\")" `find src -name \*.[hHC] -print` |\
             sed -e '/xforms.forms/d' | \
-            sort -f -n | uniq ) > $@-t \
+            sort | uniq ) > $@-t \
        && mv $@-t $@
 
 
-l10n_pots: xforms_l10n.pot qt_l10n.pot layouts_l10n.pot languages_l10n.pot default_ui_l10n.pot
-       cat xforms_l10n.pot qt_l10n.pot layouts_l10n.pot languages_l10n.pot default_ui_l10n.pot | \
+l10n_pots: $(srcdir)/xforms_l10n.pot $(srcdir)/qt_l10n.pot $(srcdir)/layouts_l10n.pot $(srcdir)/languages_l10n.pot $(srcdir)/default_ui_l10n.pot
+       cat $(srcdir)/xforms_l10n.pot $(srcdir)/qt_l10n.pot $(srcdir)/layouts_l10n.pot $(srcdir)/languages_l10n.pot $(srcdir)/default_ui_l10n.pot | \
        msguniq -o $(PACKAGE).po
 
-xforms_l10n.pot: $(top_srcdir)/src/frontends/xforms/forms/*.fd
+$(srcdir)/xforms_l10n.pot: $(top_srcdir)/src/frontends/xforms/forms/*.fd
        awk ' \
             BEGIN { \
                     print "#, fuzzy"; \
@@ -227,7 +228,7 @@ xforms_l10n.pot: $(top_srcdir)/src/frontends/xforms/forms/*.fd
             }' \
        `find $(top_srcdir)/src/frontends/xforms/forms -name \*.fd` > $@
 
-qt_l10n.pot: $(top_srcdir)/src/frontends/qt2/ui/*.ui
+$(srcdir)/qt_l10n.pot: $(top_srcdir)/src/frontends/qt2/ui/*.ui
        awk ' \
             /<string>/ { \
                     line=$$0; \
@@ -242,7 +243,7 @@ qt_l10n.pot: $(top_srcdir)/src/frontends/qt2/ui/*.ui
             }' \
        `find $(top_srcdir)/src/frontends/qt2/ui -name \*.ui` > $@
 
-layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc
+$(srcdir)/layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc
        awk ' \
            /^Style / { \
                line=$$0; \
@@ -258,7 +259,7 @@ layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*
            } \
            ' `find $(top_srcdir)/lib/layouts -regex ".*\.\(layout\|inc\)"` > $@
 
-languages_l10n.pot: $(top_srcdir)/lib/languages
+$(srcdir)/languages_l10n.pot: $(top_srcdir)/lib/languages
        awk ' \
            /^#/ { \
                 next; \
@@ -271,16 +272,16 @@ languages_l10n.pot: $(top_srcdir)/lib/languages
            } \
             '  $(top_srcdir)/lib/languages > $@
 
-default_ui_l10n.pot: $(top_srcdir)/lib/ui/default.ui
+$(srcdir)/default_ui_l10n.pot: $(top_srcdir)/lib/ui/default.ui
        awk ' \
-           /Submenu/ { \
+           /^[^#]*Submenu/ { \
                line=$$0; \
                 sub(/[^"]*"/, "", line); \
                 sub(/".*/, "", line); \
                printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
                        FILENAME, FNR, line); \
             } \
-            /Item/ { \
+            /^[^#]*Item/ { \
                line=$$0; \
                 sub(/[^"]*"/, "", line); \
                 sub(/".*/, "", line); \