]> gcc.gnu.org Git - gcc.git/blame - libcpp/Makefile.am
Makefile.am (LIBICONV): Declare.
[gcc.git] / libcpp / Makefile.am
CommitLineData
4f4e53dd
PB
1localedir = $(datadir)/locale
2ACLOCAL_AMFLAGS = -I ../config
0429bc77 3AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir) @INCINTL@ \
4f4e53dd
PB
4 -I$(srcdir)/include -DLOCALEDIR="\"$(localedir)\""
5
6noinst_LIBRARIES = libcpp.a
7libcpp_a_SOURCES = \
8 charset.c directives.c errors.c expr.c files.c \
9 identifiers.c init.c lex.c line-map.c macro.c mkdeps.c \
10 pch.c symtab.c traditional.c
11
12noinst_HEADERS = \
13 include/cpplib.h include/line-map.h include/mkdeps.h \
14 include/symtab.h internal.h system.h ucnid.h
15
5e2f3f39 16LIBINTL = @LIBINTL@
b51fa00f 17LIBICONV = @LIBICONV@
c6e83800 18noinst_PROGRAMS = makedepend
b51fa00f 19makedepend_LDADD = libcpp.a ../libiberty/libiberty.a $(LIBINTL) $(LIBICONV)
c6e83800 20
4f4e53dd
PB
21XGETTEXT = @XGETTEXT@
22GMSGFMT = @GMSGFMT@
23MSGMERGE = msgmerge
24CATALOGS = @CATALOGS@
25
26if ENABLE_NLS
27build-po: $(CATALOGS)
28update-po: $(CATALOGS:.gmo=.pox)
29else
30build-po:
31update-po:
32endif
33
34# N.B. We do not attempt to copy these into $(srcdir).
35.po.gmo:
36 -test -d po || mkdir po
37 $(GMSGFMT) --statistics -o $@ $<
38
39# The new .po has to be gone over by hand, so we deposit it into
40# build/po with a different extension.
41# If build/po/$(PACKAGE).pot exists, use it (it was just created),
42# else use the one in srcdir.
43.po.pox:
44 -test -d po || mkdir po
45 $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
46 then echo po/$(PACKAGE).pot; \
47 else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
48
49# This rule has to look for .gmo modules in both srcdir and
50# the cwd, and has to check that we actually have a catalog
51# for each language, in case they weren't built or included
52# with the distribution.
53install-data-local:
54 $(mkinstalldirs) $(DESTDIR)$(datadir)
55 cats="$(CATALOGS)"; for cat in $$cats; do \
56 lang=`basename $$cat | sed 's/\.gmo$$//'`; \
57 if [ -f $$cat ]; then :; \
58 elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
59 else continue; \
60 fi; \
61 dir=$(localedir)/$$lang/LC_MESSAGES; \
62 echo $(mkinstalldirs) $(DESTDIR)$$dir; \
63 $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
64 echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
65 $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
66 done
67
68# Rule for regenerating the message template (gcc.pot).
69# Instead of forcing everyone to edit POTFILES.in, which proved impractical,
70# this rule has no dependencies and always regenerates libcpp.pot. This is
71# relatively harmless since the .po files do not directly depend on it.
72.PHONY: po/$(PACKAGE).pot
73po/$(PACKAGE).pot: $(libcpp_a_SOURCES) $(noinst_HEADERS)
74 -test -d $(srcdir)/po || mkdir $(srcdir)/po
75 $(XGETTEXT) --default-domain=$(PACKAGE) \
76 --keyword=cpp_error,3 --keyword=cpp_errno,3 \
77 --keyword=cpp_error_with_line,5 \
78 --copyright-holder="Free Software Foundation, Inc." \
79 --msgid-bugs-address="http://gcc.gnu.org/bugs.html" \
80 --language=c -o po/$(PACKAGE).pot $^
This page took 0.040918 seconds and 5 git commands to generate.