(arm_comp_type_attributes): Simply and comment tests on type attributes.
[official-gcc.git] / gcc / ch / Makefile.in
blob57c1ebbf44481c945e8f0087be23bf4ed90a4d43
1 # Makefile for GNU CHILL compiler.
2 # Copyright (C) 1987, 88, 90-94, 1998, 1999 Free Software Foundation, Inc.
4 #This file is part of GNU CC.
6 #GNU CC is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 2, or (at your option)
9 #any later version.
11 #GNU CC is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 #GNU General Public License for more details.
16 #You should have received a copy of the GNU General Public License
17 #along with GNU CC; see the file COPYING. If not, write to
18 #the Free Software Foundation, 59 Temple Place - Suite 330,
19 #Boston, MA 02111-1307, USA. */
21 # The makefile built from this file lives in the language subdirectory.
22 # It's purpose is to provide support for:
24 # 1) recursion where necessary, and only then (building .o's), and
25 # 2) building and debugging cc1 from the language subdirectory, and
26 # 3) nothing else.
28 # The parent makefile handles all other chores, with help from the
29 # language makefile fragment, of course.
31 # The targets for external use are:
32 # all, TAGS, ???mostlyclean, ???clean.
34 # Suppress smart makes who think they know how to automake Yacc files
35 .y.c:
38 # Variables that exist for you to override.
39 # See below for how to change them for certain systems.
41 # Various ways of specifying flags for compilations:
42 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
43 # BOOT_CFLAGS is the value of CFLAGS to pass
44 # to the stage2 and stage3 compilations
45 # XCFLAGS is used for most compilations but not when using the GCC just built.
46 XCFLAGS =
47 CFLAGS = -g
48 BOOT_CFLAGS = -O $(CFLAGS)
49 # These exists to be overridden by the x-* and t-* files, respectively.
50 X_CFLAGS =
51 T_CFLAGS =
53 X_CPPFLAGS =
54 T_CPPFLAGS =
56 CC = cc
57 AR = ar
58 AR_FLAGS = rc
59 SHELL = /bin/sh
60 MAKEINFO = makeinfo
61 TEXI2DVI = texi2dvi
63 # Define this as & to perform parallel make on a Sequent.
64 # Note that this has some bugs, and it seems currently necessary
65 # to compile all the gen* files first by hand to avoid erroneous results.
66 P =
68 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
69 # It omits XCFLAGS, and specifies -B./.
70 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
71 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
73 # Tools to use when building a cross-compiler.
74 # These are used because `configure' appends `cross-make'
75 # to the makefile when making a cross-compiler.
77 # CYGNUS LOCAL: we don't use cross-make. Instead we use the tools
78 # from the build tree, if they are available.
79 # program_transform_name and objdir are set by configure.in.
80 program_transform_name =
81 objdir = .
83 target= ... `configure' substitutes actual target name here.
84 xmake_file= ... `configure' substitutes actual x- file name here.
85 tmake_file= ... `configure' substitutes actual t- file name here.
86 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
87 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
89 # Directory where sources are, from where we are.
90 srcdir = .
92 # CYGNUS LOCAL
93 # Directory where texinfo.tex lives
94 texidir = $(srcdir)/../../texinfo
96 # Additional system libraries to link with.
97 CLIB=
99 # Choose the real default target.
100 ALL=all
102 # End of variables for you to override.
104 # Definition of `all' is here so that new rules inserted by sed
105 # do not specify the default target.
106 all: all.indirect
108 # This tells GNU Make version 3 not to put all variables in the environment.
109 .NOEXPORT:
111 # sed inserts variable overrides after the following line.
112 ####target overrides
113 ####host overrides
114 ####cross overrides
115 ####build overrides
116 ####site overrides
118 # Now figure out from those variables how to compile and link.
120 all.indirect: Makefile ../chill ../cc1chill$(exeext)
122 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
123 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
125 # This is the variable actually used when we compile.
126 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
128 # Likewise.
129 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
131 # This is where we get libiberty.a from.
132 LIBIBERTY = ../../libiberty/libiberty.a
134 # How to link with both our special library facilities
135 # and the system's installed libraries.
136 LIBS = $(LIBIBERTY) $(CLIB)
137 LIBDEPS = $(LIBIBERTY)
139 # Specify the directories to be searched for header files.
140 # Both . and srcdir are used, in that order,
141 # so that tm.h and config.h will be found in the compilation
142 # subdirectory rather than in the source directory.
143 INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config -I$(srcdir)/../../include
145 # Flags to pass to recursive makes.
146 # ??? $(CC) may need some work to handle stage[123].
147 # ??? The choices here will need some experimenting with.
148 FLAGS_TO_PASS = \
149 "AR_FLAGS=$(AR_FLAGS)" \
150 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
151 "BISON=$(BISON)" \
152 "BISONFLAGS=$(BISONFLAGS)" \
153 "CC=$(CC)" \
154 "CFLAGS=$(CFLAGS)" \
155 "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
156 "LDFLAGS=$(LDFLAGS)" \
157 "LEX=$(LEX)" \
158 "LEXFLAGS=$(LEXFLAGS)" \
159 "MAKEINFO=$(MAKEINFO)" \
160 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
161 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
162 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
163 "SHELL=$(SHELL)" \
164 "exec_prefix=$(exec_prefix)" \
165 "prefix=$(prefix)" \
166 "tooldir=$(tooldir)" \
167 "bindir=$(bindir)" \
168 "libsubdir=$(libsubdir)"
170 # Always use -I$(srcdir)/config when compiling.
171 .c.o:
172 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
174 # This tells GNU make version 3 not to export all the variables
175 # defined in this file into the environment.
176 .NOEXPORT:
178 # Lists of files for various purposes.
180 # Language-specific object files for CHILL
182 #C_OBJS = ../cpplib.o ../cppexp.o ../cpphash.o ../cpperror.o
184 CHILL_OBJS = parse.o actions.o except.o grant.o lang.o \
185 tree.o lex.o decl.o typeck.o convert.o expr.o loop.o \
186 tasking.o timing.o inout.o satisfy.o ch-version.o \
187 ../ggc-callbacks.o
189 # Language-independent object files.
190 OBJS = `cat ../stamp-objlist`
191 OBJDEPS = ../stamp-objlist
193 ../cc1chill$(exeext): $(P) $(CHILL_OBJS) $(OBJDEPS) $(LIBDEPS)
194 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(CHILL_OBJS) \
195 $(OBJS) $(C_OBJS) $(LIBS)
197 # This executable is used in the CHILL regression
198 # test script
199 utils/printf : $(srcdir)/utils/printf.c
200 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $<
203 # This is the top-level trigger for a CHILL regression test.
204 # It also builds those tools needed for CHILL regression testing.
206 check: ../cc1chill$(exeext) utils/printf
207 cd ..; $(MAKE) $(FLAGS_TO_PASS) xgcc gcov cpp cc1 ld
208 $(srcdir)/regression.sh -d -p
210 clean-tests:
211 cd testsuite/execute; $(MAKE) clean
212 cd testsuite/execute/oe; $(MAKE) clean
213 cd testsuite/compile/elektra; $(MAKE) clean
214 cd testsuite/compile/votrics; $(MAKE) clean
215 cd testsuite/compile; $(MAKE) clean
216 cd testsuite/noncompile; $(MAKE) clean
217 cd testsuite/examples; $(MAKE) clean
219 mostlyclean:
220 test -d testsuite && $(MAKE) clean-tests
221 rm -f *.o
223 clean: mostlyclean
226 Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure
227 cd ..; $(SHELL) config.status
229 native: config.status ../cc1chill$(exeext) ../chill
231 # Compiling object files from source files.
233 # Note that dependencies on obstack.h are not written
234 # because that file is not part of GCC.
236 # CHILL language specific files.
238 RTL_H = $(srcdir)/../rtl.h $(srcdir)/../rtl.def \
239 $(srcdir)/../machmode.h $(srcdir)/../machmode.def
240 TREE_H = $(srcdir)/../tree.h $(srcdir)/../real.h $(srcdir)/../tree.def \
241 $(srcdir)/../machmode.h $(srcdir)/../machmode.def
242 CHILL_TREE_H = $(TREE_H) ch-tree.h ch-tree.def
244 # hash.h really depends on $(srcdir)/gperf.
245 # But this would screw things for people that don't have gperf,
246 # if gperf got touched, say.
247 # Thus you have to remove hash.h to force it to be re-made.
248 # Note: CHILL requires two sets of keywords, one all uppercase and
249 # one all lowercase. The hash table ends up with both sets in it.
250 $(srcdir)/hash.h:
251 sed -e '1,/^%%/d' < $(srcdir)/gperf | \
252 sed '/^[^a-zA-Z]/d' | tr "[a-z]" "[A-Z]" > gperf.tmp
253 gawk '{ printf ("s/^%s,/%s,/\n", $$1, toupper ($$1)) }' < gperf.tmp > sed.tmp
254 sed -f sed.tmp < gperf.tmp > gperf.tmp2
255 cat $(srcdir)/gperf gperf.tmp2 > gperf.tmp
256 gperf -L C -F ', 0, 0, 0' -D -E -S1 -p -j1 -i 1 -g -o -t -k'*' \
257 gperf.tmp > $(srcdir)/hash.h || ( \
258 echo "Please update your 'gperf' from the GCC infrastructure" >&2 ; \
259 echo " ftp://sourceware.cygnus.com/pub/egcs/infrastructure/gperf*" >&2 ; \
260 exit 1 )
261 $(RM) gperf.tmp gperf.tmp2 sed.tmp
263 actions.o : actions.c $(CONFIG_H) $(CHILL_TREE_H) actions.h $(RTL_H) \
264 lex.h $(srcdir)/../flags.h $(srcdir)/../input.h \
265 $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../system.h \
266 $(srcdir)/../toplev.h
267 convert.o : convert.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
268 $(srcdir)/../tree.h $(srcdir)/../system.h $(srcdir)/../toplev.h \
269 $(srcdir)/../convert.h
270 decl.o : decl.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h lex.h \
271 $(srcdir)/../system.h $(srcdir)/../toplev.h
272 except.o : except.c $(CONFIG_H) $(srcdir)/../tree.h $(RTL_H) $(CHILL_TREE_H) \
273 $(srcdir)/../system.h $(srcdir)/../toplev.h
274 expr.o : expr.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
275 $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../tree.h lex.h \
276 $(srcdir)/../system.h $(srcdir)/../toplev.h
277 grant.o: grant.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
278 $(srcdir)/../input.h lex.h actions.h $(srcdir)/../system.h \
279 $(srcdir)/../toplev.h $(srcdir)/../output.h
280 inout.o : inout.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
281 $(srcdir)/../input.h $(srcdir)/../system.h $(srcdir)/../toplev.h
282 lang.o : lang.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../input.h lex.h \
283 $(srcdir)/../system.h $(srcdir)/../toplev.h
284 lex.o : lex.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
285 $(srcdir)/../input.h $(srcdir)/parse.h $(srcdir)/../system.h \
286 $(srcdir)/../toplev.h lex.h $(srcdir)/../dwarfout.h hash.h
287 loop.o : loop.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) lex.h \
288 $(srcdir)/../flags.h $(srcdir)/../input.h \
289 $(srcdir)/../tree.h $(srcdir)/../system.h $(srcdir)/../toplev.h
290 parse.o : parse.c $(CONFIG_H) $(CHILL_TREE_H) parse.h \
291 lex.h actions.h tasking.h $(srcdir)/../system.h $(srcdir)/../toplev.h
292 satisfy.o : satisfy.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../tree.h \
293 $(srcdir)/../flags.h lex.h $(srcdir)/../system.h $(srcdir)/../toplev.h
294 timing.o : timing.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
295 $(srcdir)/../input.h lex.h $(srcdir)/../system.h $(srcdir)/../toplev.h
296 tasking.o : tasking.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) \
297 $(srcdir)/../flags.h $(srcdir)/../input.h \
298 lex.h $(srcdir)/../system.h $(srcdir)/../toplev.h
299 tree.o : tree.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../system.h \
300 $(srcdir)/../toplev.h
301 typeck.o : typeck.c $(CONFIG_H) $(CHILL_TREE_H) ../insn-codes.h \
302 $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../flags.h lex.h \
303 $(srcdir)/../system.h $(srcdir)/../toplev.h $(srcdir)/../output.h
304 ch-version.o : ch-version.c
305 ch-version.c : Makefile
306 echo 'const char * const gnuchill_version = "$(GNUCHILL_VERSION)";' > $@
308 ## This is ugly, but I don't want GNU make to put these variables in
309 ## the environment. Older makes will see this as a set of targets
310 ## with no dependencies and no actions.
311 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
314 # These exist for maintenance purposes.
316 # Update the tags table.
317 TAGS: force
318 cd $(srcdir); \
319 etags *.y *.h *.c *.l ../*.h ../*.c; \
321 .PHONY: TAGS
323 force: