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