]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/Makefile.in
[sim]
[thirdparty/binutils-gdb.git] / sim / Makefile.in
CommitLineData
c906108c 1# Makefile template for Configure for the sim library.
e4d013fc 2# Copyright (C) 1993, 1995, 1997, 1998, 2007, 2008, 2009
9b254dd1 3# Free Software Foundation, Inc.
c906108c
SS
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
4744ac1b 10# the Free Software Foundation; either version 3 of the License, or
c906108c 11# (at your option) any later version.
4744ac1b 12#
c906108c
SS
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.
4744ac1b 17#
c906108c 18# You should have received a copy of the GNU General Public License
4744ac1b 19# along with this program. If not, see <http://www.gnu.org/licenses/>.
c906108c
SS
20
21VPATH = @srcdir@
22srcdir = @srcdir@
23
24prefix = @prefix@
25exec_prefix = @exec_prefix@
26
27host_alias = @host_alias@
28target_alias = @target_alias@
29program_transform_name = @program_transform_name@
30bindir = @bindir@
31libdir = @libdir@
32tooldir = $(libdir)/$(target_alias)
33
96e946ca 34datarootdir = @datarootdir@
c906108c
SS
35datadir = @datadir@
36mandir = @mandir@
37man1dir = $(mandir)/man1
38man2dir = $(mandir)/man2
39man3dir = $(mandir)/man3
40man4dir = $(mandir)/man4
41man5dir = $(mandir)/man5
42man6dir = $(mandir)/man6
43man7dir = $(mandir)/man7
44man8dir = $(mandir)/man8
45man9dir = $(mandir)/man9
46infodir = @infodir@
47includedir = @includedir@
48
49SHELL = @SHELL@
50
51INSTALL = @INSTALL@
52INSTALL_PROGRAM = @INSTALL_PROGRAM@
53INSTALL_DATA = @INSTALL_DATA@
54
55AR = @AR@
56AR_FLAGS = rc
57CC = @CC@
58CFLAGS = @CFLAGS@
59CC_FOR_BUILD = @CC_FOR_BUILD@
4b164edf 60CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
c906108c
SS
61MAKEINFO = makeinfo
62RANLIB = @RANLIB@
63
64SUBDIRS = @subdirs@
65
66INCDIR = $(srcdir)/../include
67CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
68DEP = mkdep
69
c906108c
SS
70#### Makefile fragments come in here.
71# @target_makefile_frag@
72###
73
c93abbcc
AC
74# Name of the ChangeLog file.
75ChangeLog = ChangeLog
76
77
c906108c
SS
78RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
79 echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
80 fi`
81RUNTESTFLAGS=
82
83FLAGS_TO_PASS = \
84 "prefix=$(prefix)" \
85 "exec_prefix=$(exec_prefix)" \
fb72cee0
AS
86 "bindir=$(bindir)" \
87 "mandir=$(mandir)" \
ce928021 88 "libdir=$(libdir)" \
c906108c
SS
89 "against=$(against)" \
90 "AR=$(AR)" \
91 "AR_FLAGS=$(AR_FLAGS)" \
92 "CC=$(CC)" \
93 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
94 "CFLAGS=$(CFLAGS)" \
4b164edf 95 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
c906108c
SS
96 "RANLIB=$(RANLIB)" \
97 "MAKEINFO=$(MAKEINFO)" \
98 "INSTALL=$(INSTALL)" \
99 "INSTALL_DATA=$(INSTALL_DATA)" \
100 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
792fe9c9 101 "RUNTEST=$(RUNTEST)" \
c906108c
SS
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.
107TARGET_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)" \
792fe9c9 125 "RUNTEST=$(RUNTEST)" \
c906108c
SS
126 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
127
128
129all:
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 \
8bdcadb1 135 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)) || exit 1; \
c906108c
SS
136 else true; fi; \
137 done
138
139clean mostlyclean:
140 @rootme=`pwd` ; export rootme ; \
141 for dir in . ${SUBDIRS}; do \
142 if [ "$$dir" = "." ]; then \
143 true; \
144 elif [ -d $$dir ]; then \
8bdcadb1 145 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@) || exit 1; \
c906108c
SS
146 else true; fi; \
147 done
148
149distclean 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 \
8bdcadb1 155 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@) || exit 1; \
c906108c
SS
156 else true; fi; \
157 done
158 rm -f Makefile config.cache config.log config.status
159
160install:
161 @rootme=`pwd` ; export rootme ; \
162 for dir in . ${SUBDIRS}; do \
163 if [ "$$dir" = "." ]; then \
164 true; \
165 elif [ -d $$dir ]; then \
8bdcadb1 166 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install) || exit 1; \
c906108c
SS
167 else true; fi; \
168 done
169
170installcheck:
171 @echo No installcheck target is available yet for the GNU simulators.
172
173installcheck:
174
175# The check target can not use subdir_do, because subdir_do does not
176# use TARGET_FLAGS_TO_PASS.
177check: 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
187info:
188install-info:
189dvi:
9453113a 190pdf:
89a34d1b
JM
191install-pdf:
192html:
193install-html:
c906108c
SS
194
195###
196###
197
198.NOEXPORT:
199MAKEOVERRIDES=
200
201.PHONY: check installcheck
202check:
203installcheck:
204
205TAGS:
206
207force:
208
209Makefile: Makefile.in config.status
210 $(SHELL) ./config.status
211
212config.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
e80204fc
HPN
217# "make -f Makefile.in autoconf-common SHELL=/bin/sh".
218.PHONY: autoconf-common autoheader-common
c906108c
SS
219autoconf-common autoheader-common:
220 for d in * ; \
221 do \
38f48d72 222 if [ -d $$d -a -f $$d/configure.ac ] ; \
c906108c
SS
223 then \
224 echo "Running autoconf in $$d ..." ; \
38f48d72 225 (cd $$d && autoconf --force) ; \
570ee7f0 226 if [ $@ = autoheader-common ] && [ -f $$d/config.in ] ; \
c906108c
SS
227 then \
228 echo "Running autoheader in $$d ..." ; \
38f48d72 229 (cd $$d && autoheader --force) ; \
c906108c
SS
230 fi ; \
231 fi ; \
232 done
233
234autoconf-changelog autoheader-changelog:
3832c25c
AC
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`" ; \
c906108c
SS
243 echo "$$date $$name $$id@$$host" ; \
244 for d in * ; \
245 do \
38f48d72 246 if [ -d $$d -a -f $$d/configure.ac ] ; \
c906108c 247 then \
c93abbcc 248 echo "Creating new-$(ChangeLog) in $$d ..." ; \
c906108c
SS
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 "" ; \
c93abbcc
AC
257 cat $$d/$(ChangeLog) \
258 ) > $$d/new-$(ChangeLog) ; \
c906108c
SS
259 fi ; \
260 done
261
262autoconf-install autoheader-install:
263 for d in * ; \
264 do \
38f48d72 265 if [ -d $$d -a -f $$d/configure.ac ] ; \
c906108c 266 then \
c93abbcc
AC
267 echo "Moving $$d/new-$(ChangeLog) to $$d/$(ChangeLog) ..." ; \
268 mv $$d/new-$(ChangeLog) $$d/$(ChangeLog) ; \
c906108c
SS
269 fi ; \
270 done