1 # Makefile template for Configure for the sim library.
2 # Copyright (C) 1993, 1995, 1997, 1998, 2007 Free Software Foundation, Inc.
3 # Written by Cygnus Support.
5 # This file is part of BFD, the Binary File Descriptor library.
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 3 of the License, or
10 # (at your option) any later version.
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.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 exec_prefix = @
exec_prefix@
26 host_alias
= @host_alias@
27 target_alias
= @target_alias@
28 program_transform_name
= @program_transform_name@
31 tooldir
= $(libdir)/$(target_alias
)
35 man1dir = $(mandir)/man1
36 man2dir = $(mandir)/man2
37 man3dir = $(mandir)/man3
38 man4dir = $(mandir)/man4
39 man5dir = $(mandir)/man5
40 man6dir = $(mandir)/man6
41 man7dir = $(mandir)/man7
42 man8dir = $(mandir)/man8
43 man9dir = $(mandir)/man9
45 includedir = @
includedir@
50 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
51 INSTALL_DATA
= @INSTALL_DATA@
57 CC_FOR_BUILD
= @CC_FOR_BUILD@
58 CFLAGS_FOR_BUILD
= @CFLAGS_FOR_BUILD@
64 INCDIR
= $(srcdir)/..
/include
65 CSEARCH
= -I.
-I
$(srcdir) -I
$(INCDIR
)
68 #### Makefile fragments come in here.
69 # @target_makefile_frag@
72 # Name of the ChangeLog file.
76 RUNTEST
= `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
77 echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
83 "exec_prefix=$(exec_prefix)" \
87 "against=$(against)" \
89 "AR_FLAGS=$(AR_FLAGS)" \
91 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
93 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
95 "MAKEINFO=$(MAKEINFO)" \
96 "INSTALL=$(INSTALL)" \
97 "INSTALL_DATA=$(INSTALL_DATA)" \
98 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
99 "RUNTEST=$(RUNTEST)" \
100 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
103 # The use of $$(x_FOR_TARGET) reduces the command line length by not
104 # duplicating the lengthy definition.
105 TARGET_FLAGS_TO_PASS
= \
107 "exec_prefix=$(exec_prefix)" \
108 "against=$(against)" \
109 'CC=$$(CC_FOR_TARGET)' \
110 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
112 "CHILLFLAGS=$(CHILLFLAGS)" \
113 'CHILL=$$(CHILL_FOR_TARGET)' \
114 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
115 "CHILL_LIB=$(CHILL_LIB)" \
116 'CXX=$$(CXX_FOR_TARGET)' \
117 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
118 "CXXFLAGS=$(CXXFLAGS)" \
119 "INSTALL=$(INSTALL)" \
120 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
121 "INSTALL_DATA=$(INSTALL_DATA)" \
122 "MAKEINFO=$(MAKEINFO)" \
123 "RUNTEST=$(RUNTEST)" \
124 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
128 @rootme
=`pwd` ; export rootme
; \
129 for
dir in .
`echo ${SUBDIRS} | sed 's/testsuite//'` ; do \
130 if
[ "$$dir" = "." ]; then \
132 elif
[ -d
$$dir ]; then \
133 (cd
$$dir; $(MAKE
) $(FLAGS_TO_PASS
)) || exit
1; \
138 @rootme
=`pwd` ; export rootme
; \
139 for
dir in .
${SUBDIRS}; do \
140 if
[ "$$dir" = "." ]; then \
142 elif
[ -d
$$dir ]; then \
143 (cd
$$dir; $(MAKE
) $(FLAGS_TO_PASS
) $@
) || exit
1; \
147 distclean maintainer-clean
realclean:
148 @rootme
=`pwd` ; export rootme
; \
149 for
dir in .
${SUBDIRS}; do \
150 if
[ "$$dir" = "." ]; then \
152 elif
[ -d
$$dir ]; then \
153 (cd
$$dir; $(MAKE
) $(FLAGS_TO_PASS
) $@
) || exit
1; \
156 rm -f Makefile config.cache config.log config.status
159 @rootme
=`pwd` ; export rootme
; \
160 for
dir in .
${SUBDIRS}; do \
161 if
[ "$$dir" = "." ]; then \
163 elif
[ -d
$$dir ]; then \
164 (cd
$$dir; $(MAKE
) $(FLAGS_TO_PASS
) install) || exit
1; \
169 @echo No
installcheck target is available yet for the GNU simulators.
173 # The check target can not use subdir_do, because subdir_do does not
174 # use TARGET_FLAGS_TO_PASS.
176 @if
[ -f testsuite
/Makefile
]; then \
177 rootme
=`pwd`; export rootme
; \
178 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
180 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check; \
196 .PHONY
: check installcheck
204 Makefile
: Makefile.in config.status
205 $(SHELL
) .
/config.status
207 config.status
: configure
208 $(SHELL
) .
/config.status
--recheck
210 # Utility to run autoconf in each directory that uses the common framework.
211 # This is intended to be invoked in $srcdir as
212 # "make -f Makefile.in autoconf-common SHELL=/bin/sh".
213 .PHONY
: autoconf-common autoheader-common
214 autoconf-common autoheader-common
:
217 if
[ -d
$$d -a
-f
$$d/configure.ac
] ; \
219 echo
"Running autoconf in $$d ..." ; \
220 (cd
$$d && autoconf
--force) ; \
221 if
[ $@
= autoheader-common
] && [ -f
$$d/config.in
] ; \
223 echo
"Running autoheader in $$d ..." ; \
224 (cd
$$d && autoheader
--force) ; \
229 autoconf-changelog autoheader-changelog
:
231 test x
$$id = x
&& id
="`id | sed -e 's/^[^(]*(\([^)]*\).*$$/\1/'`" ; \
233 test x
$$name = x
&& name
=`grep "^$$id:" /etc/passwd | cut -f 5 -d ':'` ; \
235 test x
$$host = x
&& host
="`hostname`" ; \
237 test x
$$date = x
&& date
="`date +%Y-%m-%d`" ; \
238 echo
"$$date $$name $$id@$$host" ; \
241 if
[ -d
$$d -a
-f
$$d/configure.ac
] ; \
243 echo
"Creating new-$(ChangeLog) in $$d ..." ; \
244 ( echo
"$$date $$name <$$id@$$host>" ; \
246 echo
" * configure: Regenerated to track ../common/aclocal.m4 changes." ; \
247 if
[ $@
= autoheader-changelog
] ; \
249 echo
" * config.in: Ditto." ; \
252 cat
$$d/$(ChangeLog
) \
253 ) > $$d/new-
$(ChangeLog
) ; \
257 autoconf-install autoheader-install
:
260 if
[ -d
$$d -a
-f
$$d/configure.ac
] ; \
262 echo
"Moving $$d/new-$(ChangeLog) to $$d/$(ChangeLog) ..." ; \
263 mv
$$d/new-
$(ChangeLog
) $$d/$(ChangeLog
) ; \