comparison libcpp/Makefile.in @ 0:a06113de4d67

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