OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / libcpp / Makefile.in
1 # @configure_input@
2 # Makefile for libcpp.  Run 'configure' to generate Makefile from Makefile.in
3
4 # Copyright (C) 2004, 2008, 2009, 2010 Free Software Foundation, Inc.
5
6 #This file is part of libcpp.
7
8 #libcpp is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 3, or (at your option)
11 #any later version.
12
13 #libcpp is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #GNU General Public License for more details.
17
18 #You should have received a copy of the GNU General Public License
19 #along with libcpp; see the file COPYING3.  If not see
20 #<http://www.gnu.org/licenses/>.
21
22 @SET_MAKE@
23
24 srcdir = @srcdir@
25 top_builddir = .
26 VPATH = @srcdir@
27 INSTALL = @INSTALL@
28 AR = ar
29 ARFLAGS = cru
30 ACLOCAL = @ACLOCAL@
31 AUTOCONF = @AUTOCONF@
32 AUTOHEADER = @AUTOHEADER@
33 CATALOGS = $(patsubst %,po/%,@CATALOGS@)
34 CC = @CC@
35 CFLAGS = @CFLAGS@
36 WARN_CFLAGS = @warn@ @c_warn@ @WARN_PEDANTIC@ @WERROR@
37 CXX = @CXX@
38 CXXFLAGS = @CXXFLAGS@
39 WARN_CXXFLAGS = @warn@ @WARN_PEDANTIC@ @WERROR@
40 CPP = @CPP@
41 CPPFLAGS = @CPPFLAGS@
42 EXEEXT = @EXEEXT@
43 GMSGFMT = @GMSGFMT@
44 INCINTL = @INCINTL@
45 INSTALL_DATA = @INSTALL_DATA@
46 INSTALL_PROGRAM = @INSTALL_PROGRAM@
47 INSTALL_SCRIPT = @INSTALL_SCRIPT@
48 LDFLAGS = @LDFLAGS@
49 LIBICONV = @LIBICONV@
50 LIBINTL = @LIBINTL@
51 PACKAGE = @PACKAGE@
52 RANLIB = @RANLIB@
53 SHELL = @SHELL@
54 USED_CATALOGS = @USED_CATALOGS@
55 XGETTEXT = @XGETTEXT@
56 CCDEPMODE = @CCDEPMODE@
57 CXXDEPMODE = @CXXDEPMODE@
58 DEPDIR = @DEPDIR@
59 NOEXCEPTION_FLAGS = @noexception_flags@
60
61 datarootdir = @datarootdir@
62 datadir = @datadir@
63 exec_prefix = @prefix@
64 libdir = @libdir@
65 localedir = $(datadir)/locale
66 prefix = @prefix@
67
68 MSGMERGE = msgmerge
69 mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
70 depcomp = $(SHELL) $(srcdir)/../depcomp
71
72 INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
73         -I$(srcdir)/include
74
75 ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
76 ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \
77         $(CPPFLAGS)
78
79 # The name of the compiler to use.
80 ENABLE_BUILD_WITH_CXX = @ENABLE_BUILD_WITH_CXX@
81 ifneq ($(ENABLE_BUILD_WITH_CXX),yes)
82 COMPILER = $(CC)
83 COMPILER_FLAGS = $(ALL_CFLAGS)
84 DEPMODE = $(CCDEPMODE)
85 else
86 COMPILER = $(CXX)
87 COMPILER_FLAGS = $(ALL_CXXFLAGS)
88 DEPMODE = $(CXXDEPMODE)
89 endif
90
91
92 libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
93         expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
94         mkdeps.o pch.o symtab.o traditional.o
95
96 libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
97         expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
98         mkdeps.c pch.c symtab.c traditional.c
99
100 all: libcpp.a $(USED_CATALOGS)
101
102 .SUFFIXES:
103 .SUFFIXES: .c .gmo .o .obj .po .pox
104
105 libcpp.a: $(libcpp_a_OBJS)
106         -rm -f libcpp.a
107         $(AR) $(ARFLAGS) libcpp.a $(libcpp_a_OBJS)
108         $(RANLIB) libcpp.a
109
110 # Rules to rebuild the configuration
111
112 Makefile: $(srcdir)/Makefile.in config.status
113         $(SHELL) ./config.status Makefile
114
115 config.status: $(srcdir)/configure
116         $(SHELL) ./config.status --recheck
117
118 $(srcdir)/configure: @MAINT@ $(srcdir)/aclocal.m4
119         cd $(srcdir) && $(AUTOCONF)
120
121 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../config/acx.m4 \
122         $(srcdir)/../config/gettext-sister.m4 $(srcdir)/../config/iconv.m4 \
123         $(srcdir)/../config/codeset.m4 $(srcdir)/../config/lib-ld.m4 \
124         $(srcdir)/../config/lib-link.m4 $(srcdir)/../config/lib-prefix.m4 \
125         $(srcdir)/../config/override.m4 $(srcdir)/../config/proginstall.m4 \
126         $(srcdir)/configure.ac
127         cd $(srcdir) && $(ACLOCAL) -I ../config
128
129 config.h: stamp-h1
130         test -f config.h || (rm -f stamp-h1 && $(MAKE) stamp-h1)
131
132 stamp-h1: $(srcdir)/config.in config.status
133         -rm -f stamp-h1
134         $(SHELL) ./config.status config.h
135
136 $(srcdir)/config.in: @MAINT@ $(srcdir)/configure.ac
137         cd $(srcdir) && $(AUTOHEADER)
138         -rm -f stamp-h1
139
140 # It is not possible to get LOCALEDIR defined in config.h because
141 # the value it needs to be defined to is only determined in the
142 # Makefile.  Hence we do this instead.
143 localedir.h: localedir.hs; @true
144 localedir.hs: Makefile
145         echo "#define LOCALEDIR \"$(localedir)\"" > localedir.new
146         $(srcdir)/../move-if-change localedir.new localedir.h
147         echo timestamp > localedir.hs
148
149 # Installation rules and other phony targets
150
151 # These rule has to look for .gmo modules in both srcdir and
152 # the cwd, and has to check that we actually have a catalog
153 # for each language, in case they weren't built or included
154 # with the distribution.
155 installdirs:
156         @$(mkinstalldirs) $(DESTDIR)$(datadir); \
157         cats="$(CATALOGS)"; for cat in $$cats; do \
158           lang=`basename $$cat | sed 's/\.gmo$$//'`; \
159           if [ -f $$cat ] || [ -f $(srcdir)/$$cat ]; then \
160             dir=$(localedir)/$$lang/LC_MESSAGES; \
161             $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
162           fi; \
163         done
164
165 install-strip install: all installdirs
166         cats="$(CATALOGS)"; for cat in $$cats; do \
167           lang=`basename $$cat | sed 's/\.gmo$$//'`; \
168           if [ -f $$cat ]; then :; \
169           elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
170           else continue; \
171           fi; \
172           dir=$(localedir)/$$lang/LC_MESSAGES; \
173           echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
174           $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
175         done
176
177 mostlyclean:
178         -rm -f *.o
179
180 clean: mostlyclean
181         -rm -rf libcpp.a $(srcdir)/autom4te.cache
182
183 distclean: clean
184         -rm -f config.h stamp-h1 config.status config.cache config.log \
185           configure.lineno configure.status.lineno Makefile localedir.h \
186           localedir.hs $(DEPDIR)/*.Po
187         -rmdir $(DEPDIR)
188
189 maintainer-clean: distclean
190         @echo "This command is intended for maintainers to use"
191         @echo "it deletes files that may require special tools to rebuild."
192         -rm -f $(srcdir)/configure $(srcdir)/aclocal.m4
193
194 check:
195 installcheck:
196 dvi:
197 pdf:
198 html:
199 info:
200 install-info:
201 install-pdf:
202 install-man:
203 install-html:
204
205 update-po: $(CATALOGS:.gmo=.pox)
206
207 .PHONY: installdirs install install-strip mostlyclean clean distclean \
208   maintainer-clean check installcheck dvi pdf html info install-info \
209   install-man update-po install-html
210
211 # Dependency rule.
212 COMPILE.base = $(COMPILER) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(COMPILER_FLAGS) -c
213 ifeq ($(DEPMODE),depmode=gcc3)
214 # Note that we put the dependencies into a .Tpo file, then move them
215 # into place if the compile succeeds.  We need this because gcc does
216 # not atomically write the dependency output file.
217 COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Tpo
218 POSTCOMPILE = @mv $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
219 else
220 COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
221           $(depcomp) $(COMPILE.base)
222 # depcomp handles atomicity for us, so we don't need a postcompile
223 # step.
224 POSTCOMPILE =
225 endif
226
227 # Implicit rules and I18N
228
229 .c.o:
230         $(COMPILE) $<
231         $(POSTCOMPILE)
232
233 # N.B. We do not attempt to copy these into $(srcdir).
234 .po.gmo:
235         $(mkinstalldirs) po
236         $(GMSGFMT) --statistics -o $@ $<
237
238 # The new .po has to be gone over by hand, so we deposit it into
239 # build/po with a different extension.
240 # If build/po/$(PACKAGE).pot exists, use it (it was just created),
241 # else use the one in srcdir.
242 .po.pox:
243         $(mkinstalldirs) po
244         $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
245                         then echo po/$(PACKAGE).pot; \
246                         else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
247
248 # Rule for regenerating the message template.
249 $(PACKAGE).pot: po/$(PACKAGE).pot
250 po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
251         $(mkinstalldirs) $(srcdir)/po
252         $(XGETTEXT) --default-domain=$(PACKAGE) \
253           --keyword=_ --keyword=N_ \
254           --keyword=cpp_error:3 \
255           --keyword=cpp_warning:3 \
256           --keyword=cpp_pedwarning:3 \
257           --keyword=cpp_warning_syshdr:3 \
258           --keyword=cpp_error_with_line:5 \
259           --keyword=cpp_warning_with_line:5 \
260           --keyword=cpp_pedwarning_with_line:5 \
261           --keyword=cpp_warning_with_line_syshdr:5 \
262           --keyword=cpp_errno:3 \
263           --keyword=SYNTAX_ERROR --keyword=SYNTAX_ERROR2 \
264           --copyright-holder="Free Software Foundation, Inc." \
265           --msgid-bugs-address="http://gcc.gnu.org/bugs.html" \
266           --language=c -o po/$(PACKAGE).pot.tmp $^
267         sed 's:$(srcdir)/::g' <po/$(PACKAGE).pot.tmp >po/$(PACKAGE).pot
268         rm po/$(PACKAGE).pot.tmp
269
270 TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
271     include/line-map.h include/symtab.h include/cpp-id-data.h \
272     include/cpplib.h include/mkdeps.h system.h
273
274 TAGS: $(TAGS_SOURCES)
275         cd $(srcdir) && etags $(TAGS_SOURCES)
276
277 # Tell versions [3.59,3.63) of GNU make to not export all variables.
278 # Otherwise a system limit (for SysV at least) may be exceeded.
279 .NOEXPORT:
280
281 # Dependencies
282 -include $(patsubst %.o, $(DEPDIR)/%.Po, $(libcpp_a_OBJS))
283
284 # Dependencies on generated headers have to be explicit.
285 init.o: localedir.h