OSDN Git Service

* include/cpplib.h: Also update copyright years.
[pf3gnuchains/gcc-fork.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 top_builddir = .
27 VPATH = @srcdir@
28 INSTALL = @INSTALL@
29 AR = ar
30 ARFLAGS = cru
31 ACLOCAL = @ACLOCAL@
32 AUTOCONF = @AUTOCONF@
33 AUTOHEADER = @AUTOHEADER@
34 CATALOGS = @CATALOGS@
35 CC = @CC@
36 CFLAGS = @CFLAGS@
37 WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
38 CPP = @CPP@
39 CPPFLAGS = @CPPFLAGS@
40 EXEEXT = @EXEEXT@
41 GMSGFMT = @GMSGFMT@
42 INCINTL = @INCINTL@
43 INSTALL_DATA = @INSTALL_DATA@
44 INSTALL_PROGRAM = @INSTALL_PROGRAM@
45 INSTALL_SCRIPT = @INSTALL_SCRIPT@
46 LDFLAGS = @LDFLAGS@
47 LIBICONV = @LIBICONV@
48 LIBINTL = @LIBINTL@
49 PACKAGE = @PACKAGE@
50 RANLIB = @RANLIB@
51 SHELL = @SHELL@
52 USED_CATALOGS = @USED_CATALOGS@
53 XGETTEXT = @XGETTEXT@
54
55 datadir = @datadir@
56 exec_prefix = @prefix@
57 libdir = @libdir@
58 localedir = $(datadir)/locale
59 prefix = @prefix@
60
61 MSGMERGE = msgmerge
62 mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
63 INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
64         -I$(srcdir)/include
65
66 ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
67
68 libcpp_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
71 makedepend_OBJS = makedepend.o
72
73 libcpp_a_SOURCES = charset.c directives.c errors.c expr.c files.c \
74         identifiers.c init.c lex.c line-map.c macro.c mkdeps.c \
75         pch.c symtab.c traditional.c
76
77 all: libcpp.a makedepend$(EXEEXT) $(USED_CATALOGS)
78
79 .SUFFIXES:
80 .SUFFIXES: .c .gmo .o .obj .po .pox
81
82 libcpp.a: $(libcpp_a_OBJS)
83         -rm -f libcpp.a
84         $(AR) $(ARFLAGS) libcpp.a $(libcpp_a_OBJS)
85         $(RANLIB) libcpp.a
86
87 makedepend$(EXEEXT): $(makedepend_OBJS) libcpp.a ../libiberty/libiberty.a
88         @rm -f makedepend$(EXEEXT)
89         $(CC) $(CFLAGS) $(LDFLAGS) -o makedepend$(EXEEXT) \
90           $(makedepend_OBJS) libcpp.a ../libiberty/libiberty.a \
91           $(LIBINTL) $(LIBICONV)
92
93 # Rules to rebuild the configuration
94
95 Makefile: $(srcdir)/Makefile.in config.status
96         $(SHELL) ./config.status Makefile
97
98 config.status: $(srcdir)/configure
99         $(SHELL) ./config.status --recheck
100
101 $(srcdir)/configure: @MAINT@ $(srcdir)/aclocal.m4
102         cd $(srcdir) && $(AUTOCONF)
103
104 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../config/acx.m4 \
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
109         cd $(srcdir) && $(ACLOCAL) -I ../config
110
111 config.h: stamp-h1
112         test -f config.h || (rm -f stamp-h1 && $(MAKE) stamp-h1)
113
114 stamp-h1: $(srcdir)/config.in config.status
115         -rm -f stamp-h1
116         $(SHELL) ./config.status config.h
117
118 $(srcdir)/config.in: @MAINT@ $(srcdir)/configure
119         cd $(srcdir) && $(AUTOHEADER)
120         -rm -f stamp-h1
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.
125 localedir.h: localedir.hs; @true
126 localedir.hs: Makefile
127         echo "#define LOCALEDIR \"$(localedir)\"" > localedir.new
128         $(srcdir)/../move-if-change localedir.new localedir.h
129         echo timestamp > localedir.hs
130
131 # Installation rules and other phony targets
132
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.
137 installdirs:
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
146
147 install-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
158
159 mostlyclean:
160         -rm -f *.o
161
162 clean: mostlyclean
163         -rm -rf makedepend$(EXEEXT) libcpp.a $(srcdir)/autom4te.cache
164
165 distclean: clean
166         -rm -f config.h stamp-h1 config.status config.cache config.log \
167           configure.lineno configure.status.lineno Makefile localedir.h \
168           localedir.hs
169
170 maintainer-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
175 check:
176 installcheck:
177 dvi:
178 html:
179 info:
180 install-info:
181 install-man:
182
183 update-po: $(CATALOGS:.gmo=.pox)
184
185 .PHONY: installdirs install install-strip mostlyclean clean distclean \
186   maintainer-clean check installcheck dvi html info install-info \
187   install-man update-po
188
189 # Implicit rules and I18N
190
191 .c.o:
192         $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(ALL_CFLAGS) -c $<
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
209 # Rule for regenerating the message template.
210 $(PACKAGE).pot: po/$(PACKAGE).pot
211 po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
212         -test -d $(srcdir)/po || mkdir $(srcdir)/po
213         $(XGETTEXT) --default-domain=$(PACKAGE) \
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 \
218           --copyright-holder="Free Software Foundation, Inc." \
219           --msgid-bugs-address="http://gcc.gnu.org/bugs.html" \
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
223
224
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:
228
229 # Dependencies
230
231 top_srcdir = $(srcdir)/..
232 top_incdir = $(srcdir)/../include
233 libcpp_incdir = $(srcdir)/../libcpp/include
234
235 COMMON_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
242 charset.o: $(srcdir)/charset.c $(COMMON_DEPS) $(srcdir)/ucnid.h
243 directives.o: $(srcdir)/directives.c $(COMMON_DEPS) $(libcpp_incdir)/mkdeps.h
244 errors.o: $(srcdir)/errors.c $(COMMON_DEPS)
245 expr.o: $(srcdir)/expr.c $(COMMON_DEPS)
246
247 files.o: $(srcdir)/files.c $(COMMON_DEPS) $(libcpp_incdir)/mkdeps.h \
248    $(top_incdir)/hashtab.h $(top_incdir)/md5.h
249 identifiers.o: $(srcdir)/identifiers.c $(COMMON_DEPS)
250 init.o: $(srcdir)/init.c $(COMMON_DEPS) $(libcpp_incdir)/mkdeps.h localedir.h
251 lex.o: $(srcdir)/lex.c $(COMMON_DEPS)
252 line-map.o: $(srcdir)/line-map.c $(COMMON_DEPS)
253 macro.o: $(srcdir)/macro.c $(COMMON_DEPS)
254 makedepend.o: $(srcdir)/makedepend.c $(COMMON_DEPS) $(libcpp_incdir)/mkdeps.h
255 mkdeps.o: $(srcdir)/mkdeps.c $(COMMON_DEPS)
256
257 pch.o: $(srcdir)/pch.c $(COMMON_DEPS) \
258    $(top_incdir)/hashtab.h $(libcpp_incdir)/mkdeps.h
259
260 symtab.o: $(srcdir)/symtab.c $(COMMON_DEPS)
261 traditional.o: $(srcdir)/traditional.c $(COMMON_DEPS)