Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-runtime / intl / Makefile.in
index 7151d39..df2aff6 100644 (file)
@@ -1,5 +1,6 @@
 # Makefile for directory with message catalog handling library of GNU gettext
-# Copyright (C) 1995-1998, 2000-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-1998, 2000-2007, 2009-2015 Free Software
+# Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Lesser General Public License as published by
@@ -112,6 +113,10 @@ LIBS = @LIBS@
 
 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
 
+# This line will be replaced with pluralx.$lo, when this file is used
+# in gettext-tools/intl/.  See the pluralx.lo rule below for the rationale.
+PLURAL_OBJECT = plural.$lo
+
 HEADERS = \
   gmo.h \
   gettextP.h \
@@ -179,7 +184,7 @@ OBJECTS = \
   dcngettext.$lo \
   dngettext.$lo \
   ngettext.$lo \
-  plural.$lo \
+  $(PLURAL_OBJECT) \
   plural-exp.$lo \
   localcharset.$lo \
   threadlib.$lo \
@@ -201,7 +206,7 @@ config.charset locale.alias ref-add.sin ref-del.sin export.h libintl.rc \
 $(HEADERS) $(SOURCES)
 DISTFILES.generated = plural.c
 DISTFILES.normal = VERSION
-DISTFILES.gettext = COPYING.LIB libintl.glibc README.woe32
+DISTFILES.gettext = ChangeLog COPYING.LIB libintl.glibc README.woe32
 DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
 COPYING.LIB-2 COPYING.LIB-2.0 COPYING.LIB-2.1 \
 gettext.h libgettext.h plural-eval.c libgnuintl.h \
@@ -234,7 +239,7 @@ libintl.la libgnuintl.la: $(OBJECTS) $(OBJECTS_RES_@WOE32@)
 # Maintainers of other packages that include the intl directory must *not*
 # change these values.
 LTV_CURRENT=9
-LTV_REVISION=2
+LTV_REVISION=4
 LTV_AGE=1
 
 .SUFFIXES:
@@ -279,6 +284,13 @@ ngettext.lo: $(srcdir)/ngettext.c
        $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/ngettext.c
 plural.lo: $(srcdir)/plural.c
        $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/plural.c
+# $(srcdir)/plural.c contains a relative file name of the Bison source.
+# That could mess up LCOV when the C source file is referred to from a
+# different base directory.
+pluralx.c: $(srcdir)/plural.c
+       $(AM_V_GEN)sed -e 's|^#line \([0-9]*\) "\(plural\.[cy]\)"|#line \1 "$(srcdir)/\2"|' < $(srcdir)/plural.c > $@
+pluralx.lo: pluralx.c
+       $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) pluralx.c
 plural-exp.lo: $(srcdir)/plural-exp.c
        $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
 localcharset.lo: $(srcdir)/localcharset.c
@@ -460,7 +472,6 @@ install-data: all
        if test "$(PACKAGE)" = "gettext-tools"; then \
          $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
          $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
-         $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
          dists="COPYING.LIB $(DISTFILES.common)"; \
          for file in $$dists; do \
            $(INSTALL_DATA) $(srcdir)/$$file \
@@ -571,7 +582,7 @@ uninstall:
          : ; \
        fi
        if test "$(PACKAGE)" = "gettext-tools"; then \
-         for file in VERSION ChangeLog COPYING.LIB $(DISTFILES.common) $(DISTFILES.generated); do \
+         for file in VERSION COPYING.LIB $(DISTFILES.common) $(DISTFILES.generated); do \
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
          done; \
        else \
@@ -585,7 +596,7 @@ bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngette
 localename.$lo: $(srcdir)/gettextP.h
 hash-string.$lo dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
 explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
-dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
+dcigettext.$lo loadmsgcat.$lo $(PLURAL_OBJECT) plural-exp.$lo: $(srcdir)/plural-exp.h
 dcigettext.$lo: $(srcdir)/eval-plural.h
 localcharset.$lo: $(srcdir)/localcharset.h
 bindtextdom.$lo dcigettext.$lo finddomain.$lo loadmsgcat.$lo localealias.$lo lock.$lo log.$lo: $(srcdir)/lock.h
@@ -595,7 +606,7 @@ printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-par
 # A bison-2.1 generated plural.c includes <libintl.h> if ENABLE_NLS.
 PLURAL_DEPS_yes = libintl.h
 PLURAL_DEPS_no =
-plural.$lo: $(PLURAL_DEPS_@USE_INCLUDED_LIBINTL@)
+$(PLURAL_OBJECT): $(PLURAL_DEPS_@USE_INCLUDED_LIBINTL@)
 
 tags: TAGS
 
@@ -617,13 +628,14 @@ mostlyclean:
        rm -f *.a *.la *.o *.obj *.lo core core.*
        rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
        rm -f -r .libs _libs
+       rm -f pluralx.c
 
 clean: mostlyclean
 
 distclean: clean
        rm -f Makefile ID TAGS
        if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
-         rm -f ChangeLog.inst $(DISTFILES.normal); \
+         rm -f $(DISTFILES.normal); \
        else \
          : ; \
        fi
@@ -646,7 +658,7 @@ dist distdir: Makefile
            additional="$(DISTFILES.normal)"; \
          fi; \
          $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
-         for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
+         for file in $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
            if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
            cp -p $$dir/$$file $(distdir) || test $$file = Makefile.in || exit 1; \
          done; \