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