]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/Makefile.in
sim/
[thirdparty/binutils-gdb.git] / sim / Makefile.in
1 # Makefile template for Configure for the sim library.
2 # Copyright (C) 1993, 1995, 1997, 1998, 2007, 2008, 2009
3 # Free Software Foundation, Inc.
4 # Written by Cygnus Support.
5 #
6 # This file is part of BFD, the Binary File Descriptor library.
7 #
8 # This program 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 of the License, or
11 # (at your option) any later version.
12 #
13 # This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
20
21 VPATH = @srcdir@
22 srcdir = @srcdir@
23
24 prefix = @prefix@
25 exec_prefix = @exec_prefix@
26
27 host_alias = @host_alias@
28 target_alias = @target_alias@
29 program_transform_name = @program_transform_name@
30 bindir = @bindir@
31 libdir = @libdir@
32 tooldir = $(libdir)/$(target_alias)
33
34 datarootdir = @datarootdir@
35 datadir = @datadir@
36 mandir = @mandir@
37 man1dir = $(mandir)/man1
38 man2dir = $(mandir)/man2
39 man3dir = $(mandir)/man3
40 man4dir = $(mandir)/man4
41 man5dir = $(mandir)/man5
42 man6dir = $(mandir)/man6
43 man7dir = $(mandir)/man7
44 man8dir = $(mandir)/man8
45 man9dir = $(mandir)/man9
46 infodir = @infodir@
47 includedir = @includedir@
48
49 SHELL = @SHELL@
50
51 INSTALL = @INSTALL@
52 INSTALL_PROGRAM = @INSTALL_PROGRAM@
53 INSTALL_DATA = @INSTALL_DATA@
54
55 AR = @AR@
56 AR_FLAGS = rc
57 CC = @CC@
58 CFLAGS = @CFLAGS@
59 CC_FOR_BUILD = @CC_FOR_BUILD@
60 CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
61 MAKEINFO = makeinfo
62 RANLIB = @RANLIB@
63
64 SUBDIRS = @subdirs@
65
66 INCDIR = $(srcdir)/../include
67 CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
68 DEP = mkdep
69
70 #### Makefile fragments come in here.
71 # @target_makefile_frag@
72 ###
73
74 # Name of the ChangeLog file.
75 ChangeLog = ChangeLog
76
77
78 RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
79 echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
80 fi`
81 RUNTESTFLAGS=
82
83 FLAGS_TO_PASS = \
84 "prefix=$(prefix)" \
85 "exec_prefix=$(exec_prefix)" \
86 "bindir=$(bindir)" \
87 "mandir=$(mandir)" \
88 "libdir=$(libdir)" \
89 "against=$(against)" \
90 "AR=$(AR)" \
91 "AR_FLAGS=$(AR_FLAGS)" \
92 "CC=$(CC)" \
93 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
94 "CFLAGS=$(CFLAGS)" \
95 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
96 "RANLIB=$(RANLIB)" \
97 "MAKEINFO=$(MAKEINFO)" \
98 "INSTALL=$(INSTALL)" \
99 "INSTALL_DATA=$(INSTALL_DATA)" \
100 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
101 "RUNTEST=$(RUNTEST)" \
102 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
103 "SHELL=$(SHELL)"
104
105 # The use of $$(x_FOR_TARGET) reduces the command line length by not
106 # duplicating the lengthy definition.
107 TARGET_FLAGS_TO_PASS = \
108 "prefix=$(prefix)" \
109 "exec_prefix=$(exec_prefix)" \
110 "against=$(against)" \
111 'CC=$$(CC_FOR_TARGET)' \
112 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
113 "CFLAGS=$(CFLAGS)" \
114 "CHILLFLAGS=$(CHILLFLAGS)" \
115 'CHILL=$$(CHILL_FOR_TARGET)' \
116 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
117 "CHILL_LIB=$(CHILL_LIB)" \
118 'CXX=$$(CXX_FOR_TARGET)' \
119 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
120 "CXXFLAGS=$(CXXFLAGS)" \
121 "INSTALL=$(INSTALL)" \
122 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
123 "INSTALL_DATA=$(INSTALL_DATA)" \
124 "MAKEINFO=$(MAKEINFO)" \
125 "RUNTEST=$(RUNTEST)" \
126 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
127
128
129 all:
130 @rootme=`pwd` ; export rootme ; \
131 for dir in . `echo ${SUBDIRS} | sed 's/testsuite//'` ; do \
132 if [ "$$dir" = "." ]; then \
133 true; \
134 elif [ -d $$dir ]; then \
135 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)) || exit 1; \
136 else true; fi; \
137 done
138
139 clean mostlyclean:
140 @rootme=`pwd` ; export rootme ; \
141 for dir in . ${SUBDIRS}; do \
142 if [ "$$dir" = "." ]; then \
143 true; \
144 elif [ -d $$dir ]; then \
145 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@) || exit 1; \
146 else true; fi; \
147 done
148
149 distclean maintainer-clean realclean:
150 @rootme=`pwd` ; export rootme ; \
151 for dir in . ${SUBDIRS}; do \
152 if [ "$$dir" = "." ]; then \
153 true; \
154 elif [ -d $$dir ]; then \
155 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@) || exit 1; \
156 else true; fi; \
157 done
158 rm -f Makefile config.cache config.log config.status
159
160 install:
161 @rootme=`pwd` ; export rootme ; \
162 for dir in . ${SUBDIRS}; do \
163 if [ "$$dir" = "." ]; then \
164 true; \
165 elif [ -d $$dir ]; then \
166 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install) || exit 1; \
167 else true; fi; \
168 done
169
170 installcheck:
171 @echo No installcheck target is available yet for the GNU simulators.
172
173 installcheck:
174
175 # The check target can not use subdir_do, because subdir_do does not
176 # use TARGET_FLAGS_TO_PASS.
177 check: force
178 @if [ -f testsuite/Makefile ]; then \
179 rootme=`pwd`; export rootme; \
180 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
181 cd testsuite; \
182 $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
183 else true; fi
184
185
186
187 info:
188 install-info:
189 dvi:
190 pdf:
191 install-pdf:
192 html:
193 install-html:
194
195 ###
196 ###
197
198 .NOEXPORT:
199 MAKEOVERRIDES=
200
201 .PHONY: check installcheck
202 check:
203 installcheck:
204
205 TAGS:
206
207 force:
208
209 Makefile: Makefile.in config.status
210 $(SHELL) ./config.status
211
212 config.status: configure
213 $(SHELL) ./config.status --recheck
214
215 # Utility to run autoconf in each directory that uses the common framework.
216 # This is intended to be invoked in $srcdir as
217 # "make -f Makefile.in autoconf-common SHELL=/bin/sh".
218 .PHONY: autoconf-common autoheader-common
219 autoconf-common autoheader-common:
220 for d in * ; \
221 do \
222 if [ -d $$d -a -f $$d/configure.ac ] ; \
223 then \
224 echo "Running autoconf in $$d ..." ; \
225 (cd $$d && autoconf --force) ; \
226 if [ $@ = autoheader-common ] && [ -f $$d/config.in ] ; \
227 then \
228 echo "Running autoheader in $$d ..." ; \
229 (cd $$d && autoheader --force) ; \
230 fi ; \
231 fi ; \
232 done
233
234 autoconf-changelog autoheader-changelog:
235 id=$(ID) ; \
236 test x$$id = x && id="`id | sed -e 's/^[^(]*(\([^)]*\).*$$/\1/'`" ; \
237 name=$(NAME) ; \
238 test x$$name = x && name=`grep "^$$id:" /etc/passwd | cut -f 5 -d ':'` ; \
239 host=$(HOST) ; \
240 test x$$host = x && host="`hostname`" ; \
241 date=$(DATE) ; \
242 test x$$date = x && date="`date +%Y-%m-%d`" ; \
243 echo "$$date $$name $$id@$$host" ; \
244 for d in * ; \
245 do \
246 if [ -d $$d -a -f $$d/configure.ac ] ; \
247 then \
248 echo "Creating new-$(ChangeLog) in $$d ..." ; \
249 ( echo "$$date $$name <$$id@$$host>" ; \
250 echo "" ; \
251 echo " * configure: Regenerated to track ../common/aclocal.m4 changes." ; \
252 if [ $@ = autoheader-changelog ] ; \
253 then \
254 echo " * config.in: Ditto." ; \
255 fi ; \
256 echo "" ; \
257 cat $$d/$(ChangeLog) \
258 ) > $$d/new-$(ChangeLog) ; \
259 fi ; \
260 done
261
262 autoconf-install autoheader-install:
263 for d in * ; \
264 do \
265 if [ -d $$d -a -f $$d/configure.ac ] ; \
266 then \
267 echo "Moving $$d/new-$(ChangeLog) to $$d/$(ChangeLog) ..." ; \
268 mv $$d/new-$(ChangeLog) $$d/$(ChangeLog) ; \
269 fi ; \
270 done