From: Daiki Ueno Date: Thu, 4 Dec 2014 02:59:53 +0000 (+0900) Subject: intl: Make the LCOV workaround non-intrusive X-Git-Tag: v0.19.4~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2d04ba9;p=thirdparty%2Fgettext.git intl: Make the LCOV workaround non-intrusive * gettext-runtime/intl/Makefile.in (PLURAL_OBJECT): New variable. (OBJECTS): Refer to $(PLURAL_OBJECT) instead of plural.$lo. (pluralx.c, pluralx.lo): New rule. (mostlyclean): Remove pluralx.c. * gettext-tools/configure.ac: Replace PLURAL_OBJECT in intl/Makefile. --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index d4cc23b10..6a4517e02 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,11 @@ +2014-12-04 Daiki Ueno + + intl: Make the LCOV workaround non-intrusive + * Makefile.in (PLURAL_OBJECT): New variable. + (OBJECTS): Refer to $(PLURAL_OBJECT) instead of plural.$lo. + (pluralx.c, pluralx.lo): New rule. + (mostlyclean): Remove pluralx.c. + 2014-12-03 Daiki Ueno intl: Work around LCOV relative base directory resolution diff --git a/gettext-runtime/intl/Makefile.in b/gettext-runtime/intl/Makefile.in index 836a86770..d18a99f81 100644 --- a/gettext-runtime/intl/Makefile.in +++ b/gettext-runtime/intl/Makefile.in @@ -112,6 +112,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 +183,7 @@ OBJECTS = \ dcngettext.$lo \ dngettext.$lo \ ngettext.$lo \ - plural.$lo \ + $(PLURAL_OBJECT) \ plural-exp.$lo \ localcharset.$lo \ threadlib.$lo \ @@ -277,13 +281,15 @@ dngettext.lo: $(srcdir)/dngettext.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/dngettext.c 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 gcov when the C source file is referred to from a +# That could mess up LCOV when the C source file is referred to from a # different base directory. -plural.lo: $(srcdir)/plural.c - $(AM_V_GEN)test "$(srcdir)" = . || \ - sed -e 's|^#line \([0-9]*\) "\(plural\.[cy]\)"|#line \1 "$(srcdir)/\2"|' < $(srcdir)/plural.c > plural.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) plural.c +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 @@ -589,7 +595,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 @@ -621,7 +627,7 @@ 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 - test "$(srcdir)" = . || rm -f plural.c + rm -f pluralx.c clean: mostlyclean diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog index f3c94b2ad..cd3f2e8aa 100644 --- a/gettext-tools/ChangeLog +++ b/gettext-tools/ChangeLog @@ -1,3 +1,8 @@ +2014-12-04 Daiki Ueno + + intl: Make the LCOV workaround non-intrusive + * configure.ac: Replace PLURAL_OBJECT in intl/Makefile. + 2014-10-15 Daiki Ueno * gettext 0.19.3 released. diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 650bd3113..26a2aaa83 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -508,8 +508,10 @@ AC_CONFIG_FILES([doc/Makefile]) AC_CONFIG_FILES([intl/Makefile:../gettext-runtime/intl/Makefile.in], [ # Change srcdir variable so that it points to ../gettext-runtime/intl. + # Change PLURAL_OBJECT variable so that pluralx.c is used instead of plural.c. sed -e 's|^srcdir =.*$|srcdir = $(top_srcdir)/../gettext-runtime/intl|' \ -e 's|^VPATH =.*$||' \ + -e 's|^PLURAL_OBJECT = .*$|PLURAL_OBJECT = pluralx.\$lo|' \ < intl/Makefile > intl/Makefile.tmp mv intl/Makefile.tmp intl/Makefile ])