]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
po: Support reading header comments from file
authorDaiki Ueno <ueno@gnu.org>
Tue, 1 Sep 2015 02:18:17 +0000 (11:18 +0900)
committerDaiki Ueno <ueno@gnu.org>
Tue, 1 Sep 2015 02:18:17 +0000 (11:18 +0900)
* Makefile.in.in ($(DOMAIN).pot-update): Replace header comment
with the content of $(DOMAIN).pot-header, if exists.

gettext-runtime/po/ChangeLog
gettext-runtime/po/Makefile.in.in

index e5d8f0db47265e97d1fe235e3b44acf5e1ddec50..bdd7ffd0da904d012b652c2ceb8084bf653e9aec 100644 (file)
@@ -1,3 +1,8 @@
+2015-09-01  Daiki Ueno  <ueno@gnu.org>
+
+       * Makefile.in.in ($(DOMAIN).pot-update): Replace header comment
+       with the content of $(DOMAIN).pot-header, if exists.
+
 2015-07-10  Daiki Ueno  <ueno@gnu.org>
 
        * gettext 0.19.5 released.
index c36f1ad26d20d420b26ed318f39be8316a333ec0..dbe8c2040e0223f152d83c2e11fe2660dfbb9925 100644 (file)
@@ -195,6 +195,11 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
            ;; \
        esac
        test ! -f $(DOMAIN).po || { \
+         if test -f $(srcdir)/$(DOMAIN).pot-header; then \
+           sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
+           cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \
+           rm -f $(DOMAIN).1po; \
+         fi; \
          if test -f $(srcdir)/$(DOMAIN).pot; then \
            sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
            sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \