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