]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/Makefile.in
Add autoheader counterpart to autoconf-common et.al.
[thirdparty/binutils-gdb.git] / sim / Makefile.in
CommitLineData
e856060f 1# Makefile template for Configure for the sim library.
b69cc8ab 2# Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
e856060f
SC
3# Written by Cygnus Support.
4#
5# This file is part of BFD, the Binary File Descriptor library.
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
9fc3ba75 19# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
e856060f 20
1ffd292b
C
21VPATH = @srcdir@
22srcdir = @srcdir@
e856060f 23
1ffd292b
C
24prefix = @prefix@
25exec_prefix = @exec_prefix@
26
27host_alias = @host_alias@
28target_alias = @target_alias@
29program_transform_name = @program_transform_name@
27b9abfd
DE
30bindir = @bindir@
31libdir = @libdir@
1ffd292b 32tooldir = $(libdir)/$(target_alias)
e856060f 33
27b9abfd
DE
34datadir = @datadir@
35mandir = @mandir@
e856060f
SC
36man1dir = $(mandir)/man1
37man2dir = $(mandir)/man2
38man3dir = $(mandir)/man3
39man4dir = $(mandir)/man4
40man5dir = $(mandir)/man5
41man6dir = $(mandir)/man6
42man7dir = $(mandir)/man7
43man8dir = $(mandir)/man8
44man9dir = $(mandir)/man9
27b9abfd
DE
45infodir = @infodir@
46includedir = @includedir@
e856060f
SC
47
48SHELL = /bin/sh
49
27b9abfd
DE
50INSTALL = @INSTALL@
51INSTALL_PROGRAM = @INSTALL_PROGRAM@
52INSTALL_DATA = @INSTALL_DATA@
becbe1c3 53
9fc3ba75 54AR = @AR@
e856060f 55AR_FLAGS = rc
9fc3ba75
MM
56CC = @CC@
57CFLAGS = @CFLAGS@
58CC_FOR_BUILD = @CC_FOR_BUILD@
e856060f 59MAKEINFO = makeinfo
9fc3ba75 60RANLIB = @RANLIB@
e856060f 61
1ffd292b
C
62SUBDIRS = @subdirs@
63
64.NOEXPORT:
becbe1c3
RP
65MAKEOVERRIDES=
66
1ffd292b 67
e856060f
SC
68INCDIR = $(srcdir)/../include
69CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
70DEP = mkdep
71
9fc3ba75
MM
72# compilers to use to create programs which must be run in the build
73# environment.
74CC_FOR_BUILD = $(CC)
47dba87a 75
1ffd292b
C
76#### Makefile fragments come in here.
77# @target_makefile_frag@
e856060f
SC
78###
79
b69cc8ab
AC
80RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
81 echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
82 fi`
83RUNTESTFLAGS=
84
e856060f
SC
85FLAGS_TO_PASS = \
86 "prefix=$(prefix)" \
87 "exec_prefix=$(exec_prefix)" \
88 "against=$(against)" \
89 "AR=$(AR)" \
90 "AR_FLAGS=$(AR_FLAGS)" \
91 "CC=$(CC)" \
9fc3ba75 92 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
e856060f
SC
93 "CFLAGS=$(CFLAGS)" \
94 "RANLIB=$(RANLIB)" \
95 "MAKEINFO=$(MAKEINFO)" \
96 "INSTALL=$(INSTALL)" \
97 "INSTALL_DATA=$(INSTALL_DATA)" \
b69cc8ab
AC
98 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
99 "RUNTEST=$(RUNTEST)" \
100 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
101
102# The use of $$(x_FOR_TARGET) reduces the command line length by not
103# duplicating the lengthy definition.
104TARGET_FLAGS_TO_PASS = \
105 "prefix=$(prefix)" \
106 "exec_prefix=$(exec_prefix)" \
107 "against=$(against)" \
108 'CC=$$(CC_FOR_TARGET)' \
109 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
110 "CFLAGS=$(CFLAGS)" \
111 "CHILLFLAGS=$(CHILLFLAGS)" \
112 'CHILL=$$(CHILL_FOR_TARGET)' \
113 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
114 "CHILL_LIB=$(CHILL_LIB)" \
115 'CXX=$$(CXX_FOR_TARGET)' \
116 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
117 "CXXFLAGS=$(CXXFLAGS)" \
118 "INSTALL=$(INSTALL)" \
119 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
120 "INSTALL_DATA=$(INSTALL_DATA)" \
121 "MAKEINFO=$(MAKEINFO)" \
122 "RUNTEST=$(RUNTEST)" \
123 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
124
9fc3ba75
MM
125
126all:
c8cd6f23 127 @rootme=`pwd` ; export rootme ; \
b69cc8ab 128 for dir in . `echo ${SUBDIRS} | sed 's/testsuite//'` ; do \
c8cd6f23
ILT
129 if [ "$$dir" = "." ]; then \
130 true; \
131 elif [ -d $$dir ]; then \
132 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \
133 else true; fi; \
134 done
9fc3ba75 135
9fc3ba75 136distclean maintainer-clean realclean:
c8cd6f23 137 @rootme=`pwd` ; export rootme ; \
c8cd6f23
ILT
138 for dir in . ${SUBDIRS}; do \
139 if [ "$$dir" = "." ]; then \
140 true; \
141 elif [ -d $$dir ]; then \
142 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@); \
143 else true; fi; \
144 done
1ffd292b 145 rm -f Makefile config.cache config.log config.status
68dd3014 146
9fc3ba75 147install:
c8cd6f23 148 @rootme=`pwd` ; export rootme ; \
c8cd6f23
ILT
149 for dir in . ${SUBDIRS}; do \
150 if [ "$$dir" = "." ]; then \
27b9abfd 151 true; \
c8cd6f23
ILT
152 elif [ -d $$dir ]; then \
153 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install); \
154 else true; fi; \
155 done
9fc3ba75 156
b69cc8ab
AC
157installcheck:
158 @echo No installcheck target is available yet for the GNU simulators.
159
160installcheck:
161
162# The check target can not use subdir_do, because subdir_do does not
163# use TARGET_FLAGS_TO_PASS.
164check: force
165 @if [ -f testsuite/Makefile ]; then \
166 rootme=`pwd`; export rootme; \
167 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
168 cd testsuite; \
169 $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
170 else true; fi
171
172
173
a86ea03f
SC
174info:
175install-info:
b23eaace 176dvi:
e856060f 177
68dd3014
JK
178###
179###
47dba87a 180
68dd3014
JK
181.PHONY: check installcheck
182check:
183installcheck:
ad5fcc62 184
1ffd292b
C
185TAGS:
186
e856060f
SC
187force:
188
9fc3ba75 189Makefile: Makefile.in config.status
e856060f 190 $(SHELL) ./config.status
1ffd292b
C
191
192config.status: configure
193 $(SHELL) ./config.status --recheck
27b9abfd
DE
194
195# Utility to run autoconf in each directory that uses the common framework.
196# This is intended to be invoked in $srcdir as
197# "make -f Makefile.in autoconf-common".
198.PHONY: autoconf-common
96527c4e 199autoconf-common autoheader-common:
27b9abfd
DE
200 for d in * ; \
201 do \
202 if [ -d $$d -a -f $$d/configure.in ] ; \
203 then \
204 if grep SIM_AC_COMMON $$d/configure.in >/dev/null ; \
205 then \
206 echo "Running autoconf in $$d ..." ; \
207 (cd $$d && autoconf) ; \
96527c4e
AC
208 if [ $* = autoheader-common ] ; \
209 then \
210 echo "Running autoheader in $$d ..." ; \
211 (cd $$d && autoheader) ; \
212 fi ; \
27b9abfd
DE
213 fi ; \
214 fi ; \
215 done
b69cc8ab 216
96527c4e 217autoconf-changelog autoheader-changelog:
b04500b2
DE
218 id="`id | sed -e 's/^[^(]*(\([^)]*\).*$$/\1/'`" ; \
219 name=`grep "^$$id:" /etc/passwd | cut -f 5 -d ':'` ; \
220 host="`hostname`" ; \
b69cc8ab 221 date="`date | sed 's/ [^ ]* \([0-9]*\)$$/ \1/'`" ; \
b04500b2 222 echo "$$date $$name $$id@$$host" ; \
b69cc8ab
AC
223 for d in * ; \
224 do \
225 if [ -d $$d -a -f $$d/configure.in ] ; \
226 then \
227 if grep SIM_AC_COMMON $$d/configure.in >/dev/null ; \
228 then \
229 echo "Creating new-ChangeLog in $$d ..." ; \
b04500b2 230 ( echo "$$date $$name <$$id@$$host>" ; \
b69cc8ab
AC
231 echo "" ; \
232 echo " * configure: Regenerated to track ../common/aclocal.m4 changes." ; \
96527c4e
AC
233 if [ $* = autoheader-changelog ] ; \
234 then \
235 echo " * config.in: Ditto." ; \
236 fi ; \
b69cc8ab
AC
237 echo "" ; \
238 cat $$d/ChangeLog \
239 ) > $$d/new-ChangeLog ; \
240 fi ; \
241 fi ; \
242 done
b04500b2 243
96527c4e 244autoconf-install autoheader-install:
b04500b2
DE
245 for d in * ; \
246 do \
247 if [ -d $$d -a -f $$d/configure.in ] ; \
248 then \
249 if grep SIM_AC_COMMON $$d/configure.in >/dev/null ; \
250 then \
251 echo "Moving $$d/new-ChangeLog to $$d/ChangeLog ..." ; \
252 mv $$d/new-ChangeLog $$d/ChangeLog ; \
253 fi ; \
254 fi ; \
255 done