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