OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [treelang/] [Make-lang.in] - Blame information for rev 827

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
# Top level makefile fragment for TREELANG For GCC. -*- makefile -*-
2
 
3
#   Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005,
4
#   2006, 2007 Free Software Foundation, Inc.
5
 
6
#This file is part of GCC.
7
 
8
#GCC 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
#GCC 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 GCC; see the file COPYING3.  If not see
20
#.
21
 
22
 
23
# This file provides the language dependent support in the main Makefile.
24
# Each language makefile fragment must provide the following targets:
25
#
26
# foo.all.cross, foo.start.encap, foo.rest.encap,
27
# foo.install-common, foo.install-man, foo.install-info, foo.dvi, foo.pdf
28
# foo.html, foo.uninstall,
29
# foo.mostlyclean, foo.clean, foo.distclean,
30
# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
31
#
32
# where `foo' is the name of the language.
33
#
34
# It should also provide rules for:
35
#
36
# - making any compiler driver (eg: gcc)
37
# - the compiler proper (eg: tree1)
38
# - define the names for selecting the language in LANGUAGES.
39
#
40
 
41
## note program-prefix and program-suffix options are not supported
42
## just program_transform_name which is a sed script to transform the
43
## names
44
 
45
TREELANGSED = sed
46
TREELANGSEDFLAGS = -n
47
 
48
GCC_EXTRAS = -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include
49
 
50
# ./xgcc is the just built compiler. See GCC_FOR_TARGET in the GCC Makefile.in.
51
# If this can't be found, you probably have not done a bootstrap of GCC,
52
# which you need to do.
53
 
54
# GCC_FOR_TREELANG = ./xgcc $(GCC_EXTRAS)
55
 
56
TREE_GENERATED = lex.c parse.c parse.h parse.output
57
# We need to use something other than treelang here because the directory
58
# is called treelang
59
TREE_EXES = gtreelang
60
 
61
#strict warnings for treelang
62
treelang-warn = $(STRICT_WARN)
63
# bison emits some unused static arrays (yytoknum)
64
treelang/parse.o-warn = -Wno-error
65
# flex produces 'no previous prototype' warnings
66
treelang/lex.o-warn = -Wno-error
67
 
68
#
69
# Define the names for selecting treelang in LANGUAGES.
70
 
71
.phony: treelang
72
 
73
treelang:treelang.done
74
 
75
treelang.done: gtreelang$(exeext) tree1$(exeext)
76
        $(STAMP) treelang.done
77
 
78
# no preprocessor
79
 
80
# core compiler
81
tree1$(exeext): treelang/tree1.o treelang/treetree.o treelang/tree-convert.o \
82
        treelang/lex.o treelang/parse.o \
83
        $(BACKEND) $(LIBSDEPS) attribs.o
84
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
85
        treelang/tree1.o treelang/treetree.o treelang/tree-convert.o \
86
        treelang/lex.o treelang/parse.o \
87
        $(BACKEND) $(LIBS) attribs.o
88
 
89
# Create the compiler driver treelang.
90
gtreelang$(exeext): $(GCC_OBJS) version.o prefix.o intl.o $(EXTRA_GCC_OBJS) \
91
  $(LIBDEPS) treelang/spec.o
92
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ treelang/spec.o \
93
          $(GCC_OBJS) version.o prefix.o intl.o $(EXTRA_GCC_OBJS) $(LIBS)
94
 
95
 
96
 
97
#
98
# Compiling object files from source files.
99
 
100
# object file makes
101
 
102
treelang/tree1.o: treelang/tree1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
103
  $(FLAGS_H) toplev.h $(GGC_H) $(TREE_H) $(DIAGNOSTIC_H) treelang/treelang.h \
104
  input.h treelang/treetree.h options.h opts.h \
105
  treelang/treetree.h gt-treelang-tree1.h gtype-treelang.h
106
 
107
treelang/treetree.o: treelang/treetree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
108
  $(TM_H) $(TREE_H) $(FLAGS_H) output.h $(RTL_H) $(GGC_H) toplev.h \
109
  $(VARRAY_H) $(LANGHOOKS_DEF_H) langhooks.h treelang/treelang.h input.h \
110
  treelang/treetree.h treelang/parse.h $(TARGET_H)
111
 
