2004-05-24 12:50:45 +02:00
|
|
|
localedir = $(datadir)/locale
|
|
|
|
ACLOCAL_AMFLAGS = -I ../config
|
2004-05-25 08:14:37 +02:00
|
|
|
AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir) @INCINTL@ \
|
2004-05-24 12:50:45 +02:00
|
|
|
-I$(srcdir)/include -DLOCALEDIR="\"$(localedir)\""
|
|
|
|
|
|
|
|
noinst_LIBRARIES = libcpp.a
|
|
|
|
libcpp_a_SOURCES = \
|
|
|
|
charset.c directives.c errors.c expr.c files.c \
|
|
|
|
identifiers.c init.c lex.c line-map.c macro.c mkdeps.c \
|
|
|
|
pch.c symtab.c traditional.c
|
|
|
|
|
|
|
|
noinst_HEADERS = \
|
|
|
|
include/cpplib.h include/line-map.h include/mkdeps.h \
|
|
|
|
include/symtab.h internal.h system.h ucnid.h
|
|
|
|
|
2004-06-06 06:23:01 +02:00
|
|
|
LIBINTL = @LIBINTL@
|
2004-06-07 07:18:36 +02:00
|
|
|
LIBICONV = @LIBICONV@
|
2004-06-05 22:58:06 +02:00
|
|
|
noinst_PROGRAMS = makedepend
|
2004-06-07 07:18:36 +02:00
|
|
|
makedepend_LDADD = libcpp.a ../libiberty/libiberty.a $(LIBINTL) $(LIBICONV)
|
2004-06-05 22:58:06 +02:00
|
|
|
|
2004-05-24 12:50:45 +02:00
|
|
|
XGETTEXT = @XGETTEXT@
|
|
|
|
GMSGFMT = @GMSGFMT@
|
|
|
|
MSGMERGE = msgmerge
|
|
|
|
CATALOGS = @CATALOGS@
|
|
|
|
|
2004-06-09 11:07:11 +02:00
|
|
|
all-local: build-po
|
|
|
|
|
2004-05-24 12:50:45 +02:00
|
|
|
if ENABLE_NLS
|
|
|
|
build-po: $(CATALOGS)
|
|
|
|
update-po: $(CATALOGS:.gmo=.pox)
|
|
|
|
else
|
|
|
|
build-po:
|
|
|
|
update-po:
|
|
|
|
endif
|
|
|
|
|
|
|
|
# N.B. We do not attempt to copy these into $(srcdir).
|
|
|
|
.po.gmo:
|
|
|
|
-test -d po || mkdir po
|
|
|
|
$(GMSGFMT) --statistics -o $@ $<
|
|
|
|
|
|
|
|
# The new .po has to be gone over by hand, so we deposit it into
|
|
|
|
# build/po with a different extension.
|
|
|
|
# If build/po/$(PACKAGE).pot exists, use it (it was just created),
|
|
|
|
# else use the one in srcdir.
|
|
|
|
.po.pox:
|
|
|
|
-test -d po || mkdir po
|
|
|
|
$(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
|
|
|
|
then echo po/$(PACKAGE).pot; \
|
|
|
|
else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
|
|
|
|
|
|
|
|
# This rule has to look for .gmo modules in both srcdir and
|
|
|
|
# the cwd, and has to check that we actually have a catalog
|
|
|
|
# for each language, in case they weren't built or included
|
|
|
|
# with the distribution.
|
|
|
|
install-data-local:
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
|
|
|
cats="$(CATALOGS)"; for cat in $$cats; do \
|
|
|
|
lang=`basename $$cat | sed 's/\.gmo$$//'`; \
|
|
|
|
if [ -f $$cat ]; then :; \
|
|
|
|
elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
|
|
|
|
else continue; \
|
|
|
|
fi; \
|
|
|
|
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
|
|
|
echo $(mkinstalldirs) $(DESTDIR)$$dir; \
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
|
|
|
|
echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
|
|
|
|
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
|
|
|
|
done
|
|
|
|
|
|
|
|
# Rule for regenerating the message template (gcc.pot).
|
|
|
|
# Instead of forcing everyone to edit POTFILES.in, which proved impractical,
|
|
|
|
# this rule has no dependencies and always regenerates libcpp.pot. This is
|
|
|
|
# relatively harmless since the .po files do not directly depend on it.
|
|
|
|
.PHONY: po/$(PACKAGE).pot
|
|
|
|
po/$(PACKAGE).pot: $(libcpp_a_SOURCES) $(noinst_HEADERS)
|
|
|
|
-test -d $(srcdir)/po || mkdir $(srcdir)/po
|
|
|
|
$(XGETTEXT) --default-domain=$(PACKAGE) \
|
|
|
|
--keyword=cpp_error,3 --keyword=cpp_errno,3 \
|
|
|
|
--keyword=cpp_error_with_line,5 \
|
|
|
|
--copyright-holder="Free Software Foundation, Inc." \
|
|
|
|
--msgid-bugs-address="http://gcc.gnu.org/bugs.html" \
|
|
|
|
--language=c -o po/$(PACKAGE).pot $^
|