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