]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/Makefile.in
objc-act.c: Change annotate_with_locus to SET_EXPR_LOCATION throughout.
[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
PB
36CFLAGS = @CFLAGS@
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@
078e3ffe 53
4f4e53dd 54datadir = @datadir@
078e3ffe 55exec_prefix = @prefix@
4f4e53dd 56libdir = @libdir@
4f4e53dd 57localedir = $(datadir)/locale
078e3ffe 58prefix = @prefix@
4f4e53dd 59
078e3ffe
PB
60MSGMERGE = msgmerge
61mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
62DEFS = -DLOCALEDIR="\"$(localedir)\""
63INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
64 -I$(srcdir)/include
65
66libcpp_a_OBJS = charset.o directives.o errors.o expr.o files.o \
67 identifiers.o init.o lex.o line-map.o macro.o mkdeps.o \
68 pch.o symtab.o traditional.o
69makedepend_OBJS = makedepend.o
70
71libcpp_a_SOURCES = charset.c directives.c errors.c expr.c files.c \
4f4e53dd
PB
72 identifiers.c init.c lex.c line-map.c macro.c mkdeps.c \
73 pch.c symtab.c traditional.c
74
078e3ffe 75all: libcpp.a makedepend$(EXEEXT) $(USED_CATALOGS)
4f4e53dd
PB
76
77.SUFFIXES:
78.SUFFIXES: .c .gmo .o .obj .po .pox
4f4e53dd 79
078e3ffe 80libcpp.a: $(libcpp_a_OBJS)
4f4e53dd 81 -rm -f libcpp.a
078e3ffe 82 $(AR) $(ARFLAGS) libcpp.a $(libcpp_a_OBJS)
4f4e53dd
PB
83 $(RANLIB) libcpp.a
84
078e3ffe 85makedepend$(EXEEXT): $(makedepend_OBJS) libcpp.a ../libiberty/libiberty.a
c6e83800 86 @rm -f makedepend$(EXEEXT)
078e3ffe
PB
87 $(CC) $(CFLAGS) $(LDFLAGS) -o makedepend$(EXEEXT) \
88 $(makedepend_OBJS) libcpp.a ../libiberty/libiberty.a \
89 $(LIBINTL) $(LIBICONV)
4f4e53dd 90
078e3ffe 91# Rules to rebuild the configuration
4f4e53dd 92
078e3ffe
PB
93Makefile: $(srcdir)/Makefile.in config.status
94 $(SHELL) ./config.status Makefile
4f4e53dd 95
078e3ffe
PB
96config.status: $(srcdir)/configure
97 $(SHELL) ./config.status --recheck
4f4e53dd 98
078e3ffe
PB
99$(srcdir)/configure: @MAINT@ $(srcdir)/aclocal.m4
100 cd $(srcdir) && $(AUTOCONF)
4f4e53dd 101
078e3ffe 102$(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../config/acx.m4 \
88fa57d7
KC
103 $(srcdir)/../config/gettext-sister.m4 $(srcdir)/../config/iconv.m4 \
104 $(srcdir)/../config/codeset.m4 $(srcdir)/../config/lib-ld.m4 \
105 $(srcdir)/../config/lib-link.m4 $(srcdir)/../config/lib-prefix.m4 \
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
078e3ffe
PB
116$(srcdir)/config.in: @MAINT@ $(srcdir)/configure
117 cd $(srcdir) && $(AUTOHEADER)
118 -rm -f stamp-h1
119
4f4e53dd 120
078e3ffe 121# Installation rules and other phony targets
4f4e53dd 122
078e3ffe
PB
123# These rule has to look for .gmo modules in both srcdir and
124# the cwd, and has to check that we actually have a catalog
125# for each language, in case they weren't built or included
126# with the distribution.
127installdirs:
128 @$(mkinstalldirs) $(DESTDIR)$(datadir); \
129 cats="$(CATALOGS)"; for cat in $$cats; do \
130 lang=`basename $$cat | sed 's/\.gmo$$//'`; \
131 if [ -f $$cat ] || [ -f $(srcdir)/$$cat ]; then \
132 dir=$(localedir)/$$lang/LC_MESSAGES; \
133 $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
134 fi; \
135 done
4f4e53dd 136
078e3ffe
PB
137install-strip install: all installdirs
138 cats="$(CATALOGS)"; for cat in $$cats; do \
139 lang=`basename $$cat | sed 's/\.gmo$$//'`; \
140 if [ -f $$cat ]; then :; \
141 elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
142 else continue; \
143 fi; \
144 dir=$(localedir)/$$lang/LC_MESSAGES; \
145 echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
146 $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
147 done
4f4e53dd 148
078e3ffe
PB
149mostlyclean:
150 -rm -f *.o
4f4e53dd 151
078e3ffe
PB
152clean: mostlyclean
153 -rm -f makedepend$(EXEEXT) libcpp.a $(srcdir)/autom4te.cache
4f4e53dd 154
078e3ffe
PB
155distclean: clean
156 -rm -f config.h stamp-h1 config.status config.cache config.log \
157 configure.lineno configure.status.lineno Makefile
4f4e53dd 158
078e3ffe
PB
159maintainer-clean: distclean
160 @echo "This command is intended for maintainers to use"
161 @echo "it deletes files that may require special tools to rebuild."
162 -rm -f $(srcdir)/configure $(srcdir)/aclocal.m4
163
164check:
165installcheck:
166dvi:
167html:
168info:
169install-info:
4f4e53dd
PB
170install-man:
171
078e3ffe 172update-po: $(CATALOGS:.gmo=.pox)
4f4e53dd 173
078e3ffe
PB
174.PHONY: installdirs install install-strip mostlyclean clean distclean \
175 maintainer-clean check installcheck dvi html info install-info \
176 install-man update-po
4f4e53dd 177
078e3ffe 178# Implicit rules and I18N
0ca8e815 179
078e3ffe
PB
180.c.o:
181 $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $<
4f4e53dd
PB
182
183# N.B. We do not attempt to copy these into $(srcdir).
184.po.gmo:
185 -test -d po || mkdir po
186 $(GMSGFMT) --statistics -o $@ $<
187
188# The new .po has to be gone over by hand, so we deposit it into
189# build/po with a different extension.
190# If build/po/$(PACKAGE).pot exists, use it (it was just created),
191# else use the one in srcdir.
192.po.pox:
193 -test -d po || mkdir po
194 $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
195 then echo po/$(PACKAGE).pot; \
196 else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
197
078e3ffe
PB
198# Rule for regenerating the message template.
199po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
4f4e53dd
PB
200 -test -d $(srcdir)/po || mkdir $(srcdir)/po
201 $(XGETTEXT) --default-domain=$(PACKAGE) \
202 --keyword=cpp_error,3 --keyword=cpp_errno,3 \
203 --keyword=cpp_error_with_line,5 \
204 --copyright-holder="Free Software Foundation, Inc." \
205 --msgid-bugs-address="http://gcc.gnu.org/bugs.html" \
206 --language=c -o po/$(PACKAGE).pot $^
078e3ffe
PB
207
208
4f4e53dd
PB
209# Tell versions [3.59,3.63) of GNU make to not export all variables.
210# Otherwise a system limit (for SysV at least) may be exceeded.
211.NOEXPORT:
078e3ffe
PB
212
213# Dependencies
214
215top_srcdir = $(srcdir)/..
216top_incdir = $(srcdir)/../include
217libcpp_incdir = $(srcdir)/../libcpp/include
218
219COMMON_DEPS = config.h $(srcdir)/system.h $(srcdir)/internal.h \
220 $(top_incdir)/libiberty.h $(top_incdir)/ansidecl.h \
221 $(top_incdir)/filenames.h $(top_incdir)/safe-ctype.h \
222 $(libcpp_incdir)/symtab.h $(top_incdir)/obstack.h \
223 $(libcpp_incdir)/line-map.h $(libcpp_incdir)/cpplib.h \
224 $(libcpp_incdir)/cpp-id-data.h $(top_incdir)/getopt.h
225
226charset.o: $(srcdir)/charset.c $(COMMON_DEPS) $(srcdir)/ucnid.h
227directives.o: $(srcdir)/directives.c $(COMMON_DEPS) $(libcpp_incdir)/mkdeps.h
228errors.o: $(srcdir)/errors.c $(COMMON_DEPS)
229expr.o: $(srcdir)/expr.c $(COMMON_DEPS)
230
231files.o: $(srcdir)/files.c $(COMMON_DEPS) $(libcpp_incdir)/mkdeps.h \
232 $(top_incdir)/hashtab.h $(top_incdir)/md5.h
233
234identifiers.o: $(srcdir)/identifiers.c $(COMMON_DEPS)
235init.o: $(srcdir)/init.c $(COMMON_DEPS) $(libcpp_incdir)/mkdeps.h
236lex.o: $(srcdir)/lex.c $(COMMON_DEPS)
237line-map.o: $(srcdir)/line-map.c $(COMMON_DEPS)
238macro.o: $(srcdir)/macro.c $(COMMON_DEPS)
239makedepend.o: $(srcdir)/makedepend.c $(COMMON_DEPS)
240mkdeps.o: $(srcdir)/mkdeps.c $(COMMON_DEPS)
241
242pch.o: $(srcdir)/pch.c $(COMMON_DEPS) \
243 $(top_incdir)/hashtab.h $(libcpp_incdir)/mkdeps.h
244
245symtab.o: $(srcdir)/symtab.c $(COMMON_DEPS)
246traditional.o: $(srcdir)/traditional.c $(COMMON_DEPS)