# 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
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 \
dcngettext.$lo \
dngettext.$lo \
ngettext.$lo \
- plural.$lo \
+ $(PLURAL_OBJECT) \
plural-exp.$lo \
localcharset.$lo \
threadlib.$lo \
$(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 \
# 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:
$(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
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 \
: ; \
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 \
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
# 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
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
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; \