]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/Makefile.in
files.c (pchf_adder): Remove.
[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
078e3ffe 4# Copyright (C) 2004 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
10#the Free Software Foundation; either version 2, or (at your option)
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
PB
18#You should have received a copy of the GNU General Public License
19#along with libcpp; see the file COPYING. If not, write to
20#the Free Software Foundation, 59 Temple Place - Suite 330,
21#Boston MA 02111-1307, USA.
c6e83800 22
078e3ffe 23@SET_MAKE@
4f4e53dd
PB
24
25srcdir = @srcdir@
5d1f4b27 26top_builddir = .
4f4e53dd 27VPATH = @srcdir@
4f4e53dd 28INSTALL = @INSTALL@
4f4e53dd
PB
29AR = ar
30ARFLAGS = cru
4f4e53dd 31ACLOCAL = @ACLOCAL@
4f4e53dd
PB
32AUTOCONF = @AUTOCONF@
33AUTOHEADER = @AUTOHEADER@
4f4e53dd
PB
34CATALOGS = @CATALOGS@
35CC = @CC@
4f4e53dd 36CFLAGS = @CFLAGS@
018a4785 37WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
4f4e53dd
PB
38CPP = @CPP@
39CPPFLAGS = @CPPFLAGS@
4f4e53dd
PB
40EXEEXT = @EXEEXT@
41GMSGFMT = @GMSGFMT@
42INCINTL = @INCINTL@
43INSTALL_DATA = @INSTALL_DATA@
44INSTALL_PROGRAM = @INSTALL_PROGRAM@
45INSTALL_SCRIPT = @INSTALL_SCRIPT@
4f4e53dd
PB
46LDFLAGS = @LDFLAGS@
47LIBICONV = @LIBICONV@
48LIBINTL = @LIBINTL@
4f4e53dd 49PACKAGE = @PACKAGE@
4f4e53dd 50RANLIB = @RANLIB@
4f4e53dd 51SHELL = @SHELL@
078e3ffe 52USED_CATALOGS = @USED_CATALOGS@
4f4e53dd 53XGETTEXT = @XGETTEXT@
078e3ffe 54
4f4e53dd 55datadir = @datadir@
078e3ffe 56exec_prefix = @prefix@
4f4e53dd 57libdir = @libdir@
4f4e53dd 58localedir = $(datadir)/locale
078e3ffe 59prefix = @prefix@
4f4e53dd 60
078e3ffe
PB
61MSGMERGE = msgmerge
62mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
078e3ffe
PB
63INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
64 -I$(srcdir)/include
65
018a4785
ZW
66ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
67
078e3ffe
PB
68libcpp_a_OBJS = charset.o directives.o errors.o expr.o files.o \
69 identifiers.o init.o lex.o line-map.o macro.o mkdeps.o \
70 pch.o symtab.o traditional.o
71makedepend_OBJS = makedepend.o
72
73libcpp_a_SOURCES = charset.c directives.c errors.c expr.c files.c \
4f4e53dd
PB
74 identifiers.c init.c lex.c line-map.c macro.c mkdeps.c \
75 pch.c symtab.c traditional.c
76
078e3ffe 77all: libcpp.a makedepend$(EXEEXT) $(USED_CATALOGS)
4f4e53dd
PB
78
79.SUFFIXES:
80.SUFFIXES: .c .gmo .o .obj .po .pox
4f4e53dd 81
078e3ffe 82libcpp.a: $(libcpp_a_OBJS)
4f4e53dd 83 -rm -f libcpp.a
078e3ffe 84 $(AR) $(ARFLAGS) libcpp.a $(libcpp_a_OBJS)
4f4e53dd
PB
85 $(RANLIB) libcpp.a
86
078e3ffe 87makedepend$(EXEEXT): $(makedepend_OBJS) libcpp.a ../libiberty/libiberty.a
c6e83800 88 @rm -f makedepend$(EXEEXT)
078e3ffe
PB
89 $(CC) $(CFLAGS) $(LDFLAGS) -o makedepend$(EXEEXT) \
90 $(makedepend_OBJS) libcpp.a ../libiberty/libiberty.a \
91 $(LIBINTL) $(LIBICONV)
4f4e53dd 92
078e3ffe 93# Rules to rebuild the configuration
4f4e53dd 94
078e3ffe
PB
95Makefile: $(srcdir)/Makefile.in config.status
96 $(SHELL) ./config.status Makefile
4f4e53dd 97
078e3ffe
PB
98config.status: $(srcdir)/configure
99 $(SHELL) ./config.status --recheck
4f4e53dd 100
078e3ffe
PB
101$(srcdir)/configure: @MAINT@ $(srcdir)/aclocal.m4
102 cd $(srcdir) && $(AUTOCONF)
4f4e53dd 103
078e3ffe 104$(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../config/acx.m4 \
88fa57d7
KC
105 $(srcdir)/../config/gettext-sister.m4 $(srcdir)/../config/iconv.m4 \
106 $(srcdir)/../config/codeset.m4 $(srcdir)/../config/lib-ld.m4 \
107 $(srcdir)/../config/lib-link.m4 $(srcdir)/../config/lib-prefix.m4 \
108 $(srcdir)/configure.ac
078e3ffe 109 cd $(srcdir) && $(ACLOCAL) -I ../config
4f4e53dd 110
078e3ffe
PB
111config.h: stamp-h1
112 test -f config.h || (rm -f stamp-h1 && $(MAKE) stamp-h1)
4f4e53dd 113
078e3ffe
PB
114stamp-h1: $(srcdir)/config.in config.status
115 -rm -f stamp-h1
116 $(SHELL) ./config.status config.h
4f4e53dd 117
078e3ffe
PB
118$(srcdir)/config.in: @MAINT@ $(srcdir)/configure
119 cd $(srcdir) && $(AUTOHEADER)
120 -rm -f stamp-h1
018a4785
ZW
121
122# It is not possible to get LOCALEDIR defined in config.h because
123# the value it needs to be defined to is only determined in the
124# Makefile. Hence we do this instead.
125localedir.h: localedir.hs; @true
126localedir.hs: Makefile
127 echo "#define LOCALEDIR \"$(localedir)\"" > localedir.new
128 $(srcdir)/../move-if-change localedir.new localedir.h
129 echo timestamp > localedir.hs
4f4e53dd 130
078e3ffe 131# Installation rules and other phony targets
4f4e53dd 132
078e3ffe
PB
133# These rule has to look for .gmo modules in both srcdir and
134# the cwd, and has to check that we actually have a catalog
135# for each language, in case they weren't built or included
136# with the distribution.
137installdirs:
138 @$(mkinstalldirs) $(DESTDIR)$(datadir); \
139 cats="$(CATALOGS)"; for cat in $$cats; do \
140 lang=`basename $$cat | sed 's/\.gmo$$//'`; \
141 if [ -f $$cat ] || [ -f $(srcdir)/$$cat ]; then \
142 dir=$(localedir)/$$lang/LC_MESSAGES; \
143 $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
144 fi; \
145 done
4f4e53dd 146
078e3ffe
PB
147install-strip install: all installdirs
148 cats="$(CATALOGS)"; for cat in $$cats; do \
149 lang=`basename $$cat | sed 's/\.gmo$$//'`; \
150 if [ -f $$cat ]; then :; \
151 elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
152 else continue; \
153 fi; \
154 dir=$(localedir)/$$lang/LC_MESSAGES; \
155 echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
156 $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
157 done
4f4e53dd 158
078e3ffe
PB
159mostlyclean:
160 -rm -f *.o
4f4e53dd 161
078e3ffe 162clean: mostlyclean
018a4785 163 -rm -rf makedepend$(EXEEXT) libcpp.a $(srcdir)/autom4te.cache
4f4e53dd 164
078e3ffe
PB
165distclean: clean
166 -rm -f config.h stamp-h1 config.status config.cache config.log \
018a4785
ZW
167 configure.lineno configure.status.lineno Makefile localedir.h \
168 localedir.hs
4f4e53dd 169
078e3ffe
PB
170maintainer-clean: distclean
171 @echo "This command is intended for maintainers to use"
172 @echo "it deletes files that may require special tools to rebuild."
173 -rm -f $(srcdir)/configure $(srcdir)/aclocal.m4
174
175check:
176installcheck:
177dvi:
178html:
179info:
180install-info:
4f4e53dd
PB
181install-man:
182
078e3ffe 183update-po: $(CATALOGS:.gmo=.pox)
4f4e53dd 184
078e3ffe
PB
185.PHONY: installdirs install install-strip mostlyclean clean distclean \
186 maintainer-clean check installcheck dvi html info install-info \
187 install-man update-po
4f4e53dd 188
078e3ffe 189# Implicit rules and I18N
0ca8e815 190
078e3ffe 191.c.o:
018a4785 192 $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(ALL_CFLAGS) -c $<
4f4e53dd
PB
193
194# N.B. We do not attempt to copy these into $(srcdir).
195.po.gmo:
196 -test -d po || mkdir po
197 $(GMSGFMT) --statistics -o $@ $<
198
199# The new .po has to be gone over by hand, so we deposit it into
200# build/po with a different extension.
201# If build/po/$(PACKAGE).pot exists, use it (it was just created),
202# else use the one in srcdir.
203.po.pox:
204 -test -d po || mkdir po
205 $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
206 then echo po/$(PACKAGE).pot; \
207 else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
208
078e3ffe 209# Rule for regenerating the message template.
50f47ee0 210$(PACKAGE).pot: po/$(PACKAGE).pot
078e3ffe 211po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
4f4e53dd
PB
212 -test -d $(srcdir)/po || mkdir $(srcdir)/po
213 $(XGETTEXT) --default-domain=$(PACKAGE) \
50f47ee0
JM
214 --keyword=_ --keyword=N_ \
215 --keyword=cpp_error:3 --keyword=cpp_errno:3 \
216 --keyword=cpp_error_with_line:5 \
217 --keyword=SYNTAX_ERROR --keyword=SYNTAX_ERROR2 \
4f4e53dd
PB
218 --copyright-holder="Free Software Foundation, Inc." \
219 --msgid-bugs-address="http://gcc.gnu.org/bugs.html" \
50f47ee0
JM
220 --language=c -o po/$(PACKAGE).pot.tmp $^
221 sed 's:$(srcdir)/::g' <po/$(PACKAGE).pot.tmp >po/$(PACKAGE).pot
222 rm po/$(PACKAGE).pot.tmp
078e3ffe
PB
223
224
4f4e53dd
PB
225# Tell versions [3.59,3.63) of GNU make to not export all variables.
226# Otherwise a system limit (for SysV at least) may be exceeded.
227.NOEXPORT:
078e3ffe
PB
228
229# Dependencies
230
231top_srcdir = $(srcdir)/..
232top_incdir = $(srcdir)/../include
233libcpp_incdir = $(srcdir)/../libcpp/include
234
235COMMON_DEPS = config.h $(srcdir)/system.h $(srcdir)/internal.h \
236 $(top_incdir)/libiberty.h $(top_incdir)/ansidecl.h \
237 $(top_incdir)/filenames.h $(top_incdir)/safe-ctype.h \
238 $(libcpp_incdir)/symtab.h $(top_incdir)/obstack.h \
239 $(libcpp_incdir)/line-map.h $(libcpp_incdir)/cpplib.h \
240 $(libcpp_incdir)/cpp-id-data.h $(top_incdir)/getopt.h
241
242charset.o: $(srcdir)/charset.c $(COMMON_DEPS) $(srcdir)/ucnid.h
243directives.o: $(srcdir)/directives.c $(COMMON_DEPS) $(libcpp_incdir)/mkdeps.h
244errors.o: $(srcdir)/errors.c $(COMMON_DEPS)
245expr.o: $(srcdir)/expr.c $(COMMON_DEPS)
246
247files.o: $(srcdir)/files.c $(COMMON_DEPS) $(libcpp_incdir)/mkdeps.h \
248 $(top_incdir)/hashtab.h $(top_incdir)/md5.h
078e3ffe 249identifiers.o: $(srcdir)/identifiers.c $(COMMON_DEPS)
018a4785 250init.o: $(srcdir)/init.c $(COMMON_DEPS) $(libcpp_incdir)/mkdeps.h localedir.h
078e3ffe
PB
251lex.o: $(srcdir)/lex.c $(COMMON_DEPS)
252line-map.o: $(srcdir)/line-map.c $(COMMON_DEPS)
253macro.o: $(srcdir)/macro.c $(COMMON_DEPS)
7731405b 254makedepend.o: $(srcdir)/makedepend.c $(COMMON_DEPS) $(libcpp_incdir)/mkdeps.h
078e3ffe
PB
255mkdeps.o: $(srcdir)/mkdeps.c $(COMMON_DEPS)
256
257pch.o: $(srcdir)/pch.c $(COMMON_DEPS) \
258 $(top_incdir)/hashtab.h $(libcpp_incdir)/mkdeps.h
259
260symtab.o: $(srcdir)/symtab.c $(COMMON_DEPS)
261traditional.o: $(srcdir)/traditional.c $(COMMON_DEPS)