112
treelang/tree-convert.o: treelang/tree-convert.c $(CONFIG_H) $(SYSTEM_H) \
113
  coretypes.h $(DIAGNOSTIC_H) $(TREE_H) $(FLAGS_H) toplev.h langhooks.h $(TM_H)
114
 
115
treelang/spec.o: treelang/spec.c $(CONFIG_H) $(SYSTEM_H) \
116
  coretypes.h $(DIAGNOSTIC_H) $(TREE_H) $(FLAGS_H) toplev.h langhooks.h $(TM_H)
117
 
118
treelang/parse.o: treelang/parse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
119
  $(TM_H) $(DIAGNOSTIC_H) treelang/treelang.h input.h treelang/treetree.h \
120
  toplev.h
121
 
122
treelang/lex.o: treelang/lex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
123
  $(TM_H) $(DIAGNOSTIC_H) $(TREE_H) treelang/treelang.h input.h \
124
  treelang/parse.h toplev.h
125
 
126
# generated files the files from lex and yacc are put into the source
127
# directory in case someone wants to build but does not have
128
# lex/yacc
129
 
130
treelang.srcextra: treelang/parse.c treelang/parse.h treelang/lex.c
131
        -cp -p $^ $(srcdir)/treelang
132
 
133
treelang/lex.c: treelang/lex.l
134
        -$(FLEX) $(FLEXFLAGS) -o$@ $<
135
 
136
treelang/parse.c treelang/parse.h treelang/parse.output: treelang/parse.y
137
        -$(BISON) $(BISONFLAGS) -v --defines --output=treelang/parse.c $<
138
 
139
# -v
140
 
141
#
142
# Build hooks:
143
 
144
treelang.all.cross:
145
        _error_not_here_yet - havent even thought about it - it may even work
146
 
147
treelang.start.encap:
148
treelang.rest.encap:
149
treelang.man:
150
treelang.srcman:
151
 
152
treelang.tags: force
153
        cd $(srcdir)/treelang; etags -o TAGS.sub *.y *.l *.c *.h; \
154
        etags --include TAGS.sub --include ../TAGS.sub
155
 
156
treelang.info: doc/treelang.info
157
 
158
treelang.srcinfo: doc/treelang.info
159
        -cp -p $^ $(srcdir)/doc
160
 
161
treelang.dvi: doc/treelang.dvi
162
 
163
treelang.pdf: doc/treelang.pdf
164
 
165
TEXI_TREELANG_FILES = treelang/treelang.texi \
166
         $(gcc_docdir)/include/gcc-common.texi \
167
         $(gcc_docdir)/include/gpl.texi \
168
         $(gcc_docdir)/include/fdl.texi \
169
         $(gcc_docdir)/include/funding.texi \
170
         gcc-vers.texi
171
 
172
doc/treelang.info: $(TEXI_TREELANG_FILES)
173
        $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir)/include -o $@ $<
174
 
175
doc/treelang.dvi: $(TEXI_TREELANG_FILES)
176
        $(TEXI2DVI) -I $(abs_docdir)/include -o $@ $<
177
 
178
doc/treelang.pdf: $(TEXI_TREELANG_FILES)
179
        $(TEXI2PDF) -I $(abs_docdir)/include -o $@ $<
180
 
181
treelang.html: $(build_htmldir)/treelang/index.html
182
 
183
$(build_htmldir)/treelang/index.html: $(TEXI_TREELANG_FILES)
184
        $(mkinstalldirs) $(@D)
