]> git.ipfire.org Git - thirdparty/gcc.git/blob - libcpp/Makefile.in
[Ada] Use new API when creating a special SPARK heap entity
[thirdparty/gcc.git] / libcpp / Makefile.in
1 # @configure_input@
2 # Makefile for libcpp. Run 'configure' to generate Makefile from Makefile.in
3
4 # Copyright (C) 2004-2020 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 PICFLAG = @PICFLAG@
61 CET_HOST_FLAGS = @CET_HOST_FLAGS@
62
63 datarootdir = @datarootdir@
64 datadir = @datadir@
65 exec_prefix = @prefix@
66 libdir = @libdir@
67 localedir = $(datadir)/locale
68 prefix = @prefix@
69
70 MSGMERGE = msgmerge
71 mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
72 depcomp = $(SHELL) $(srcdir)/../depcomp
73
74 INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
75 -I$(srcdir)/include
76
77 ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(PICFLAG) \
78 $(CET_HOST_FLAGS)
79 ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \
80 $(CPPFLAGS) $(PICFLAG) $(CET_HOST_FLAGS)
81
82 # The name of the compiler to use.
83 COMPILER = $(CXX)
84 COMPILER_FLAGS = $(ALL_CXXFLAGS)
85 DEPMODE = $(CXXDEPMODE)
86
87
88 libcpp_a_OBJS = charset.o directives.o errors.o \
89 expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
90 mkdeps.o pch.o symtab.o traditional.o
91
92 libcpp_a_SOURCES = charset.c directives.c errors.c \
93 expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
94 mkdeps.c pch.c symtab.c traditional.c
95
96 all: libcpp.a $(USED_CATALOGS)
97
98 .SUFFIXES:
99 .SUFFIXES: .c .gmo .o .obj .po .pox
100
101 libcpp.a: $(libcpp_a_OBJS)
102 -rm -f libcpp.a
103 $(AR) $(ARFLAGS) libcpp.a $(libcpp_a_OBJS)
104 $(RANLIB) libcpp.a
105
106 # Rules to rebuild the configuration
107
108 Makefile: $(srcdir)/Makefile.in config.status
109 $(SHELL) ./config.status Makefile
110
111 config.status: $(srcdir)/configure
112 $(SHELL) ./config.status --recheck
113
114 $(srcdir)/configure: @MAINT@ $(srcdir)/aclocal.m4
115 cd $(srcdir) && $(AUTOCONF)
116
117 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../config/acx.m4 \
118 $(srcdir)/../config/gettext-sister.m4 $(srcdir)/../config/iconv.m4 \
119 $(srcdir)/../config/codeset.m4 $(srcdir)/../config/lib-ld.m4 \
120 $(srcdir)/../config/lib-link.m4 $(srcdir)/../config/lib-prefix.m4 \
121 $(srcdir)/../config/override.m4 $(srcdir)/../config/proginstall.m4 \
122 $(srcdir)/configure.ac
123 cd $(srcdir) && $(ACLOCAL) -I ../config
124
125 config.h: stamp-h1
126 test -f config.h || (rm -f stamp-h1 && $(MAKE) stamp-h1)
127
128 stamp-h1: $(srcdir)/config.in config.status
129 -rm -f stamp-h1
130 $(SHELL) ./config.status config.h
131
132 $(srcdir)/config.in: @MAINT@ $(srcdir)/configure.ac
133 cd $(srcdir) && $(AUTOHEADER)
134 -rm -f stamp-h1
135
136 # It is not possible to get LOCALEDIR defined in config.h because
137 # the value it needs to be defined to is only determined in the
138 # Makefile. Hence we do this instead.
139 localedir.h: localedir.hs; @true
140 localedir.hs: Makefile
141 echo "#define LOCALEDIR \"$(localedir)\"" > localedir.new
142 $(srcdir)/../move-if-change localedir.new localedir.h
143 echo timestamp > localedir.hs
144
145 # Installation rules and other phony targets
146
147 # These rule has to look for .gmo modules in both srcdir and
148 # the cwd, and has to check that we actually have a catalog
149 # for each language, in case they weren't built or included
150 # with the distribution.
151 installdirs:
152 @$(mkinstalldirs) $(DESTDIR)$(datadir); \
153 cats="$(CATALOGS)"; for cat in $$cats; do \
154 lang=`basename $$cat | sed 's/\.gmo$$//'`; \
155 if [ -f $$cat ] || [ -f $(srcdir)/$$cat ]; then \
156 dir=$(localedir)/$$lang/LC_MESSAGES; \
157 $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
158 fi; \
159 done
160
161 install-strip install: all installdirs
162 cats="$(CATALOGS)"; for cat in $$cats; do \
163 lang=`basename $$cat | sed 's/\.gmo$$//'`; \
164 if [ -f $$cat ]; then :; \
165 elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
166 else continue; \
167 fi; \
168 dir=$(localedir)/$$lang/LC_MESSAGES; \
169 echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
170 $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
171 done
172
173 mostlyclean:
174 -rm -f *.o
175
176 clean: mostlyclean
177 -rm -rf libcpp.a $(srcdir)/autom4te.cache
178
179 distclean: clean
180 -rm -f config.h stamp-h1 config.status config.cache config.log \
181 configure.lineno configure.status.lineno Makefile localedir.h \
182 localedir.hs $(DEPDIR)/*.Po
183 -rmdir $(DEPDIR)
184
185 maintainer-clean: distclean
186 @echo "This command is intended for maintainers to use"
187 @echo "it deletes files that may require special tools to rebuild."
188 -rm -f $(srcdir)/configure $(srcdir)/aclocal.m4
189
190 check:
191 installcheck:
192 dvi:
193 pdf:
194 html:
195 info:
196 install-info:
197 install-pdf:
198 install-man:
199 install-html:
200
201 update-po: $(CATALOGS:.gmo=.pox)
202
203 .PHONY: installdirs install install-strip mostlyclean clean distclean \
204 maintainer-clean check installcheck dvi pdf html info install-info \
205 install-man update-po install-html
206
207 # Dependency rule.
208 COMPILE.base = $(COMPILER) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(COMPILER_FLAGS) -c
209 ifeq ($(DEPMODE),depmode=gcc3)
210 # Note that we put the dependencies into a .Tpo file, then move them
211 # into place if the compile succeeds. We need this because gcc does
212 # not atomically write the dependency output file.
213 COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Tpo
214 POSTCOMPILE = @mv $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
215 else
216 COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
217 $(depcomp) $(COMPILE.base)
218 # depcomp handles atomicity for us, so we don't need a postcompile
219 # step.
220 POSTCOMPILE =
221 endif
222
223 # Implicit rules and I18N
224
225 .c.o:
226 $(COMPILE) $<
227 $(POSTCOMPILE)
228
229 # N.B. We do not attempt to copy these into $(srcdir).
230 .po.gmo:
231 $(mkinstalldirs) po
232 $(GMSGFMT) --statistics -o $@ $<
233
234 # The new .po has to be gone over by hand, so we deposit it into
235 # build/po with a different extension.
236 # If build/po/$(PACKAGE).pot exists, use it (it was just created),
237 # else use the one in srcdir.
238 .po.pox:
239 $(mkinstalldirs) po
240 $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
241 then echo po/$(PACKAGE).pot; \
242 else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
243
244 # Rule for regenerating the message template.
245 $(PACKAGE).pot: po/$(PACKAGE).pot
246 po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
247 $(mkinstalldirs) $(srcdir)/po
248 $(XGETTEXT) --default-domain=$(PACKAGE) \
249 --keyword=_ --keyword=N_ \
250 --keyword=cpp_error:3 \
251 --keyword=cpp_warning:3 \
252 --keyword=cpp_pedwarning:3 \
253 --keyword=cpp_warning_syshdr:3 \
254 --keyword=cpp_error_with_line:5 \
255 --keyword=cpp_warning_with_line:5 \
256 --keyword=cpp_pedwarning_with_line:5 \
257 --keyword=cpp_warning_with_line_syshdr:5 \
258 --keyword=cpp_errno:3 \
259 --keyword=SYNTAX_ERROR --keyword=SYNTAX_ERROR2 \
260 --copyright-holder="Free Software Foundation, Inc." \
261 --msgid-bugs-address="https://gcc.gnu.org/bugs/" \
262 --language=c -o po/$(PACKAGE).pot.tmp $^
263 sed 's:$(srcdir)/::g' <po/$(PACKAGE).pot.tmp >po/$(PACKAGE).pot
264 rm po/$(PACKAGE).pot.tmp
265
266 TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h system.h ucnid.h \
267 include/cpplib.h include/line-map.h include/mkdeps.h include/symtab.h
268
269 TAGS: $(TAGS_SOURCES)
270 cd $(srcdir) && etags $(TAGS_SOURCES)
271
272 # Tell versions [3.59,3.63) of GNU make to not export all variables.
273 # Otherwise a system limit (for SysV at least) may be exceeded.
274 .NOEXPORT:
275
276 # Dependencies
277 -include $(patsubst %.o, $(DEPDIR)/%.Po, $(libcpp_a_OBJS))
278
279 # Dependencies on generated headers have to be explicit.
280 init.o: localedir.h