Host-level GNUmakefiles.
[deliverable/binutils-gdb.git] / binutils / configure
CommitLineData
99a42820 1#!/bin/sh
a10d26a1
RP
2# Please do not edit this file. It is generated automatically from
3# configure.in and a configure template.
99a42820
RP
4configdirs=
5
6#!/bin/sh
99a42820
RP
7
8# Configuration script template
9# Copyright (C) 1988, 1990, 1991 Free Software Foundation, Inc.
10
11#This file is part of GNU.
12
4101d868
RP
13# This program is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2 of the License, or
16# (at your option) any later version.
17#
18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with this program; if not, write to the Free Software
25# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
99a42820 26
a10d26a1
RP
27# $Id$
28
99a42820
RP
29#
30# Shell script to create proper links to machine-dependent files in
b5132a6b 31# preparation for compilation.
99a42820
RP
32#
33# If configure succeeds, it leaves its status in config.status.
34# If configure fails after disturbing the status quo,
35# config.status is removed.
36#
37
99a42820
RP
38remove=rm
39hard_link=ln
40symbolic_link='ln -s'
41
42#for Test
43#remove="echo rm"
44#hard_link="echo ln"
45#symbolic_link="echo ln -s"
46
c4220303
RP
47progname=$0
48
99a42820 49# clear some things potentially inherited from environment.
99a42820 50ansi=
b5132a6b 51defaulttargets=
ec342d7d 52destdir=
b5132a6b 53fatal=
f2e91404 54hostsubdir=
4101d868
RP
55Makefile=Makefile
56Makefile_in=Makefile.in
f2e91404
RP
57norecurse=
58removing=
a10d26a1 59srcdir=
ec342d7d 60srctrigger=
f2e91404 61target=
b5132a6b 62targets=
f2e91404
RP
63targetsubdir=
64template=
b5132a6b 65verbose=
99a42820
RP
66
67for arg in $*;
68do
ec342d7d 69 case ${arg} in
99a42820
RP
70 -ansi | +ansi)
71 ansi=true
72 ;;
ec342d7d
RP
73 -destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*)
74 destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'`
75 ;;
c4220303
RP
76 -forcesubdirs | +forcesubdirs | +forcesubdir | +forcesubdi | +forcesubd \
77 | +forcesub | +forcesu | +forces | +force | +forc | +for | +fo | +f)
f2e91404 78 forcesubdirs=${arg}
99a42820 79 ;;
a10d26a1
RP
80 -languages=* | +languages=* | +language=* | +languag=* \
81 | +langua=* | +langu=* | +lang=* | +lan=* | +la=* \
82 | +l=*)
ec342d7d 83 languages="${languages} `echo ${arg} | sed 's/[+-]l[a-z]*=//'`"
99a42820
RP
84 ;;
85 -gas | +gas | +ga | +g)
86 gas=yes
87 ;;
b5132a6b
RP
88 -help | +h | +help)
89 fatal=true
90 ;;
99a42820
RP
91 -nfp | +nfp | +nf | +n)
92 nfp=yes
93 ;;
f2e91404
RP
94 -norecurse | +norecurse)
95 norecurse=true
96 ;;
97 -rm | +rm)
ec342d7d 98 removing=${arg}
f2e91404 99 ;;
b5132a6b
RP
100# -srcdir=* | +srcdir=* | +srcdi=* | +srcd=* | +src=* | +sr=* | +s=*)
101# srcdir=`echo ${arg} | sed 's/[+-]s[a-z]*=//'`
102# ;;
103 -target=* | +target=* | +targe=* | +targ=* | +tar=* | +ta=* | +t=*)
104 if [ -n "${targets}" ] ; then
105 forcesubdirs="+forcesubdirs"
106 fi
107
108 newtargets="${targets} `echo ${arg} | sed 's/[+-]t[a-z]*=//'`"
109 targets="${newtargets}"
f2e91404
RP
110 ;;
111 -template=* | +template=*)
ec342d7d 112 template=`echo ${arg} | sed 's/[+-]template=//'`
f2e91404 113 ;;
b5132a6b
RP
114 +verbose | +verbos | +verbo | +verb | +ver | +ve | +v)
115 verbose=${arg}
116 ;;
117 -* | +*)
118 (echo ;
119 echo "Unrecognized option: \"${arg}\"". ;
120 echo) 1>&2
121 fatal=true
122 ;;
99a42820 123 *)
b5132a6b
RP
124 if [ -n "${hosts}" ] ; then
125 forcesubdirs="+forcesubdirs"
126 fi
127
128 newhosts="${hosts} ${arg}"
129 hosts=${newhosts}
99a42820
RP
130 ;;
131 esac
132done
133
b5132a6b
RP
134if [ -n "${verbose}" ] ; then
135 echo `pwd`/configure $*
136 echo targets=\"${targets}\"
137fi
138
f2e91404 139# process host and target only if not rebuilding configure itself or removing.
b5132a6b 140if [ -z "${template}" -a -z "${removing}" -a -z "${fatal}" ] ; then
99a42820 141 # Complain if an arg is missing
b5132a6b
RP
142 if [ -z "${hosts}" ] ; then
143 (echo ;
144 echo "configure: No HOST specified." ;
145 echo) 2>&1
146 fatal=true
99a42820 147 fi
f2e91404 148fi
99a42820 149
b5132a6b
RP
150if [ -n "${fatal}" -o "${hosts}" = "help" ] ; then
151 (echo "Usage: configure HOST" ;
152 echo ;
153 echo "Options: [defaults in brackets]" ;
154 echo " +ansi configure w/ANSI library. [no ansi lib]" ;
155 echo " +destdir=MYDIR configure for installation into MYDIR. [/usr/local]" ;
156 echo " +forcesubdirs configure in subdirectories. [in source directories]" ;
157 echo " +lang=LANG configure to build LANG. [gcc]" ;
158 echo " +help print this message. [normal config]" ;
159 echo " +gas configure the compilers for use with gas. [native as]" ;
160 echo " +nfp configure the compilers default to soft floating point. [hard float]" ;
161 echo " +norecurse configure this directory only. [recurse]" ;
162 echo " +rm remove this configuration. [build a configuration]" ;
163 echo " +target=TARGET configure for TARGET. [TARGET = HOST]" ;
164 echo " +template=TEM rebuild configure using TEM. [normal config]" ;
165 echo ;
166 echo "Where HOST and TARGET are something like \"vax\", \"sun3\", \"encore\", etc." ;
167 echo "Asking for more than one \"+target\" implies \"+forcesubdirs\". Any other" ;
168 echo "options given will apply to all targets.") 1>&2
169
170 if [ -r config.status ] ; then
171 cat config.status
172 fi
173
174 exit 1
a10d26a1 175fi
99a42820 176
b5132a6b 177#### configure.in common parts come in here.
a10d26a1
RP
178# This file is a shell script that supplies the information necessary
179# to tailor a template configure script into the configure script
180# appropriate for this directory. For more information, check any
181# existing configure script.
99a42820 182
a10d26a1
RP
183srctrigger=ar.c
184srcname="binutils"
b5132a6b 185
c4220303 186## end of common part.
99a42820
RP
187
188# are we rebuilding config itself?
b5132a6b
RP
189if [ -n "${template}" ] ; then
190 if [ ! -r ${template} ] ; then
99a42820
RP
191 echo "Can't find template ${template}."
192 exit 1
193 fi
194
c4220303
RP
195# prep the template
196 sed -e '/^#### configure.in common parts come in here.$/,/^## end of common part.$/c\
197#### configure.in common parts come in here.\
198## end of common part.' \
199 -e '/^#### configure.in per-host parts come in here.$/,/^## end of per-host part.$/c\
200#### configure.in per-host parts come in here.\
201## end of per-host part.' \
202 -e '/^#### configure.in per-target parts come in here.$/,/^## end of per-target part.$/c\
203#### configure.in per-target parts come in here.\
204## end of per-target part.' \
4101d868
RP
205 -e '/^#### configure.in post-target parts come in here.$/,/^## end of post-target part.$/c\
206#### configure.in post-target parts come in here.\
207## end of post-target part.' \
c4220303 208 < ${template} > template.new
99a42820 209
b5132a6b
RP
210 if [ -r configure.in ] ; then
211 if [ -z "`grep '^# per\-host:' configure.in`" ] ; then
212 echo `pwd`/configure.in has no "per-host:" line.
213 exit 1
214 fi
215
216 if [ -z "`grep '^# per\-target:' configure.in`" ] ; then
217 echo `pwd`/configure.in has no "per-target:" line.
218 exit 1
219 fi
220
4101d868
RP
221 # split configure.in into common, per-host, per-target,
222 # and post-target parts. Post-target is optional.
04dc1a62
RP
223 sed -e '/^# per\-host:/,$d' configure.in > configure.com
224 sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' configure.in > configure.hst
4101d868
RP
225 if grep -s '^# post-target:' configure.in ; then
226 sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' configure.in > configure.tgt
227 sed -e '1,/^# post\-target:/d' configure.in > configure.pos
228 else
229 sed -e '1,/^# per\-target:/d' configure.in > configure.tgt
230 echo >configure.pos
231 fi
b5132a6b 232
04dc1a62 233 # and insert them
c4220303
RP
234 sed -e '/^#### configure.in common parts come in here.$/ r configure.com' \
235 -e '/^#### configure.in per\-host parts come in here.$/ r configure.hst' \
236 -e '/^#### configure.in per\-target parts come in here.$/ r configure.tgt' \
4101d868 237 -e '/^#### configure.in post\-target parts come in here.$/ r configure.pos' \
c4220303 238 template.new > configure.new
b5132a6b 239
4101d868 240 rm -f configure.com configure.tgt configure.hst configure.pos
99a42820 241 else
ec342d7d
RP
242 echo Warning: no configure.in in `pwd`
243 cat ${template} >> configure
99a42820
RP
244 fi
245
c4220303
RP
246 chmod a+x configure.new
247 rm template.new
248# mv configure configure.old
249 mv configure.new configure
99a42820
RP
250 echo Rebuilt configure in `pwd`
251
b5132a6b 252 if [ -z "${norecurse}" ] ; then
4101d868
RP
253 # If template is relative path, make it absolute for recursing.
254 if echo "${template}" | grep -s '^/' ; then
255 true
256 else
257 template=`pwd`/${template}
258 fi
259
b5132a6b 260 while [ -n "${configdirs}" ] ; do
99a42820 261 # set configdir to car of configdirs, configdirs to cdr of configdirs
ec342d7d 262 set ${configdirs}; configdir=$1; shift; configdirs=$*
99a42820 263
b5132a6b 264 if [ "`echo ${configdir}.*`" != "${configdir}.*" ] ; then
99a42820
RP
265 targetspecificdirs=${configdir}.*
266 else
267 targetspecificdirs=
268 fi
269
b5132a6b 270 for i in ${configdir} ${targetspecificdirs} ; do
6c18e393
RP
271 if [ -d $i ] ; then
272 if [ -r $i/configure ] ; then
273 (cd $i ;
274 ./configure +template=${template} ${verbose})
275 else
276 echo No configure script in `pwd`/$i
277 fi
99a42820 278 else
6c18e393 279 echo Warning: directory $i is missing.
99a42820
RP
280 fi
281 done
282 done
283 fi
284
285 exit 0
286fi
287
ec342d7d 288# some sanity checks on configure.in
b5132a6b 289if [ -z "${srctrigger}" ] ; then
ec342d7d
RP
290 echo srctrigger not set in configure.in. `pwd` not configured.
291 exit 1
292fi
293
b5132a6b
RP
294for host in ${hosts} ; do
295 # Default other arg
296 if [ -z "${targets}" -o -n "${defaulttargets}" ] ; then
297 targets=${host}
298 defaulttargets=true
299 fi
99a42820 300
6c18e393
RP
301 host_makefile_frag=config/hmake-${host}
302
b5132a6b 303#### configure.in per-host parts come in here.
99a42820 304
c4220303 305## end of per-host part.
f2e91404 306
99a42820 307
b5132a6b
RP
308 for target in ${targets} ; do
309
310 if [ -n "${verbose}" ] ; then
4101d868 311 echo " target=\"${target}\""
a10d26a1 312 fi
b5132a6b 313
6c18e393
RP
314 target_makefile_frag=config/tmake-${target}
315
b5132a6b
RP
316#### configure.in per-target parts come in here.
317
318files=
319links=
320
c4220303 321## end of per-target part.
b5132a6b
RP
322
323 # Temporarily, we support only direct subdir builds.
324 hostsubdir=Host-${host}
325 targetsubdir=Target-${target}
326
327 if [ -n "${removing}" ] ; then
c4220303
RP
328 if [ -n "${forcesubdirs}" ] ; then
329 if [ -d "${hostsubdir}" ] ; then
330 rm -rf ${hostsubdir}/${targetsubdir}
b5132a6b 331
c4220303
RP
332 if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then
333 rm -rf ${hostsubdir}
334 fi
335 else
336 echo Warning: no `pwd`/${hostsubdir} to remove.
b5132a6b
RP
337 fi
338 else
4101d868 339 rm -f ${Makefile} config.status ${links}
b5132a6b 340 fi
a10d26a1 341 else
b5132a6b
RP
342 if [ -n "${forcesubdirs}" ] ; then
343 # check for existing status before allowing forced subdirs.
4101d868
RP
344 if [ -f ${Makefile} ] ; then
345 echo "${Makefile} already exists in source directory. `pwd` not configured."
b5132a6b
RP
346 exit 1
347 fi
99a42820 348
b5132a6b
RP
349 if [ ! -d ${hostsubdir} ] ; then mkdir ${hostsubdir} ; fi
350 cd ${hostsubdir}
99a42820 351
b5132a6b
RP
352 if [ ! -d ${targetsubdir} ] ; then mkdir ${targetsubdir} ; fi
353 cd ${targetsubdir}
99a42820 354
b5132a6b
RP
355 srcdir=../..
356 else
357 # if not subdir builds, then make sure none exist.
358 if [ -n "`(ls .) 2>&1 | grep Host-`" ] ; then
359 echo "Configured subdirs exist. `pwd` not configured."
360 exit 1
361 fi
362 fi
99a42820 363
b5132a6b
RP
364 # Find the source files, if location was not specified.
365 if [ -z "${srcdir}" ] ; then
366 srcdirdefaulted=1
367 srcdir=.
368 if [ -n "${srctrigger}" -a ! -r ${srctrigger} ] ; then
369 srcdir=..
370 fi
371 fi
99a42820 372
b5132a6b
RP
373 if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then
374 if [ -z "${srcdirdefaulted}" ] ; then
c4220303 375 echo "${progname}: Can't find ${srcname} sources in `pwd`/${srcdir}" 1>&2
b5132a6b 376 else
c4220303 377 echo "${progname}: Can't find ${srcname} sources in `pwd`/. or `pwd`/.." 1>&2
b5132a6b 378 fi
99a42820 379
c4220303 380 echo \(At least ${srctrigger} is missing.\) 1>&2
b5132a6b
RP
381 exit 1
382 fi
f2e91404 383
b5132a6b
RP
384 # Set up the list of links to be made.
385 # ${links} is the list of link names, and ${files} is the list of names to link to.
99a42820 386
b5132a6b
RP
387 # Make the links.
388 while [ -n "${files}" ] ; do
389 # set file to car of files, files to cdr of files
390 set ${files}; file=$1; shift; files=$*
391 set ${links}; link=$1; shift; links=$*
f2e91404 392
b5132a6b
RP
393 if [ ! -r ${srcdir}/${file} ] ; then
394 echo "${progname}: cannot create a link \"${link}\"," 1>&2
395 echo "since the file \"${file}\" does not exist." 1>&2
396 exit 1
397 fi
f2e91404 398
b5132a6b
RP
399 ${remove} -f ${link}
400 rm -f config.status
401 # Make a symlink if possible, otherwise try a hard link
402 ${symbolic_link} ${srcdir}/${file} ${link} 2>/dev/null || ${hard_link} ${srcdir}/${file} ${link}
f2e91404 403
b5132a6b
RP
404 if [ ! -r ${link} ] ; then
405 echo "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
406 exit 1
407 fi
408 echo "Linked \"${link}\" to \"${srcdir}/${file}\"."
409 done
f2e91404 410
b5132a6b
RP
411 # Create a .gdbinit file which runs the one in srcdir
412 # and tells GDB to look there for source files.
413
414 case ${srcdir} in
415 .)
416 ;;
417 *)
418 echo "dir ." > .gdbinit
419 echo "dir ${srcdir}" >> .gdbinit
420 echo "source ${srcdir}/.gdbinit" >> .gdbinit
421 ;;
422 esac
423
424 # Install a makefile, and make it set VPATH
425 # if necessary so that the sources are found.
426 # Also change its value of srcdir.
427
428 # FIXME-someday: This business of always writing to .tem and mv back
429 # is so that I don't screw things up while developing. Once this
430 # template is stable, these should be optimized. xoxorich.
431
432 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
433 if [ "${host}" != "${target}" ] ; then
4101d868
RP
434 echo "CROSS=-DCROSS_COMPILE" > ${Makefile}
435 echo "ALL=start.encap" >> ${Makefile}
b5132a6b 436 else
4101d868 437 echo "ALL=all.internal" > ${Makefile}
b5132a6b 438 fi
f2e91404 439
b5132a6b 440 # set target, host, VPATH
4101d868
RP
441 echo "host = ${host}" >> ${Makefile}
442 echo "target = ${target}" >> ${Makefile}
f2e91404 443
b5132a6b 444 if [ -n "${forcesubdirs}" ] ; then
4101d868 445 echo "subdir = /${hostsubdir}/${targetsubdir}" >> ${Makefile}
b5132a6b 446 else
4101d868 447 echo "subdir =" >> ${Makefile}
b5132a6b 448 fi
f2e91404 449
4101d868
RP
450 # echo "workdir = `pwd`" >> ${Makefile}
451 echo "VPATH = ${srcdir}" >> ${Makefile}
99a42820 452
4101d868
RP
453 # add "Makefile.in" (or whatever it's called)
454 cat ${srcdir}/${Makefile_in} >> ${Makefile}
99a42820 455
b5132a6b 456 # Conditionalize the makefile for this host.
6c18e393 457 if [ -f ${srcdir}/${host_makefile_frag} ] ; then
4101d868
RP
458 sed -e "/^####/ r ${srcdir}/${host_makefile_frag}" ${Makefile} > Makefile.tem
459 mv Makefile.tem ${Makefile}
b5132a6b 460 fi
f2e91404 461
b5132a6b 462 # Conditionalize the makefile for this target.
6c18e393 463 if [ -f ${srcdir}/${target_makefile_frag} ] ; then
4101d868
RP
464 sed -e "/^####/ r ${srcdir}/${target_makefile_frag}" ${Makefile} > Makefile.tem
465 mv Makefile.tem ${Makefile}
b5132a6b 466 fi
ec342d7d 467
b5132a6b 468 # set srcdir
4101d868
RP
469 sed "s@^srcdir = \.@srcdir = ${srcdir}@" ${Makefile} > Makefile.tem
470 mv Makefile.tem ${Makefile}
99a42820 471
b5132a6b
RP
472 # set destdir
473 if [ -n "${destdir}" ] ; then
4101d868
RP
474 sed "s:^destdir =.*$:destdir = ${destdir}:" ${Makefile} > Makefile.tem
475 mv Makefile.tem ${Makefile}
b5132a6b 476 fi
99a42820 477
b5132a6b 478 # reset SUBDIRS
4101d868
RP
479 sed "s:^SUBDIRS =.*$:SUBDIRS = ${configdirs}:" ${Makefile} > Makefile.tem
480 mv Makefile.tem ${Makefile}
99a42820 481
b5132a6b 482 # reset NONSUBDIRS
4101d868
RP
483 sed "s:^NONSUBDIRS =.*$:NONSUBDIRS = ${noconfigdirs}:" ${Makefile} > Makefile.tem
484 mv Makefile.tem ${Makefile}
99a42820 485
b5132a6b 486 using=
6c18e393
RP
487 if [ -f ${srcdir}/${host_makefile_frag} ] ; then
488 using=" using \"${host_makefile_frag}\""
b5132a6b 489 fi
99a42820 490
6c18e393 491 if [ -f ${srcdir}/${target_makefile_frag} ] ; then
b5132a6b 492 if [ -z "${using}" ] ; then
6c18e393 493 andusing=" using \"${target_makefile_frag}\""
b5132a6b 494 else
6c18e393 495 andusing="${using} and \"${target_makefile_frag}\""
b5132a6b
RP
496 fi
497 else
498 andusing=${using}
499 fi
99a42820 500
4101d868
RP
501 echo "Created \"${Makefile}\"" in `pwd`${andusing}.
502
503#### configure.in post-target parts come in here.
504
505## end of post-target part.
99a42820 506
b5132a6b
RP
507 if [ "${host}" = "${target}" ] ; then
508 echo "Links are now set up for use with a ${target}." \
509 > config.status
510 # | tee ${srcdir}/config.status
511 else
512 echo "Links are now set up for host ${host} and target ${target}." \
513 > config.status
514 # | tee ${srcdir}/config.status
515 fi
99a42820 516
b5132a6b
RP
517 originaldir=`pwd`
518 cd ${srcdir}
519 fi
c4220303
RP
520 done # for each target
521
4101d868
RP
522 # Now build a Makefile for this host.
523 if [ -n "${forcesubdirs}" -a ! -n "${removing}" ] ; then
524 cd ${hostsubdir}
525 cat > GNUmakefile << E!O!F
526# Makefile generated by configure for host ${host}.
527
528ALL := $(shell ls -d Target-*)
529
530%:
531 $(foreach subdir,$(ALL),$(MAKE) -C $(subdir) \$@ &&) true
532
533all:
534E!O!F
535 cd ..
536 fi
c4220303 537done # for each host
99a42820 538
b5132a6b
RP
539# If there are subdirectories, then recurse.
540
541if [ -n "${norecurse}" -o -z "${configdirs}" ] ; then exit 0 ; fi
99a42820 542
b5132a6b
RP
543# configdirs is not null
544for configdir in ${configdirs} ; do
99a42820 545 echo Configuring ${configdir}...
b5132a6b
RP
546 specifics=
547 commons=
548
549 if [ -n "${defaulttargets}" ] ; then
550 for host in ${hosts} ; do
551 if [ -d ${configdir}.${host} ] ; then
552 newspecifics="${specifics} ${host}"
553 specifics=${newspecifics}
554 else
555 newcommons="${commons} ${host}"
556 commons=${newcommons}
557 fi # if target specific
558 done # for each host
559
560 if [ -n "${commons}" ] ; then
6c18e393
RP
561 if [ -d ${configdir} ] ; then
562 (cd ${configdir} ;
4101d868 563 ./configure ${commons} ${verbose} ${forcesubdirs} ${removing} +destdir=${destdir}) \
6c18e393
RP
564 | sed 's/^/ /'
565 else
566 echo Warning: directory \"${configdir}\" is missing.
567 fi
b5132a6b
RP
568 fi # if any common hosts
569
570 if [ -n "${specifics}" ] ; then
571 for host in ${specifics} ; do
572 echo Configuring target specific directory ${configdir}.${host}...
573 (cd ${configdir}.${host} ;
4101d868 574 ./configure ${host} ${verbose} ${forcesubdirs} ${removing} +destdir=${destdir}) \
b5132a6b
RP
575 | sed 's/^/ /'
576 done # for host in specifics
577 fi # if there are any specifics
578 else
579
580 for target in ${targets} ; do
581 if [ -d ${configdir}.${target} ] ; then
582 newspecifics="${specifics} ${target}"
583 specifics=${newspecifics}
584 else
585 newcommons="${commons} +target=${target}"
586 commons=${newcommons}
587 fi
588
589 done # check for target specific dir override
590
591 if [ -n "${verbose}" ] ; then
592 echo " "commons=\"${commons}\"
593 echo " "specifics=\"${specifics}\"
594 fi # if verbose
595
596 if [ -n "${commons}" ] ; then
6c18e393
RP
597 if [ -d ${configdir} ] ; then
598 (cd ${configdir} ;
4101d868
RP
599 ./configure ${hosts} ${verbose} ${forcesubdirs} ${removing} \
600 ${commons} +destdir=${destdir}) \
6c18e393
RP
601 | sed 's/^/ /'
602 else
603 echo Warning: directory \"${configdir}\" is missing.
604 fi
b5132a6b
RP
605 fi # if any commons
606
607 if [ -n "${specifics}" ] ; then
608 for target in ${specifics} ; do
609 echo Configuring target specific directory ${configdir}.${target}...
610 (cd ${configdir}.${target} ;
4101d868
RP
611 ./configure ${hosts} ${verbose} ${forcesubdirs} ${removing} \
612 "+target=${target}" +destdir=${destdir}) \
b5132a6b
RP
613 | sed 's/^/ /'
614 done
615 fi # if any specifics
616 fi # not default targets
99a42820
RP
617done
618
619exit 0
a10d26a1
RP
620
621#
622# $Log$
4101d868
RP
623# Revision 1.13 1991/08/06 19:12:16 rich
624# Host-level GNUmakefiles.
625#
626# Revision 1.22 1991/07/20 01:22:30 rich
627# propogate gdb changes and destdir fix
628#
629# Revision 1.21 1991/07/20 00:55:20 gnu
630# Roll in new configure that handles GDB. Make sure that the "configure"
631# that is checked-in reflects the latest "configure.in", which includes gdb.
632#
633# Revision 1.9 1991/07/06 04:35:51 gnu
634# Fix bug in configure when iterating targets.
635# Depend on alldeps.mak, not ${srcdir}/alldeps.mak, so it can be found
636# in either spot.
637#
638# Revision 1.8 1991/07/05 00:04:58 gnu
639# Thu Jul 4 14:47:06 1991 John Gilmore (gnu at cygint.cygnus.com)
640#
641# * configure.in, Makefile.in: Avoid rebuilding "depend" as much.
642# Avoid declaring Makefile dependencies, because GNU Make stupidly
643# tries to update it if we do.
644#
645# * coffread.c: Revise for minor changes to bfd internal coff
646# indexes.
647#
648# * configure: If -template= is given a relative path, make it
649# absolute before recurring in subdirectories.
6c18e393 650#
4101d868
RP
651# Revision 1.7 1991/07/04 15:59:46 gnu
652# Make gdb work with configure. Only thing that doesn't work is the -list
653# option (as far as I know).
6c18e393 654#
4101d868
RP
655# Revision 1.6 1991/06/04 07:28:16 gnu
656# Change GDB over to GNU General Public License version 2.
6c18e393 657#
4101d868
RP
658# Revision 1.5 1991/05/19 07:26:54 rich
659# configure changes and -opcode.h movement.
6c18e393
RP
660#
661# Revision 1.4 1991/05/19 00:16:45 rich
662# Configure for gdb.
c4220303
RP
663#
664# Revision 1.10 1991/05/04 00:58:38 rich
665# Fix program name bug.
666#
667# Revision 1.9 1991/05/03 19:14:18 rich
668# Changed getopt to libiberty, commented out an aborted attempt at host
669# level Makefiles because it caused errors on +rm, add a warning for
670# directories expected to be removed on +rm but that don't exist.
671#
672# Revision 1.8 1991/04/24 16:50:59 rich
673# Three staging checkpoint.
674#
675# Revision 1.7 1991/04/17 01:34:47 rich
676# Added getopt for binutils, fixed problem with host dependancies in
677# configure.template.
04dc1a62
RP
678#
679# Revision 1.6 1991/04/16 00:18:44 rich
b5132a6b
RP
680# Now handles multiple hosts and targets.
681#
682# Revision 1.5 1991/04/15 23:43:44 rich
683# Now handles multiple hosts and targets.
684#
685# Revision 1.4 1991/04/13 02:11:03 rich
ec342d7d
RP
686# Config cut 3. We now almost install a29k.
687#
688# Revision 1.3 1991/04/11 02:41:54 rich
689# Cut 2 config. Subdirs.
a10d26a1
RP
690#
691#
692#
693
b5132a6b
RP
694#
695# Local Variables:
696# fill-column: 131
697# End:
698#
a10d26a1
RP
699
700# end of configure.template
This page took 0.075112 seconds and 4 git commands to generate.