Makefile.in: Add some missing $(exeext).
[platform/upstream/gcc.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$(exeext)
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$(exeext) -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$(exeext), because chill-cross is always built for cross,
91 # and thus a cc1chill$(exeext) dependence would force cc1chill$(exeext) 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$(exeext): $(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$(exeext)
100
101 #\f
102 # Build hooks:
103
104 CHILL.all.build: chill
105 CHILL.all.cross: chill-cross
106 CHILL.start.encap: chill
107 CHILL.rest.encap:
108
109 CHILL.info: $(srcdir)/ch/chill.texi
110         $(MAKEINFO) -I$(srcdir)/ch $(srcdir)/ch/chill.texi -o chill.info
111
112 chill.dvi: $(srcdir)/ch/chill.texi $(srcdir)/extend.texi $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi $(srcdir)/tm.texi
113         cd ch ; \
114         TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex chill.texi ; \
115         texindex chill.?? ; \
116         TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex chill.texi
117 # FIXME: Not sure languages should do this.
118         cp ch/chill.dvi chill.dvi
119 #\f
120 # Install hooks:
121 # cc1chill is installed elsewhere as part of $(COMPILERS).
122
123 CHILL.install-normal:
124
125 # Install the driver program
126 CHILL.install-common:
127         -if [ -f cc1chill$(exeext) ] ; then \
128           if [ -f chill.install ] ; then \
129             if [ -f gcc-cross$(exeext) ]; then \
130               rm -f $(bindir)/$(CHILL_CROSS_NAME); \
131               $(INSTALL_PROGRAM) chill.install $(bindir)/$(CHILL_CROSS_NAME); \
132               chmod a+x $(bindir)/$(CHILL_CROSS_NAME); \
133             else \
134               rm -f $(bindir)/$(CHILL_INSTALL_NAME); \
135               $(INSTALL_PROGRAM) chill.install $(bindir)/$(CHILL_INSTALL_NAME); \
136               chmod a+x $(bindir)/$(CHILL_INSTALL_NAME); \
137             fi ; \
138           fi ; \
139         fi
140
141 CHILL.install-info:
142         -for i in chill.info*; do \
143           rm -f $(infodir)/$$i; \
144           $(INSTALL_DATA) $$i $(infodir)/$$i; \
145         done
146
147 CHILL.install-man:
148
149 CHILL.uninstall:
150         -rm -rf $(bindir)/$(CHILL_INSTALL_NAME)
151         -rm -rf $(bindir)/$(CHILL_CROSS_NAME)
152 #\f
153 # Clean hooks:
154 # A lot of the ancillary files are deleted by the main makefile.
155 # We just have to delete files specific to us.
156
157 CHILL.mostlyclean:
158         -rm -f chill.install ch/*.o ch/ch-version.c
159         -cd ch/runtime && $(MAKE) mostlyclean
160 CHILL.clean:
161 CHILL.distclean:
162         -rm -f ch/config.status ch/Makefile
163 CHILL.extraclean:
164 CHILL.maintainer-clean:
165         -rm -f ch/TAGS
166         -rm -f ch/chill.info* ch/chill.dvi ch/chill.??s ch/chill.*aux
167 # CYGNUS LOCAL: Delete locally created file.
168         -rm -f ch/hash.h
169 #\f
170 # Stage hooks:
171 # The main makefile has already created stage?/ch.
172
173 CHILL.stage1:
174         -mv ch/*.o stage1/ch
175 CHILL.stage2:
176         -mv ch/*.o stage2/ch
177 CHILL.stage3:
178         -mv ch/*.o stage3/ch
179 CHILL.stage4:
180         -mv ch/*.o stage4/ch
181 #\f
182 # Maintenance hooks:
183
184 # This target creates the files that can be rebuilt, but go in the
185 # distribution anyway.  It then copies the files to the distdir directory.
186 CHILL.distdir:
187         mkdir tmp/ch
188         cd ch ; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) hash.h
189         cd ch; \
190         for file in *[0-9a-zA-Z+]; do \
191           ln $$file ../tmp/ch >/dev/null 2>&1 || cp $$file ../tmp/ch; \
192         done