185
        rm -f $(@D)/*
186
        $(TEXI2HTML) -I $(gcc_docdir)/include -I $(srcdir)/treelang -o $(@D) $<
187
 
188
#
189
# Install hooks:
190
 
191
# Install
192
.phony:treelang.install.common
193
.phony:treelang.install
194
 
195
treelang.install treelang.install.common treelang.install-common: treelang.install.common.done
196
 
197
treelang.install.common.done:  installdirs treelang.done
198
        for name in $(TREE_EXES); \
199
        do \
200
           if [ -f $$name ] ; then \
201
            name2="`echo \`basename $$name\` | sed -e '$(program_transform_name)' `"; \
202
            rm -f $(DESTDIR)$(bindir)/$$name2$(exeext); \
203
            echo $(INSTALL_PROGRAM) $$name$(exeext) $(DESTDIR)$(bindir)/$$name2$(exeext); \
204
            $(INSTALL_PROGRAM) $$name$(exeext) $(DESTDIR)$(bindir)/$$name2$(exeext); \
205
            chmod a+x $(DESTDIR)$(bindir)/$$name2$(exeext); \
206
          fi ; \
207
        done
208
        $(STAMP) treelang.install.common.done
209
 
210
# We might not be able to build the info files
211
treelang.install-info: $(DESTDIR)$(infodir)/treelang.info
212
 
213
treelang.install-man:
214
 
215
treelang.uninstall:
216
        for name in $(TREE_EXES); \
217
        do \
218
          echo $$name; \
219
          name2="`echo $$name | sed -e '$(program_transform_name)' `"; \
220
          echo becomes $$name2; \
221
          echo -rm -rf $(DESTDIR)$(bindir)/$$name2$(exeext); \
222
          rm -rf $(DESTDIR)$(bindir)/$$name2$(exeext); \
223
        done
224
        -rm treelang.install.common.done
225
 
226
#
227
# Clean hooks:
228
# A lot of the ancillary files are deleted by the main makefile.
229
# We just have to delete files specific to us.
230
 
231
treelang.mostlyclean:
232
        for name in $(TREE_EXES); \
233
        do \
234
          echo deleting $$name; \
235
          if [ -f treelang/$$name$(exeext) ] ; then \
236
            rm -f treelang/$$name$(exeext); \
237
          fi ; \
238
        done
239
        -rm -f treelang/*$(objext)
240
        -rm -f treelang/*$(coverageexts)
241
        -rm treelang.done
242
 
243
 
244
treelang.clean: treelang.mostlyclean
245
 
246
treelang.distclean: treelang.clean
247
        -rm -f treelang/config.status
248
        -rm -f treelang/*.output
249
 
250
treelang.maintainer-clean: treelang.distclean
251
        for name in $(TREE_GENERATED); \
252
        do \
253
          if [ -f $(srcdir)/treelang/$$name ] ; then \
254
             echo deleting $(srcdir)/treelang/$$name; \
255
             rm -f $(srcdir)/treelang/$$name; \
256
          fi ; \
257
        done
258
        -rm -R $(srcdir)/treelang/*~
259
 
260
 
261
#
262
# Stage hooks:
263
# The main makefile has already created stage?/treelang.
264
 
265
treelang.stage1: stage1-start
266
        -mv treelang/*$(objext) stage1/treelang
267
treelang.stage2: stage2-start
268
        -mv treelang/*$(objext) stage2/treelang
269
treelang.stage3: stage3-start
270
        -mv treelang/*$(objext) stage3/treelang
271
treelang.stage4: stage4-start
272
        -mv treelang/*$(objext) stage4/treelang
273
treelang.stageprofile: stageprofile-start
274
        -mv treelang/*$(objext) stageprofile/treelang
275
treelang.stagefeedback: stagefeedback-start
276
        -mv treelang/*$(objext) stagefeedback/treelang
277
#
278
# Maintenance hooks:
279
 
280
# test hook
281
 
282
check-treelang: treelang.check
283
 
284
TESTSUITEDIR = testsuite
285
 
286
treelang.check: $(TESTSUITEDIR)/site.exp
287
        -mkdir testsuite/treelang
288
 
289
# these three files are empty and it seems diff has trouble generating
290
# patch files for new empty files as required for cvs.
291
# STAMP does not cut it here as I need an empty file.
292
        -rootme=`${PWD_COMMAND}`; export rootme; \
293
        srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
294
        cd testsuite; \
295
        EXPECT=${EXPECT} ; export EXPECT ; \
296
        if [ -f $${rootme}/../expect/expect ] ; then  \
297
           TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
298
           export TCL_LIBRARY ; fi ; \
299
        PATH=`cd ..;${PWD_COMMAND}`:$$PATH; export PATH; \
300
        gcc_extras="-B`cd ..;${PWD_COMMAND}` -B`cd ..;${PWD_COMMAND}`/treelang"; export gcc_extras; \
301
        $(RUNTEST) --tool treelang $(RUNTESTFLAGS)
302
 
303
# copy the output files from the current test to source ie say the new results are OK
304
treelang.check.fix: force
305
        srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ;
306
        -cp testsuite/treelang/*.out* t
307
        -cp testsuite/treelang/*runpgm* t
308
        -rm -f t/*nofilename
309
 
310
#
311
 
312
config.status: treelang/config-lang.in

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.