]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - configure
correct a comment
[thirdparty/binutils-gdb.git] / configure
1 #!/bin/sh
2
3 # Configuration script
4 # Copyright (C) 1988, 1990, 1991 Free Software Foundation, Inc.
5
6 #This file is part of GNU.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
21
22 # $Id$
23
24 # Please email any bugs, comments, and/or additions to this file to:
25 # configure@cygnus.com
26
27 #
28 # Shell script to create proper links to machine-dependent files in
29 # preparation for compilation.
30 #
31 # If configure succeeds, it leaves its status in config.status.
32 # If configure fails after disturbing the status quo,
33 # config.status is removed.
34 #
35
36 export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0 $argv; kill $$)
37
38 #set -e
39
40 remove=rm
41 hard_link=ln
42 symbolic_link='ln -s'
43
44 #for Test
45 #remove="echo rm"
46 #hard_link="echo ln"
47 #symbolic_link="echo ln -s"
48
49 # clear some things potentially inherited from environment.
50
51 Makefile=Makefile
52 Makefile_in=Makefile.in
53 ansi=
54 arguments=$*
55 commontargets=
56 configdirs=
57 ddestdir=
58 defaulttargets=
59 destdir=
60 fatal=
61 hostsubdir=
62 idestdir=
63 norecursion=
64 objdir=
65 objdiroption=
66 progname=
67 recurring=
68 removing=
69 srcdir=
70 srctrigger=
71 target=
72 targets=
73 targetsubdir=
74 verbose=
75
76 for arg in $*;
77 do
78 case ${arg} in
79 -ansi | +a*)
80 ansi=true
81 clib=clib
82 ;;
83 -ddestdir=* | +ddestdir=* | +ddestdi=* | +ddestd=* | +ddest=* | +ddes=* | +dde=* | +dd=*)
84 ddestdir=`echo ${arg} | sed 's/[+-]dd[a-z]*=//'`
85 ;;
86 -destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=*)
87 destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'`
88 ddestdir=${destdir}
89 idestdir=${destdir}
90 ;;
91 -gas | +g*)
92 gas=yes
93 ;;
94 -help | +h*)
95 fatal=true
96 ;;
97 -idestdir=* | +idestdir=* | +idestdi=* | +idestd=* | +idest=* | +ides=* | +ide=* | +id=*)
98 idestdir=`echo ${arg} | sed 's/[+-]id[a-z]*=//'`
99 ;;
100 -languages=* | +languages=* | +language=* | +languag=* \
101 | +langua=* | +langu=* | +lang=* | +lan=* | +la=* \
102 | +l=*)
103 languages="${languages} `echo ${arg} | sed 's/[+-]l[a-z]*=//'`"
104 ;;
105 -nfp | +nf*)
106 nfp=yes
107 ;;
108 -norecursion | +no*)
109 norecursion=true
110 ;;
111 -objdir=* | +objdir=* | +objdi=* | +objd=* | +obj=* | +ob=* | +o=*)
112 objdiroption=${arg}
113 objdir=`echo ${arg} | sed 's/[+-]o[a-z]*=//'`
114 ;;
115 -recurring | +recurring | +recurrin | +recurri | +recurr | +recur | +recu | +rec | +re)
116 recurring=true
117 arguments=`echo ${arguments} | sed "s:${arg}::"`
118 ;;
119 -rm | +rm)
120 removing=${arg}
121 ;;
122 -site=* | +site=* | +sit=* | +si=*)
123 site=`echo ${arg} | sed 's/[+-]s[a-z]*=//'`
124 ;;
125 # -srcdir=* | +srcdir=* | +srcdi=* | +srcd=* | +src=* | +sr=*)
126 # srcdir=`echo ${arg} | sed 's/[+-]s[a-z]*=//'`
127 # ;;
128 -subdirs | +su*)
129 subdirs=${arg}
130 ;;
131 -target=* | +target=* | +targe=* | +targ=* | +tar=* | +ta=*)
132 if [ -n "${targets}" ] ; then
133 subdirs="+subdirs"
134 fi
135
136 newtargets="${targets} `echo ${arg} | sed 's/[+-]t[a-z]*=//'`"
137 targets="${newtargets}"
138 ;;
139 -tmpdir=* | +tmpdir=* | +tmpdi=* | +tmpd=* | +tmp=* | +tm=*)
140 tmpdiroption=${arg}
141 TMPDIR=`echo ${arg} | sed 's/[+-]t[a-z]*=//'`
142 ;;
143 -v | -verbose | +v*)
144 verbose=${arg}
145 ;;
146 -* | +*)
147 (echo ;
148 echo "Unrecognized option: \"${arg}\"". ;
149 echo) 1>&2
150 fatal=true
151 ;;
152 *)
153 if [ -n "${hosts}" ] ; then
154 subdirs="+subdirs"
155 fi
156
157 newhosts="${hosts} ${arg}"
158 hosts=${newhosts}
159 ;;
160 esac
161 done
162
163 if [ -n "${verbose}" ] ; then
164 echo $0 $*
165 fi
166
167 ## this is a little touchy and won't always work, but...
168 ##
169 ## if the argv[0] starts with a slash then it is an absolute name that can be
170 ## used as is.
171 ##
172 ## otherwise, if argv[0] has no slash in it, we can assume that it is on the
173 ## path. Since PATH might include "." we also add `pwd` to the end of PATH.
174 ##
175 ## otherwise we prepend `pwd` to $0 and hope that will give us an absolute
176 ## path.
177 ##
178
179 if (echo $0 | grep '^/' > /dev/null) ; then
180 progname=$0
181 else
182 if (echo $0 | grep '/' > /dev/null) ; then
183 progname=`pwd`/$0
184 else
185 progname=$0
186 PATH=$PATH:`pwd` ; export PATH
187 fi
188 fi
189
190 configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
191
192 if ${configsub} none >/dev/null 2>&1 ; then
193 true
194 else
195 echo '***' cannot find config.sub.
196 echo 1
197 fi
198
199 # process host and target only if not removing.
200 if [ -z "${removing}" -a -z "${fatal}" ] ; then
201 # Complain if an arg is missing
202 if [ -z "${hosts}" ] ; then
203 (echo ;
204 echo "configure: No HOST specified." ;
205 echo) 1>&2
206 fatal=true
207 fi
208 fi
209
210 if [ -n "${fatal}" -o "${hosts}" = "help" ] ; then
211 (echo "Usage: configure HOST" ;
212 echo ;
213 echo "Options: [defaults in brackets]" ;
214 echo " +ansi configure w/ANSI library. [no ansi lib]" ;
215 echo " +ddestdir=MYDIR configure for installation host dependent files" ;
216 echo " into MYDIR. [\"/usr/local\"]" ;
217 echo " +idestdir=MYDIR configure for installation host independent files" ;
218 echo " into MYDIR. [\"/usr/local\"]" ;
219 echo " +destdir=MYDIR configure for installation of both host dependent and" ;
220 echo " host independent files into MYDIR. [\"/usr/local\"]" ;
221 echo " +gas configure the compilers for use with gas. [native as]" ;
222 echo " +help print this message. [normal config]" ;
223 echo " +lang=LANG configure to build LANG. [gcc]" ;
224 echo " +nfp configure the compilers default to soft floating point. [hard float]" ;
225 echo " +norecursion configure this directory only. [recurse]" ;
226 echo " +objdir=ODIR configure in a parallel tree rooted in ODIR. [rooted in \".\"]" ;
227 echo " +rm remove this configuration. [build a configuration]" ;
228 echo " +site configure with site specific makefile" ;
229 # This is correctly aligned in the output, even though it isn't here.
230 echo " +subdirs configure in subdirectories. [in source directories]" ;
231 echo " +target=TARGET configure for TARGET. [TARGET = HOST]" ;
232 echo " +tmpdir=TMPDIR create temporary files in TMPDIR. [ TMPDIR = \"/tmp\" ]" ;
233 echo ;
234 echo "Where HOST and TARGET are something like \"vax\", \"sun3\", \"encore\", etc." ;
235 echo "Asking for more than one \"+target\" implies \"+subdirs\". Any other" ;
236 echo "options given will apply to all targets.") 1>&2
237
238 if [ -r config.status ] ; then
239 cat config.status
240 fi
241
242 exit 1
243 fi
244
245 ### break up configure.in.
246 if [ -r configure.in ] ; then
247 if [ -z "`grep '^# per\-host:' configure.in`" ] ; then
248 echo '***' `pwd`/configure.in has no "per-host:" line. 1>&2
249 exit 1
250 fi
251
252 if [ -z "`grep '^# per\-target:' configure.in`" ] ; then
253 echo '***' `pwd`/configure.in has no "per-target:" line. 1>&2
254 exit 1
255 fi
256
257 if [ -z "${TMPDIR}" ] ; then
258 TMPDIR=/tmp ; export TMPDIR
259 fi
260
261 # keep this filename short for &%*%$*# 14 char file names
262 tmpfile=${TMPDIR}/cONf$$
263
264 # split configure.in into common, per-host, per-target,
265 # and post-target parts. Post-target is optional.
266 sed -e '/^# per\-host:/,$d' configure.in > ${tmpfile}.com
267 sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' configure.in > ${tmpfile}.hst
268 if grep '^# post-target:' configure.in >/dev/null ; then
269 sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' configure.in > ${tmpfile}.tgt
270 sed -e '1,/^# post\-target:/d' configure.in > ${tmpfile}.pos
271 else
272 sed -e '1,/^# per\-target:/d' configure.in > ${tmpfile}.tgt
273 echo >${tmpfile}.pos
274 fi
275
276 else
277 echo '***' No configure.in in `pwd`
278 exit 1
279 fi
280
281 ### do common part of configure.in
282
283 . ${tmpfile}.com
284
285 # some sanity checks on configure.in
286 if [ -z "${srctrigger}" ] ; then
287 echo '***' srctrigger not set in `pwd`/configure.in.
288 exit 1
289 fi
290
291 for host in ${hosts} ; do
292 # Default other arg
293 if [ -z "${targets}" -o -n "${defaulttargets}" ] ; then
294 targets=${host}
295 defaulttargets=true
296 fi
297
298 host_alias=${host}
299
300 result=`${configsub} ${host}`
301 host_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
302 host_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
303 host_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
304 host=${host_cpu}-${host_vendor}-${host_os}
305 host_makefile_frag=config/mh-${host}
306 if [ ! -f ${host_makefile_frag} ]
307 then
308 host_makefile_frag=config/mh-${host_alias}
309 fi
310
311 . ${tmpfile}.hst
312
313 for target in ${targets} ; do
314
315 target_alias=${target}
316 result=`${configsub} ${target}`
317 target_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
318 target_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
319 target_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
320 target=${target_cpu}-${target_vendor}-${target_os}
321 target_makefile_frag=config/mt-${target}
322 if [ ! -f ${target_makefile_frag} ]
323 then
324 target_makefile_frag=config/mt-${target_alias}
325 fi
326
327 . ${tmpfile}.tgt
328
329 hostsubdir=H-${host_alias}
330 targetsubdir=T-${target_alias}
331
332 if [ -n "${removing}" ] ; then
333 if [ -n "${objdir}" ] ; then
334 echo '***' +rm not supported for +objdir. Just \"rm -rf ${objdir}\" by hand.
335 exit 1
336 fi
337
338 if [ -n "${subdirs}" ] ; then
339 if [ -d "${hostsubdir}" ] ; then
340 rm -rf ${hostsubdir}/${targetsubdir}
341
342 if [ -z "`(ls ${hostsubdir}) 2>&1 | grep T- | grep -v T-independent`" ] ; then
343 rm -rf ${hostsubdir}
344 fi
345 else
346 echo Warning: no `pwd`/${hostsubdir} to remove.
347 fi
348 else
349 rm -f ${Makefile} config.status ${links}
350 fi
351 else
352 if [ -n "${objdir}" ]; then
353 srcdir=`pwd`
354 cd ${objdir}
355 fi
356
357 if [ -n "${subdirs}" ] ; then
358 # check for existing status before allowing forced subdirs.
359 if [ -f ${Makefile} ] ; then
360 echo '***' "${Makefile} already exists in source directory. `pwd` not configured." 1>&2
361 exit 1
362 fi
363
364 if [ ! -d ${hostsubdir} ] ; then mkdir ${hostsubdir} ; fi
365 cd ${hostsubdir}
366
367 if [ ! -d ${targetsubdir} ] ; then
368 if [ -z "${commontargets}" ] ; then
369 mkdir ${targetsubdir}
370 else
371 if [ ! -d T-independent ] ; then
372 mkdir T-independent
373 fi
374
375 ${symbolic_link} T-independent ${targetsubdir}
376 fi # if target independent
377 fi # if no target dir yet
378
379 cd ${targetsubdir}
380
381 if [ -z "${srcdir}" ] ; then
382 srcdir=../..
383 fi
384 else
385 # if not subdir builds, then make sure none exist.
386 if [ -n "`(ls .) 2>&1 | (grep H- ; true)`" ] ; then
387 echo '***' "Configured subdirs exist. `pwd` not configured." 1>&2
388 exit 1
389 else
390 true
391 fi
392 fi
393
394 # Find the source files, if location was not specified.
395 if [ -z "${srcdir}" ] ; then
396 srcdirdefaulted=1
397 srcdir=.
398 if [ -n "${srctrigger}" -a ! -r ${srctrigger} ] ; then
399 srcdir=..
400 fi
401 fi
402
403 if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then
404 if [ -z "${srcdirdefaulted}" ] ; then
405 echo '***' "${progname}: Can't find ${srcname} sources in `pwd`/${srcdir}" 1>&2
406 else
407 echo '***' "${progname}: Can't find ${srcname} sources in `pwd`/. or `pwd`/.." 1>&2
408 fi
409
410 echo '***' \(At least ${srctrigger} is missing.\) 1>&2
411 exit 1
412 fi
413
414 # Set up the list of links to be made.
415 # ${links} is the list of link names, and ${files} is the list of names to link to.
416
417 # Make the links.
418 while [ -n "${files}" ] ; do
419 # set file to car of files, files to cdr of files
420 set ${files}; file=$1; shift; files=$*
421 set ${links}; link=$1; shift; links=$*
422
423 if [ ! -r ${srcdir}/${file} ] ; then
424 echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
425 echo '***' "since the file \"${file}\" does not exist." 1>&2
426 exit 1
427 fi
428
429 ${remove} -f ${link}
430 rm -f config.status
431 # Make a symlink if possible, otherwise try a hard link
432 ${symbolic_link} ${srcdir}/${file} ${link} 2>/dev/null || ${hard_link} ${srcdir}/${file} ${link}
433
434 if [ ! -r ${link} ] ; then
435 echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
436 exit 1
437 fi
438
439 if [ -n "${verbose}" ] ; then
440 echo "Linked \"${link}\" to \"${srcdir}/${file}\"."
441 fi
442 done
443
444 # Create a .gdbinit file which runs the one in srcdir
445 # and tells GDB to look there for source files.
446
447 case ${srcdir} in
448 .)
449 ;;
450 *)
451 echo "dir ." > .gdbinit
452 echo "dir ${srcdir}" >> .gdbinit
453 echo "source ${srcdir}/.gdbinit" >> .gdbinit
454 ;;
455 esac
456
457 # Install a makefile, and make it set VPATH
458 # if necessary so that the sources are found.
459 # Also change its value of srcdir.
460
461 # FIXME-someday: This business of always writing to .tem and mv back
462 # is so that I don't screw things up while developing. Once this
463 # template is stable, these should be optimized. xoxorich.
464
465 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
466 if [ "${host}" != "${target}" ] ; then
467 echo "CROSS=-DCROSS_COMPILE" > ${Makefile}
468 echo "ALL=start.encap" >> ${Makefile}
469 else
470 echo "ALL=all.internal" > ${Makefile}
471 fi
472
473 # set target, host, VPATH
474 echo "host_alias = ${host_alias}" >> ${Makefile}
475 echo "host_cpu = ${host_cpu}" >> ${Makefile}
476 echo "host_vendor = ${host_vendor}" >> ${Makefile}
477 echo "host_os = ${host_os}" >> ${Makefile}
478
479 echo "target_alias = ${target_alias}" >> ${Makefile}
480 echo "target_cpu = ${target_cpu}" >> ${Makefile}
481 echo "target_vendor = ${target_vendor}" >> ${Makefile}
482 echo "target_os = ${target_os}" >> ${Makefile}
483
484 if [ -n "${subdirs}" ] ; then
485 (echo "subdir = /${hostsubdir}/${targetsubdir}" ;
486 echo "unsubdir = ../..") >> ${Makefile}
487 else
488 (echo "subdir =" ;
489 echo "unsubdir = .") >> ${Makefile}
490 fi
491
492 # echo "workdir = `pwd`" >> ${Makefile}
493 echo "VPATH = ${srcdir}" >> ${Makefile}
494
495 # add "Makefile.in" (or whatever it's called)
496 cat ${srcdir}/${Makefile_in} >> ${Makefile}
497
498 # Conditionalize the makefile for this site.
499 if [ -n "${site}" ] ; then
500 site_makefile_frag=config/ms-${site}
501
502 if [ -f ${srcdir}/${site_makefile_frag} ] ; then
503 (echo "site_makefile_frag = ${srcdir}/${site_makefile_frag}" ;
504 sed -e "/^####/ r ${srcdir}/${site_makefile_frag}" ${Makefile}) > Makefile.tem
505 else
506 (echo "site_makefile_frag =" ;
507 cat ${Makefile}) > Makefile.tem
508 fi
509 mv Makefile.tem ${Makefile}
510 fi
511
512 # Conditionalize the makefile for this host.
513 if [ -f ${srcdir}/${host_makefile_frag} ] ; then
514 (echo "host_makefile_frag = ${srcdir}/${host_makefile_frag}" ;
515 sed -e "/^####/ r ${srcdir}/${host_makefile_frag}" ${Makefile}) > Makefile.tem
516 else
517 (echo "host_makefile_frag =" ;
518 cat ${Makefile}) > Makefile.tem
519 fi
520 mv Makefile.tem ${Makefile}
521
522 # Conditionalize the makefile for this target.
523 if [ -f ${srcdir}/${target_makefile_frag} ] ; then
524 (echo "target_makefile_frag = ${srcdir}/${target_makefile_frag}" ;
525 sed -e "/^####/ r ${srcdir}/${target_makefile_frag}" ${Makefile}) > Makefile.tem
526 else
527 (echo "target_makefile_frag =" ;
528 cat ${Makefile}) > Makefile.tem
529 fi
530 mv Makefile.tem ${Makefile}
531
532 # set srcdir
533 sed "s@^srcdir = \.@srcdir = ${srcdir}@" ${Makefile} > Makefile.tem
534 mv Makefile.tem ${Makefile}
535
536 # set ddestdir
537 if [ -n "${ddestdir}" ] ; then
538 sed "s:^ddestdir =.*$:ddestdir = ${ddestdir}:" ${Makefile} > Makefile.tem
539 mv Makefile.tem ${Makefile}
540 fi
541
542 # set idestdir
543 if [ -n "${idestdir}" ] ; then
544 sed "s:^idestdir =.*$:idestdir = ${idestdir}:" ${Makefile} > Makefile.tem
545 mv Makefile.tem ${Makefile}
546 fi
547
548 # reset SUBDIRS
549 sed "s:^SUBDIRS =.*$:SUBDIRS = ${configdirs}:" ${Makefile} > Makefile.tem
550 mv Makefile.tem ${Makefile}
551
552 # reset NONSUBDIRS
553 sed "s:^NONSUBDIRS =.*$:NONSUBDIRS = ${noconfigdirs}:" ${Makefile} > Makefile.tem
554 mv Makefile.tem ${Makefile}
555
556 # remove any form feeds.
557 sed -e "s/\f//" ${Makefile} > Makefile.tem
558 mv Makefile.tem ${Makefile}
559
560 using=
561 if [ -f ${srcdir}/${host_makefile_frag} ] ; then
562 using="${using} and \"${host_makefile_frag}\""
563 fi
564 if [ -f ${srcdir}/${target_makefile_frag} ] ; then
565 using="${using} and \"${target_makefile_frag}\""
566 fi
567 if [ -n "${site}" -a \
568 -f ${srcdir}/${site_makefile_frag} ] ; then
569 using="${using} and \"${site_makefile_frag}\""
570 fi
571 using=`echo "${using}" | sed 's/and/using/'`
572 using="Created \"${Makefile}\" in `pwd`${using}."
573
574 if [ -n "${verbose}" -o -z "${recurring}" ] ; then
575 echo ${using}
576 fi
577
578 . ${tmpfile}.pos
579
580 # describe the chosen configuration in config.status.
581 # Make that file a shellscript which will reestablish
582 # the same configuration. Used in Makefiles to rebuild
583 # Makefiles.
584
585 echo "#!/bin/sh
586 # `pwd` was configured as follows:
587 (cd ${srcdir} ; ${progname}" ${arguments} `if [ -z "${norecursion}" ] ; then echo +norecursion ; else true ; fi` ")
588 # ${using}" > config.status
589 chmod a+x config.status
590
591 originaldir=`pwd`
592 cd ${srcdir}
593 fi
594
595 # If there are subdirectories, then recurse.
596 if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
597 for configdir in ${configdirs} ; do
598 if [ -n "${verbose}" ] ; then
599 echo Configuring ${configdir}...
600 fi
601
602 if [ -d ${configdir} ] ; then
603 if [ -n "${objdir}" ] ; then
604 if [ ! -d ${objdir}/${configdir} ] ; then
605 mkdir ${objdir}/${configdir}
606 fi
607 fi
608
609 POPDIR=`pwd`
610 cd ${configdir}
611
612 if (${progname} +recurring ${host_alias} +target=${target_alias} \
613 ${verbose} ${subdirs} ${removing} +ddestdir=${ddestdir} +idestdir=${idestdir} \
614 `if [ -n "${objdir}" ] ; then echo +objdir=${objdir}/${configdir} ; fi` \
615 ${tmpdiroption}) ; then
616 true
617 else
618 exit 1
619 fi
620
621 cd ${POPDIR}
622
623 # (cd ${configdir} ;
624 # if (${progname} +recurring ${host_alias} +target=${target_alias} \
625 # ${verbose} ${subdirs} ${removing} +destdir=${destdir} \
626 # `if [ -n "${objdir}" ] ; then echo +objdir=${objdir}/${configdir} ; fi` \
627 # ${tmpdiroption}) ; then true ; else exit 1 ; fi) \
628 # | sed 's/^/ /'
629 else
630 if [ -n "${verbose}" ] ; then
631 echo Warning: directory \"${configdir}\" is missing.
632 fi
633 fi
634 done
635 fi
636 done # for each target
637
638 # Now build a Makefile for this host.
639 if [ -n "${subdirs}" -a ! -n "${removing}" ] ; then
640 push=`pwd`
641
642 if [ -n "${objdir}" ] ; then
643 cd ${objdir}
644 fi
645
646 cd ${hostsubdir}
647 cat > GNUmakefile << 'E!O!F'
648 # Makefile generated by configure for host ${host_alias}.
649
650 ALL := $(shell ls -d T-*)
651
652 %:
653 $(foreach subdir,$(ALL),$(MAKE) -C $(subdir) \$@ &&) true
654
655 all:
656 E!O!F
657 cd ${push}
658 fi
659 done # for each host
660
661 ### clean up.
662
663 rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
664
665 exit 0
666
667 #
668 #
669 # $Log$
670 # Revision 1.68 1991/11/09 11:34:52 rich
671 # correct a comment
672 #
673 # Revision 1.67 1991/11/06 22:28:08 rich
674 # pass +idestdir and +ddestdir
675 #
676 # Revision 1.66 1991/11/05 04:02:14 rich
677 # don't allow +recurring to reach config.status
678 #
679 # Revision 1.65 1991/11/01 00:25:28 rich
680 # new install theme
681 #
682 # Revision 1.64 1991/10/30 06:55:25 rich
683 # suck in site makefile frags first
684 #
685 # Revision 1.63 1991/10/25 02:07:18 steve
686 # More name changing
687 #
688 # Revision 1.62 1991/10/24 11:59:03 rich
689 # add null definitions for makefile_frag_foo
690 #
691 # Revision 1.61 1991/10/24 00:23:59 hgs
692 # Allow for using tmake-sun4
693 #
694 # Revision 1.60 1991/10/23 21:48:28 rich
695 # Makefiles should include the makefile frag names even if the makefile
696 # frag doesn't exist in *this* directory. Otherwise we inherit the
697 # variable setting from our parent Makefile.
698 #
699 # Revision 1.59 1991/10/16 19:53:31 gnu
700 # Update for SCO problems.
701 #
702 # * Fix "Larry Wall kludge" line so it works. If this script is run by csh,
703 # it will complain, feed itself to sh, and complain some more. But will work.
704 #
705 # * Use <14 char file names in /tmp.
706 #
707 # Revision 1.58 1991/10/16 06:12:52 rich
708 # Two small bugs. First, single quoted sed line doesn't need to quote
709 # '$'. Second, use quotes around the hereis document trigger in order
710 # to quote the entire contents of the hereis document.
711 #
712 # Revision 1.57 1991/10/11 05:31:05 gnu
713 # Simplify "Using" message code. Put the message that configure prints
714 # (or suppresses) into the config.status file as a comment.
715 #
716 # Revision 1.56 1991/10/10 05:01:47 rich
717 # Remove the set -e but protect the recusion call.
718 #
719 # Revision 1.55 1991/10/10 04:57:23 rich
720 # * Die when sub-configure's do.
721 # * get the makefile building message line correct.
722 # * set -e
723 #
724 # Revision 1.54 1991/10/10 01:04:42 rich
725 # Backed out the "/bin/sh config.sub" change. Fails when config.sub was
726 # on PATH.
727 #
728 # Revision 1.53 1991/10/10 00:38:08 rich
729 # Call config.sub as "/bin/sh config.sub" instead of directly. This
730 # protects us from the case where config.sub isn't executable.
731 #
732 # Revision 1.52 1991/10/09 00:48:26 rich
733 # Another patch from jim.
734 #
735 # Revision 1.51 1991/10/08 06:07:58 wilson
736 # Fix bug in smake- file code.
737 #
738 # Revision 1.50 1991/10/04 23:49:37 rich
739 # Per's patch for my config.sub botch.
740 #
741 # Revision 1.49 1991/10/04 22:52:09 rich
742 # Use john's heuristic for finding ourselves. kinda like hare krishna.
743 #
744 # Revision 1.48 1991/10/02 13:17:28 rich
745 # take out the set -e for now
746 #
747 # Revision 1.47 1991/10/02 10:02:23 rich
748 # * temporary files in TMPDIR
749 # * +objdir
750 #
751 # Revision 1.46 1991/10/02 06:29:53 rich
752 # Added +site=foo option for naming site specific Makefile fragments.
753 #
754 # Revision 1.45 1991/10/02 06:15:13 rich
755 # Removed +f option. Used to stand for +forcesubdirs which is now
756 # called +subdirs.
757 #
758 # Revision 1.44 1991/10/02 06:02:35 rich
759 # Added rcs log line.
760 #
761 #
762 #
763
764 #
765 # Local Variables:
766 # fill-column: 131
767 # End:
768 #
769
770 # end of configure