Commit | Line | Data |
---|---|---|
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 |
4 | configdirs= |
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 | ||
13 | #GNU CC 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 1, or (at your option) | |
16 | #any later version. | |
17 | ||
18 | #GNU CC 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 GNU CC; see the file COPYING. If not, write to | |
25 | #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
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 |
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 | # clear some things potentially inherited from environment. | |
eb02fd64 | 48 | ansi= |
0df06ca0 | 49 | defaulttargets= |
ec342d7d | 50 | destdir= |
0df06ca0 | 51 | fatal= |
131a3881 RP |
52 | hostsubdir= |
53 | norecurse= | |
54 | removing= | |
74cc5508 | 55 | srcdir= |
ec342d7d | 56 | srctrigger= |
131a3881 | 57 | target= |
0df06ca0 | 58 | targets= |
131a3881 RP |
59 | targetsubdir= |
60 | template= | |
0df06ca0 | 61 | verbose= |
eb02fd64 RP |
62 | |
63 | for arg in $*; | |
64 | do | |
ec342d7d | 65 | case ${arg} in |
eb02fd64 RP |
66 | -ansi | +ansi) |
67 | ansi=true | |
68 | ;; | |
ec342d7d RP |
69 | -destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*) |
70 | destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'` | |
71 | ;; | |
0df06ca0 | 72 | -forcesubdirs | +forcesubdirs | +f) |
131a3881 | 73 | forcesubdirs=${arg} |
eb02fd64 | 74 | ;; |
74cc5508 RP |
75 | -languages=* | +languages=* | +language=* | +languag=* \ |
76 | | +langua=* | +langu=* | +lang=* | +lan=* | +la=* \ | |
77 | | +l=*) | |
ec342d7d | 78 | languages="${languages} `echo ${arg} | sed 's/[+-]l[a-z]*=//'`" |
eb02fd64 RP |
79 | ;; |
80 | -gas | +gas | +ga | +g) | |
81 | gas=yes | |
82 | ;; | |
0df06ca0 RP |
83 | -help | +h | +help) |
84 | fatal=true | |
85 | ;; | |
eb02fd64 RP |
86 | -nfp | +nfp | +nf | +n) |
87 | nfp=yes | |
88 | ;; | |
131a3881 RP |
89 | -norecurse | +norecurse) |
90 | norecurse=true | |
91 | ;; | |
92 | -rm | +rm) | |
ec342d7d | 93 | removing=${arg} |
131a3881 | 94 | ;; |
0df06ca0 RP |
95 | # -srcdir=* | +srcdir=* | +srcdi=* | +srcd=* | +src=* | +sr=* | +s=*) |
96 | # srcdir=`echo ${arg} | sed 's/[+-]s[a-z]*=//'` | |
97 | # ;; | |
98 | -target=* | +target=* | +targe=* | +targ=* | +tar=* | +ta=* | +t=*) | |
99 | if [ -n "${targets}" ] ; then | |
100 | forcesubdirs="+forcesubdirs" | |
101 | fi | |
102 | ||
103 | newtargets="${targets} `echo ${arg} | sed 's/[+-]t[a-z]*=//'`" | |
104 | targets="${newtargets}" | |
131a3881 RP |
105 | ;; |
106 | -template=* | +template=*) | |
ec342d7d | 107 | template=`echo ${arg} | sed 's/[+-]template=//'` |
131a3881 | 108 | ;; |
0df06ca0 RP |
109 | +verbose | +verbos | +verbo | +verb | +ver | +ve | +v) |
110 | verbose=${arg} | |
111 | ;; | |
112 | -* | +*) | |
113 | (echo ; | |
114 | echo "Unrecognized option: \"${arg}\"". ; | |
115 | echo) 1>&2 | |
116 | fatal=true | |
117 | ;; | |
eb02fd64 | 118 | *) |
0df06ca0 RP |
119 | if [ -n "${hosts}" ] ; then |
120 | forcesubdirs="+forcesubdirs" | |
121 | fi | |
122 | ||
123 | newhosts="${hosts} ${arg}" | |
124 | hosts=${newhosts} | |
eb02fd64 RP |
125 | ;; |
126 | esac | |
127 | done | |
128 | ||
0df06ca0 RP |
129 | if [ -n "${verbose}" ] ; then |
130 | echo `pwd`/configure $* | |
131 | echo targets=\"${targets}\" | |
132 | fi | |
133 | ||
131a3881 | 134 | # process host and target only if not rebuilding configure itself or removing. |
0df06ca0 | 135 | if [ -z "${template}" -a -z "${removing}" -a -z "${fatal}" ] ; then |
eb02fd64 | 136 | # Complain if an arg is missing |
0df06ca0 RP |
137 | if [ -z "${hosts}" ] ; then |
138 | (echo ; | |
139 | echo "configure: No HOST specified." ; | |
140 | echo) 2>&1 | |
141 | fatal=true | |
eb02fd64 | 142 | fi |
131a3881 | 143 | fi |
eb02fd64 | 144 | |
0df06ca0 RP |
145 | if [ -n "${fatal}" -o "${hosts}" = "help" ] ; then |
146 | (echo "Usage: configure HOST" ; | |
147 | echo ; | |
148 | echo "Options: [defaults in brackets]" ; | |
149 | echo " +ansi configure w/ANSI library. [no ansi lib]" ; | |
150 | echo " +destdir=MYDIR configure for installation into MYDIR. [/usr/local]" ; | |
151 | echo " +forcesubdirs configure in subdirectories. [in source directories]" ; | |
152 | echo " +lang=LANG configure to build LANG. [gcc]" ; | |
153 | echo " +help print this message. [normal config]" ; | |
154 | echo " +gas configure the compilers for use with gas. [native as]" ; | |
155 | echo " +nfp configure the compilers default to soft floating point. [hard float]" ; | |
156 | echo " +norecurse configure this directory only. [recurse]" ; | |
157 | echo " +rm remove this configuration. [build a configuration]" ; | |
158 | echo " +target=TARGET configure for TARGET. [TARGET = HOST]" ; | |
159 | echo " +template=TEM rebuild configure using TEM. [normal config]" ; | |
160 | echo ; | |
161 | echo "Where HOST and TARGET are something like \"vax\", \"sun3\", \"encore\", etc." ; | |
162 | echo "Asking for more than one \"+target\" implies \"+forcesubdirs\". Any other" ; | |
163 | echo "options given will apply to all targets.") 1>&2 | |
164 | ||
165 | if [ -r config.status ] ; then | |
166 | cat config.status | |
167 | fi | |
168 | ||
169 | exit 1 | |
eb02fd64 RP |
170 | fi |
171 | ||
0df06ca0 | 172 | #### configure.in common parts come in here. |
eb02fd64 RP |
173 | # This file is a shell script fragment that supplies the information |
174 | # necessary to tailor a template configure script into the configure | |
175 | # script appropriate for this directory. For more information, check | |
176 | # any existing configure script. | |
177 | ||
0df06ca0 | 178 | configdirs="bfd binutils ld gas gnulib gcc clib" |
131a3881 | 179 | srctrigger=README.configure |
eb02fd64 | 180 | srcname="gnu development package" |
0df06ca0 RP |
181 | |
182 | # per-host: | |
183 | ||
6408afba | 184 | |
0df06ca0 | 185 | ## end of common part |
eb02fd64 RP |
186 | |
187 | # are we rebuilding config itself? | |
0df06ca0 RP |
188 | if [ -n "${template}" ] ; then |
189 | if [ ! -r ${template} ] ; then | |
eb02fd64 RP |
190 | echo "Can't find template ${template}." |
191 | exit 1 | |
192 | fi | |
193 | ||
194 | mv configure configure.old | |
195 | echo "#!/bin/sh" > configure | |
74cc5508 RP |
196 | echo "# Please do not edit this file. It is generated automatically from" >> configure |
197 | echo "# configure.in and a configure template." >> configure | |
eb02fd64 RP |
198 | echo "configdirs=" >> configure |
199 | echo >> configure | |
200 | ||
0df06ca0 RP |
201 | if [ -r configure.in ] ; then |
202 | if [ -z "`grep '^# per\-host:' configure.in`" ] ; then | |
203 | echo `pwd`/configure.in has no "per-host:" line. | |
204 | exit 1 | |
205 | fi | |
206 | ||
207 | if [ -z "`grep '^# per\-target:' configure.in`" ] ; then | |
208 | echo `pwd`/configure.in has no "per-target:" line. | |
209 | exit 1 | |
210 | fi | |
211 | ||
212 | sed -e '/^# per\-target:/,$d' configure.in > configure.com | |
213 | sed -e '1,/^# per\-target:/d' configure.in > configure.tgt | |
214 | ||
215 | sed -e '/^#### configure.in common parts/ r configure.com' \ | |
6408afba | 216 | -e '/^#### / r configure.tgt' \ |
0df06ca0 RP |
217 | ${template} >> configure |
218 | ||
219 | rm -f configure.com configure.tgt configure.hst | |
eb02fd64 | 220 | else |
ec342d7d RP |
221 | echo Warning: no configure.in in `pwd` |
222 | cat ${template} >> configure | |
eb02fd64 RP |
223 | fi |
224 | ||
225 | chmod a+x configure | |
226 | rm configure.old | |
eb02fd64 RP |
227 | echo Rebuilt configure in `pwd` |
228 | ||
0df06ca0 RP |
229 | if [ -z "${norecurse}" ] ; then |
230 | while [ -n "${configdirs}" ] ; do | |
eb02fd64 | 231 | # set configdir to car of configdirs, configdirs to cdr of configdirs |
ec342d7d | 232 | set ${configdirs}; configdir=$1; shift; configdirs=$* |
eb02fd64 | 233 | |
0df06ca0 | 234 | if [ "`echo ${configdir}.*`" != "${configdir}.*" ] ; then |
eb02fd64 RP |
235 | targetspecificdirs=${configdir}.* |
236 | else | |
237 | targetspecificdirs= | |
238 | fi | |
239 | ||
0df06ca0 RP |
240 | for i in ${configdir} ${targetspecificdirs} ; do |
241 | if [ -r $i/configure ] ; then | |
eb02fd64 | 242 | (cd $i ; |
0df06ca0 | 243 | ./configure +template=${template} ${verbose}) |
eb02fd64 RP |
244 | else |
245 | echo No configure script in `pwd`/$i | |
246 | fi | |
247 | done | |
248 | done | |
249 | fi | |
250 | ||
251 | exit 0 | |
252 | fi | |
253 | ||
ec342d7d | 254 | # some sanity checks on configure.in |
0df06ca0 | 255 | if [ -z "${srctrigger}" ] ; then |
ec342d7d RP |
256 | echo srctrigger not set in configure.in. `pwd` not configured. |
257 | exit 1 | |
258 | fi | |
259 | ||
0df06ca0 RP |
260 | for host in ${hosts} ; do |
261 | # Default other arg | |
262 | if [ -z "${targets}" -o -n "${defaulttargets}" ] ; then | |
263 | targets=${host} | |
264 | defaulttargets=true | |
265 | fi | |
eb02fd64 | 266 | |
0df06ca0 | 267 | #### configure.in per-host parts come in here. |
6408afba | 268 | |
0df06ca0 | 269 | ## end of per-target part |
eb02fd64 | 270 | |
131a3881 | 271 | |
0df06ca0 | 272 | for target in ${targets} ; do |
eb02fd64 | 273 | |
0df06ca0 RP |
274 | if [ -n "${verbose}" ] ; then |
275 | echo " "target=\"${target}\" | |
74cc5508 | 276 | fi |
0df06ca0 RP |
277 | |
278 | #### configure.in per-target parts come in here. | |
6408afba | 279 | |
0df06ca0 RP |
280 | ## end of per-target part |
281 | ||
282 | # Temporarily, we support only direct subdir builds. | |
283 | hostsubdir=Host-${host} | |
284 | targetsubdir=Target-${target} | |
285 | ||
286 | if [ -n "${removing}" ] ; then | |
287 | if [ -d "${hostsubdir}/${targetsubdir}" ] ; then | |
288 | rm -rf ${hostsubdir}/${targetsubdir} | |
289 | ||
290 | if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then | |
291 | rm -rf ${hostsubdir} | |
292 | fi | |
293 | else | |
294 | rm -f Makefile config.status ${links} | |
295 | fi | |
74cc5508 | 296 | else |
0df06ca0 RP |
297 | if [ -n "${forcesubdirs}" ] ; then |
298 | # check for existing status before allowing forced subdirs. | |
299 | if [ -f Makefile ] ; then | |
300 | echo "Makefile already exists in source directory. `pwd` not configured." | |
301 | exit 1 | |
302 | fi | |
eb02fd64 | 303 | |
0df06ca0 RP |
304 | if [ ! -d ${hostsubdir} ] ; then mkdir ${hostsubdir} ; fi |
305 | cd ${hostsubdir} | |
eb02fd64 | 306 | |
0df06ca0 RP |
307 | if [ ! -d ${targetsubdir} ] ; then mkdir ${targetsubdir} ; fi |
308 | cd ${targetsubdir} | |
eb02fd64 | 309 | |
0df06ca0 RP |
310 | srcdir=../.. |
311 | else | |
312 | # if not subdir builds, then make sure none exist. | |
313 | if [ -n "`(ls .) 2>&1 | grep Host-`" ] ; then | |
314 | echo "Configured subdirs exist. `pwd` not configured." | |
315 | exit 1 | |
316 | fi | |
317 | fi | |
eb02fd64 | 318 | |
0df06ca0 RP |
319 | # Find the source files, if location was not specified. |
320 | if [ -z "${srcdir}" ] ; then | |
321 | srcdirdefaulted=1 | |
322 | srcdir=. | |
323 | if [ -n "${srctrigger}" -a ! -r ${srctrigger} ] ; then | |
324 | srcdir=.. | |
325 | fi | |
326 | fi | |
eb02fd64 | 327 | |
0df06ca0 RP |
328 | if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then |
329 | if [ -z "${srcdirdefaulted}" ] ; then | |
330 | echo "${progname}: Can't find ${srcname} sources in \`${srcdir}'." 1>&2 | |
331 | else | |
332 | echo "${progname}: Can't find ${srcname} sources in \`.' or \`..'." 1>&2 | |
333 | fi | |
eb02fd64 | 334 | |
0df06ca0 RP |
335 | exit 1 |
336 | fi | |
131a3881 | 337 | |
0df06ca0 RP |
338 | # Set up the list of links to be made. |
339 | # ${links} is the list of link names, and ${files} is the list of names to link to. | |
eb02fd64 | 340 | |
0df06ca0 RP |
341 | # Make the links. |
342 | while [ -n "${files}" ] ; do | |
343 | # set file to car of files, files to cdr of files | |
344 | set ${files}; file=$1; shift; files=$* | |
345 | set ${links}; link=$1; shift; links=$* | |
131a3881 | 346 | |
0df06ca0 RP |
347 | if [ ! -r ${srcdir}/${file} ] ; then |
348 | echo "${progname}: cannot create a link \"${link}\"," 1>&2 | |
349 | echo "since the file \"${file}\" does not exist." 1>&2 | |
350 | exit 1 | |
351 | fi | |
131a3881 | 352 | |
0df06ca0 RP |
353 | ${remove} -f ${link} |
354 | rm -f config.status | |
355 | # Make a symlink if possible, otherwise try a hard link | |
356 | ${symbolic_link} ${srcdir}/${file} ${link} 2>/dev/null || ${hard_link} ${srcdir}/${file} ${link} | |
131a3881 | 357 | |
0df06ca0 RP |
358 | if [ ! -r ${link} ] ; then |
359 | echo "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2 | |
360 | exit 1 | |
361 | fi | |
362 | echo "Linked \"${link}\" to \"${srcdir}/${file}\"." | |
363 | done | |
131a3881 | 364 | |
0df06ca0 RP |
365 | # Create a .gdbinit file which runs the one in srcdir |
366 | # and tells GDB to look there for source files. | |
367 | ||
368 | case ${srcdir} in | |
369 | .) | |
370 | ;; | |
371 | *) | |
372 | echo "dir ." > .gdbinit | |
373 | echo "dir ${srcdir}" >> .gdbinit | |
374 | echo "source ${srcdir}/.gdbinit" >> .gdbinit | |
375 | ;; | |
376 | esac | |
377 | ||
378 | # Install a makefile, and make it set VPATH | |
379 | # if necessary so that the sources are found. | |
380 | # Also change its value of srcdir. | |
381 | ||
382 | # FIXME-someday: This business of always writing to .tem and mv back | |
383 | # is so that I don't screw things up while developing. Once this | |
384 | # template is stable, these should be optimized. xoxorich. | |
385 | ||
386 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. | |
387 | if [ "${host}" != "${target}" ] ; then | |
388 | echo "CROSS=-DCROSS_COMPILE" > Makefile | |
389 | echo "ALL=start.encap" >> Makefile | |
390 | else | |
391 | echo "ALL=all.internal" > Makefile | |
392 | fi | |
131a3881 | 393 | |
0df06ca0 RP |
394 | # set target, host, VPATH |
395 | echo "host = ${host}" >> Makefile | |
396 | echo "target = ${target}" >> Makefile | |
131a3881 | 397 | |
0df06ca0 RP |
398 | if [ -n "${forcesubdirs}" ] ; then |
399 | echo "subdir = /${hostsubdir}/${targetsubdir}" >> Makefile | |
400 | else | |
401 | echo "subdir =" >> Makefile | |
402 | fi | |
131a3881 | 403 | |
0df06ca0 RP |
404 | # echo "workdir = `pwd`" >> Makefile |
405 | echo "VPATH = ${srcdir}" >> Makefile | |
eb02fd64 | 406 | |
0df06ca0 RP |
407 | # add Makefile.in |
408 | cat ${srcdir}/Makefile.in >> Makefile | |
eb02fd64 | 409 | |
0df06ca0 RP |
410 | # and shake thoroughly. |
411 | host_var_file=hmake-${host} | |
412 | target_var_file=tmake-${target} | |
eb02fd64 | 413 | |
0df06ca0 RP |
414 | # Conditionalize the makefile for this host. |
415 | if [ -f ${srcdir}/config/${host_var_file} ] ; then | |
416 | sed -e "/^####/ r ${srcdir}/config/${host_var_file}" Makefile > Makefile.tem | |
417 | mv Makefile.tem Makefile | |
418 | fi | |
131a3881 | 419 | |
0df06ca0 RP |
420 | # Conditionalize the makefile for this target. |
421 | if [ -f ${srcdir}/config/${target_var_file} ] ; then | |
422 | sed -e "/^####/ r ${srcdir}/config/${target_var_file}" Makefile > Makefile.tem | |
423 | mv Makefile.tem Makefile | |
424 | fi | |
ec342d7d | 425 | |
0df06ca0 RP |
426 | # set srcdir |
427 | sed "s@^srcdir = \.@srcdir = ${srcdir}@" Makefile > Makefile.tem | |
428 | mv Makefile.tem Makefile | |
eb02fd64 | 429 | |
0df06ca0 RP |
430 | # set destdir |
431 | if [ -n "${destdir}" ] ; then | |
432 | sed "s:^destdir =.*$:destdir = ${destdir}:" Makefile > Makefile.tem | |
433 | mv Makefile.tem Makefile | |
434 | fi | |
eb02fd64 | 435 | |
0df06ca0 RP |
436 | # Remove all formfeeds, since some Makes get confused by them. |
437 | sed "s/\f//" Makefile >> Makefile.tem | |
438 | mv Makefile.tem Makefile | |
eb02fd64 | 439 | |
0df06ca0 RP |
440 | # reset SUBDIRS |
441 | sed "s:^SUBDIRS =.*$:SUBDIRS = ${configdirs}:" Makefile > Makefile.tem | |
442 | mv Makefile.tem Makefile | |
eb02fd64 | 443 | |
0df06ca0 RP |
444 | # reset NONSUBDIRS |
445 | sed "s:^NONSUBDIRS =.*$:NONSUBDIRS = ${noconfigdirs}:" Makefile > Makefile.tem | |
446 | mv Makefile.tem Makefile | |
eb02fd64 | 447 | |
0df06ca0 RP |
448 | using= |
449 | if [ -f ${srcdir}/config/${host_var_file} ] ; then | |
450 | using=" using \"${host_var_file}\"" | |
451 | fi | |
eb02fd64 | 452 | |
0df06ca0 RP |
453 | if [ -f ${srcdir}/config/${target_var_file} ] ; then |
454 | if [ -z "${using}" ] ; then | |
455 | andusing=" using \"${target_var_file}\"" | |
456 | else | |
457 | andusing="${using} and \"${target_var_file}\"" | |
458 | fi | |
459 | else | |
460 | andusing=${using} | |
461 | fi | |
eb02fd64 | 462 | |
0df06ca0 | 463 | echo "Created \"Makefile\"" in `pwd`${andusing}. |
eb02fd64 | 464 | |
0df06ca0 RP |
465 | if [ "${host}" = "${target}" ] ; then |
466 | echo "Links are now set up for use with a ${target}." \ | |
467 | > config.status | |
468 | # | tee ${srcdir}/config.status | |
469 | else | |
470 | echo "Links are now set up for host ${host} and target ${target}." \ | |
471 | > config.status | |
472 | # | tee ${srcdir}/config.status | |
473 | fi | |
474 | ||
475 | originaldir=`pwd` | |
476 | cd ${srcdir} | |
477 | fi | |
478 | done | |
479 | done | |
eb02fd64 | 480 | |
0df06ca0 | 481 | # If there are subdirectories, then recurse. |
eb02fd64 | 482 | |
0df06ca0 | 483 | if [ -n "${norecurse}" -o -z "${configdirs}" ] ; then exit 0 ; fi |
eb02fd64 | 484 | |
0df06ca0 RP |
485 | # configdirs is not null |
486 | for configdir in ${configdirs} ; do | |
eb02fd64 | 487 | echo Configuring ${configdir}... |
0df06ca0 RP |
488 | specifics= |
489 | commons= | |
490 | ||
491 | if [ -n "${defaulttargets}" ] ; then | |
492 | for host in ${hosts} ; do | |
493 | if [ -d ${configdir}.${host} ] ; then | |
494 | newspecifics="${specifics} ${host}" | |
495 | specifics=${newspecifics} | |
496 | else | |
497 | newcommons="${commons} ${host}" | |
498 | commons=${newcommons} | |
499 | fi # if target specific | |
500 | done # for each host | |
501 | ||
502 | if [ -n "${commons}" ] ; then | |
503 | (cd ${configdir} ; | |
504 | ./configure ${commons} ${verbose} ${forcesubdirs} ${removing}) \ | |
505 | | sed 's/^/ /' | |
506 | fi # if any common hosts | |
507 | ||
508 | if [ -n "${specifics}" ] ; then | |
509 | for host in ${specifics} ; do | |
510 | echo Configuring target specific directory ${configdir}.${host}... | |
511 | (cd ${configdir}.${host} ; | |
512 | ./configure ${host} ${verbose} ${forcesubdirs} ${removing}) \ | |
513 | | sed 's/^/ /' | |
514 | done # for host in specifics | |
515 | fi # if there are any specifics | |
516 | else | |
517 | ||
518 | for target in ${targets} ; do | |
519 | if [ -d ${configdir}.${target} ] ; then | |
520 | newspecifics="${specifics} ${target}" | |
521 | specifics=${newspecifics} | |
522 | else | |
523 | newcommons="${commons} +target=${target}" | |
524 | commons=${newcommons} | |
525 | fi | |
526 | ||
527 | done # check for target specific dir override | |
528 | ||
529 | if [ -n "${verbose}" ] ; then | |
530 | echo " "commons=\"${commons}\" | |
531 | echo " "specifics=\"${specifics}\" | |
532 | fi # if verbose | |
533 | ||
534 | if [ -n "${commons}" ] ; then | |
535 | (cd ${configdir} ; | |
536 | ./configure ${hosts} ${verbose} ${forcesubdirs} ${removing} ${commons}) \ | |
537 | | sed 's/^/ /' | |
538 | fi # if any commons | |
539 | ||
540 | if [ -n "${specifics}" ] ; then | |
541 | for target in ${specifics} ; do | |
542 | echo Configuring target specific directory ${configdir}.${target}... | |
543 | (cd ${configdir}.${target} ; | |
544 | ./configure ${hosts} ${verbose} ${forcesubdirs} ${removing} "+target=${target}") \ | |
545 | | sed 's/^/ /' | |
546 | done | |
547 | fi # if any specifics | |
548 | fi # not default targets | |
eb02fd64 RP |
549 | done |
550 | ||
551 | exit 0 | |
74cc5508 RP |
552 | |
553 | # | |
554 | # $Log$ | |
6408afba RP |
555 | # Revision 1.7 1991/04/16 00:18:22 rich |
556 | # Now handles multiple hosts and targets. | |
557 | # | |
558 | # Revision 1.5 1991/04/15 23:43:44 rich | |
0df06ca0 RP |
559 | # Now handles multiple hosts and targets. |
560 | # | |
561 | # Revision 1.4 1991/04/13 02:11:03 rich | |
ec342d7d RP |
562 | # Config cut 3. We now almost install a29k. |
563 | # | |
564 | # Revision 1.3 1991/04/11 02:41:54 rich | |
131a3881 | 565 | # Cut 2 config. Subdirs. |
74cc5508 RP |
566 | # |
567 | # | |
568 | # | |
569 | ||
0df06ca0 RP |
570 | # |
571 | # Local Variables: | |
572 | # fill-column: 131 | |
573 | # End: | |
574 | # | |
74cc5508 RP |
575 | |
576 | # end of configure.template |