OSDN Git Service

* alpha.md (addsi3, subsi3): No new temporaries once cse is
[pf3gnuchains/gcc-fork.git] / gcc / ch / Make-lang.in
1 # Top level Makefile fragment for GNU CHILL.
2 #   Copyright (C) 1994 Free Software Foundation, Inc.
3
4 #This file is part of GNU CC.
5
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.
10
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.
15
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, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 # This file provides the language dependent support in the main Makefile.
21 # Each language makefile fragment must provide the following targets:
22 #
23 # foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
24 # foo.info, foo.dvi,
25 # foo.install-normal, foo.install-common, foo.install-info, foo.install-man,
26 # foo.uninstall, foo.distdir,
27 # foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean,
28 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
29 #
30 # where `foo' is the name of the language.
31 #
32 # It should also provide rules for:
33 #
34 # - making any compiler driver (eg: g++)
35 # - the compiler proper (eg: cc1plus)
36 # - define the names for selecting the language in LANGUAGES.
37 #\f
38 # define version of GNUCHILL compiler. Note: maybe we have to change the
39 # mechanism
40 GNUCHILL_VERSION = 1.5.2
41
42 # Actual names to use when installing a native compiler.
43 # (Cygnus configure overrides these when using -program-transform-name).
44 CHILL_INSTALL_NAME = chill
45
46 # Actual names to use when installing a cross-compiler.
47 # (Cygnus configure overrides these when using -program-transform-name).
48 CHILL_CROSS_NAME = $(target_alias)-chill
49
50 CHILL_SRCS = $(srcdir)/ch/actions.c $(srcdir)/ch/convert.c \
51  $(srcdir)/ch/decl.c $(srcdir)/ch/except.c $(srcdir)/ch/expr.c \
52  $(srcdir)/ch/grant.c $(srcdir)/ch/inout.c $(srcdir)/ch/lang.c \
53  $(srcdir)/ch/lex.c $(srcdir)/ch/loop.c \
54  $(srcdir)/ch/parse.c $(srcdir)/ch/satisfy.c \
55  $(srcdir)/ch/tasking.c $(srcdir)/ch/timing.c $(srcdir)/ch/tree.c \
56  $(srcdir)/ch/typeck.c
57
58 # Extra flags to pass to recursive makes.
59 CHILL_FLAGS_TO_PASS = \
60         "CHILLFLAGS=$(CHILLFLAGS)" \
61         "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
62         "CHILL_LIB=$(CHILL_LIB)" \
63         "CC=$(CC)" \
64         "GNUCHILL_VERSION=$(GNUCHILL_VERSION)"
65 #\f
66 # Define the names for selecting languages in LANGUAGES.
67 CHILL: chill cc1chill chill-runtime
68
69 # handle startfile in chill script and build script to install
70 chill: $(srcdir)/ch/chill.in Makefile
71         thisdir=`pwd` ; \
72         sed -e "s:startfile=chillrt0:startfile=$${thisdir}/ch/runtime/chillrt0.o:" \
73             -e "s:libpath=chillrt:libpath=-L$${thisdir}/ch/runtime/:" \
74             -e "s:whatgcc=gcc:whatgcc=\"$${thisdir}/xgcc -B$${thisdir}/\":" \
75             -e "s:gnuchill_version=unknown:gnuchill_version=$(GNUCHILL_VERSION):" \
76             -e "s:gnuchill_script_flags=:gnuchill_script_flags=\"$(GNUCHILL_SCRIPT_FLAGS)\":" $(srcdir)/ch/chill.in > chill ; \
77         chmod a+x chill ; \
78         if [ -f ../gcc-cross$(exeext) ]; then \
79           whatgcc=$(GCC_CROSS_NAME) ; \
80         else \
81           whatgcc=$(GCC_INSTALL_NAME) ; \
82         fi; \
83         sed -e "s:startfile=chillrt0:startfile=$(libsubdir)/chillrt0.o:" \
84             -e "s:whatgcc=gcc:whatgcc=$(bindir)/$${whatgcc}:" \
85             -e "s:gnuchill_version=unknown:gnuchill_version=$(GNUCHILL_VERSION):" \
86             -e "s:libpath=chillrt:libpath=:" \
87             -e "s:gnuchill_script_flags=:gnuchill_script_flags=\"$(GNUCHILL_SCRIPT_FLAGS)\":" $(srcdir)/ch/chill.in > chill.install ; \
88         chmod a+x chill.install
89
90 # Don't depend on cc1chill, because chill-cross is always built for cross,
91 # and thus a cc1chill dependence would force cc1chill to always be built.
92 # Note that gcc-cross and g++-cross do not have cc1 or cc1plus dependencies.
93 chill-cross: $(srcdir)/ch/chill.in
94         touch $@
95
96 cc1chill: $(P) $(CHILL_SRCS) $(LIBDEPS) stamp-objlist \
97         insn-config.h insn-flags.h insn-attr.h insn-codes.h \
98         c-typeck.o c-aux-info.o c-common.o c-iterate.o
99         cd ch; $(MAKE) $(FLAGS_TO_PASS) $(CHILL_FLAGS_TO_PASS) ../cc1chill
100
101 chill-runtime: stmp-headers $(GCC_PASSES)
102         case "$(LANGUAGES)" in \
103         *CHILL*) if [ -f ch/runtime/Makefile -a -z "$(CROSS)" ] ; then \
104                    thisdir1=`pwd`; \
105                    cd ch/runtime; $(MAKE) $(FLAGS_TO_PASS) $(CHILL_FLAGS_TO_PASS) GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" all ; \
106                  else true; fi ;; \
107         esac
108 #\f
109 # Build hooks:
110
111 CHILL.all.build: chill
112 CHILL.all.cross: chill-cross
113 CHILL.start.encap: chill
114 CHILL.rest.encap:
115
116 CHILL.info: $(srcdir)/ch/chill.texi
117         $(MAKEINFO) -I$(srcdir)/ch $(srcdir)/ch/chill.texi -o chill.info
118
119 chill.dvi: $(srcdir)/ch/chill.texi $(srcdir)/extend.texi $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi $(srcdir)/tm.texi
120         cd ch ; \
121         TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex chill.texi ; \
122         texindex chill.?? ; \
123         TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex chill.texi
124 # FIXME: Not sure languages should do this.
125         cp ch/chill.dvi chill.dvi
126 #\f
127 # Install hooks:
128 # cc1chill is installed elsewhere as part of $(COMPILERS).
129
130 CHILL.install-normal: install-libchill
131
132 # Install the CHILL run time library.
133 install-libchill: chill-runtime
134         if [ -f ch/runtime/libchill.a ] ; then \
135           $(INSTALL_DATA) ch/runtime/libchill.a $(libsubdir)/libchill.a; \
136           if $(RANLIB_TEST) ; then \
137             (cd $(libsubdir); $(RANLIB) libchill.a); else true; fi; \
138           chmod a-x $(libsubdir)/libchill.a; \
139           $(INSTALL_DATA) ch/runtime/chillrt0.o $(libsubdir)/chillrt0.o; \
140         else true; fi
141
142 # Install the driver program
143 CHILL.install-common:
144         -if [ -f cc1chill ] ; then \
145           if [ -f chill.install ] ; then \
146             if [ -f gcc-cross$(exeext) ]; then \
147               rm -f $(bindir)/$(CHILL_CROSS_NAME); \
148               $(INSTALL_PROGRAM) chill.install $(bindir)/$(CHILL_CROSS_NAME); \
149               chmod a+x $(bindir)/$(CHILL_CROSS_NAME); \
150             else \
151               rm -f $(bindir)/$(CHILL_INSTALL_NAME); \
152               $(INSTALL_PROGRAM) chill.install $(bindir)/$(CHILL_INSTALL_NAME); \
153               chmod a+x $(bindir)/$(CHILL_INSTALL_NAME); \
154             fi ; \
155           fi ; \
156         fi
157
158 CHILL.install-info:
159         -for i in chill.info*; do \
160           rm -f $(infodir)/$$i; \
161           $(INSTALL_DATA) $$i $(infodir)/$$i; \
162         done
163
164 CHILL.install-man:
165
166 CHILL.uninstall:
167         -rm -rf $(bindir)/$(CHILL_INSTALL_NAME)
168         -rm -rf $(bindir)/$(CHILL_CROSS_NAME)
169 #\f
170 # Clean hooks:
171 # A lot of the ancillary files are deleted by the main makefile.
172 # We just have to delete files specific to us.
173
174 CHILL.mostlyclean:
175         -rm -f chill.install ch/*.o ch/ch-version.c
176         -cd ch/runtime && $(MAKE) mostlyclean
177 CHILL.clean:
178 CHILL.distclean:
179         -rm -f ch/config.status ch/Makefile
180 CHILL.extraclean:
181 CHILL.maintainer-clean:
182         -rm -f ch/TAGS
183         -rm -f ch/chill.info* ch/chill.dvi ch/chill.??s ch/chill.*aux
184 # CYGNUS LOCAL: Delete locally created file.
185         -rm -f ch/hash.h
186 #\f
187 # Stage hooks:
188 # The main makefile has already created stage?/ch.
189
190 CHILL.stage1:
191         -mv ch/*.o stage1/ch
192 CHILL.stage2:
193         -mv ch/*.o stage2/ch
194 CHILL.stage3:
195         -mv ch/*.o stage3/ch
196 CHILL.stage4:
197         -mv ch/*.o stage4/ch
198 #\f
199 # Maintenance hooks:
200
201 # This target creates the files that can be rebuilt, but go in the
202 # distribution anyway.  It then copies the files to the distdir directory.
203 CHILL.distdir:
204         mkdir tmp/ch
205         cd ch ; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) hash.h
206         cd ch; \
207         for file in *[0-9a-zA-Z+]; do \
208           ln $$file ../tmp/ch >/dev/null 2>&1 || cp $$file ../tmp/ch; \
209         done