* Makefile.in: Added stuff for building deja-gnu.
[platform/upstream/binutils.git] / Makefile.in
1 #
2 # Makefile for directory with subdirs to build.
3 #   Copyright (C) 1990, 1991, 1992 Free Software Foundation
4 #
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
18 #
19
20 srcdir = .
21
22 prefix = /usr/local
23
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
27 tooldir = $(libdir)
28
29 program_transform_name =
30
31 datadir = $(prefix)/lib
32 mandir = $(prefix)/man
33 man1dir = $(mandir)/man1
34 man2dir = $(mandir)/man2
35 man3dir = $(mandir)/man3
36 man4dir = $(mandir)/man4
37 man5dir = $(mandir)/man5
38 man6dir = $(mandir)/man6
39 man7dir = $(mandir)/man7
40 man8dir = $(mandir)/man8
41 man9dir = $(mandir)/man9
42 infodir = $(prefix)/info
43 includedir = $(prefix)/include
44 docdir = $(datadir)/doc
45
46 SHELL = /bin/sh
47
48 INSTALL = install -c
49 INSTALL_PROGRAM = $(INSTALL)
50 INSTALL_DATA = $(INSTALL)
51
52 AS = as
53 AR = ar
54 AR_FLAGS = qc
55 CFLAGS = -g
56 C++FLAGS = -g -O
57 RANLIB = ranlib
58 NM = nm
59
60 BISON = `if [ -f $${rootme}/byacc/byacc ] ; \
61             then echo $${rootme}/byacc/byacc ; \
62             else echo bison -y ; \
63         fi`
64
65 LEX = `if [ -f $${rootme}/flex/flex ] ; \
66         then echo $${rootme}/flex/flex ; \
67         else echo flex ; fi`
68
69 MAKEINFO = `if [ -f $${rootme}/texinfo/C/makeinfo ] ; \
70         then echo $${rootme}/texinfo/C/makeinfo ; \
71         else echo makeinfo ; fi`
72
73 # C compiler to use to create programs which must be run in the build
74 # environment.
75 CC_FOR_BUILD = $(CC)
76 C++_FOR_BUILD = gcc
77
78 SUBDIRS = libiberty mmalloc glob readline opcodes bfd gdb  binutils ld gas tgas gcc libg++ newlib deja-gnu
79 OTHERS = 
80
81 ALL = all.normal
82 INSTALL_TARGET = install.all
83
84 ### for debugging
85 #GCCVERBOSE=-v
86
87 CC_FOR_TARGET = ` \
88   if [ -f $${rootme}/gcc/Makefile ] ; then \
89     echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
90   else \
91     if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
92       echo $(CC); \
93     else \
94       t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
95     fi; \
96   fi`
97
98 C++_FOR_TARGET = ` \
99   if [ -f $${rootme}/gcc/Makefile ] ; then \
100     echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
101   else \
102     if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
103       echo gcc; \
104     else \
105       t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
106     fi; \
107   fi`
108
109 AS_FOR_TARGET = ` \
110   if [ -f $${rootme}/gas/Makefile ] ; then \
111     echo $${rootme}/gas/as.new ; \
112   else \
113     if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
114       echo $(AS); \
115     else \
116        t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
117     fi \
118   fi`
119
120 AR_FOR_TARGET = ` \
121   if [ -f $${rootme}/binutils/Makefile ] ; then \
122     echo $${rootme}/binutils/ar ; \
123   else \
124     if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
125       echo $(AR); \
126     else \
127        t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
128     fi \
129   fi`
130
131 RANLIB_FOR_TARGET = ` \
132   if [ -f $${rootme}/binutils/Makefile ] ; then \
133     echo $${rootme}/binutils/ranlib ; \
134   else \
135     if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
136       echo $(RANLIB); \
137     else \
138        t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
139     fi \
140   fi`
141
142 NM_FOR_TARGET = ` \
143   if [ -f $${rootme}/binutils/Makefile ] ; then \
144     echo $${rootme}/binutils/nm ; \
145   else \
146     if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
147       echo $(NM); \
148     else \
149        t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
150     fi \
151   fi`
152
153 XTRAFLAGS = ` \
154   if [ -f $${rootme}/gcc/Makefile ] ; then \
155     if [ -f $${rootme}/newlib/Makefile ] ; then \
156       echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
157     else \
158       echo -I$${rootme}/gcc/include ; \
159     fi ; \
160   else \
161      echo ; \
162   fi`
163
164 #### host and target specific makefile fragments come in here.
165 ###
166
167 # Flags to pass down to sub-makes
168 FLAGS_TO_PASS = \
169         "prefix=$(prefix)" \
170         "exec_prefix=$(exec_prefix)" \
171         "tooldir=$(tooldir)" \
172         "AR=$(AR)" \
173         "AR_FLAGS=$(AR_FLAGS)" \
174         "CC=$(CC)" \
175         "CFLAGS=$(CFLAGS)" \
176         "C++FLAGS=$(C++FLAGS)" \
177         "RANLIB=$(RANLIB)" \
178         "LOADLIBES=$(LOADLIBES)" \
179         "LDFLAGS=$(LDFLAGS)" \
180         "BISON=$(BISON)" \
181         "LEX=$(LEX)" \
182         "MAKEINFO=$(MAKEINFO)" \
183         "INSTALL=$(INSTALL)" \
184         "INSTALL_DATA=$(INSTALL_DATA)" \
185         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
186         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
187         "C++_FOR_BUILD=$(C++_FOR_BUILD)"
188
189 # Flags to pass down to makes which are built with the target
190 # environment (e.g. libg++, xiberty, newlib).
191 TARGET_FLAGS_TO_PASS = \
192         "prefix=$(prefix)" \
193         "exec_prefix=$(exec_prefix)" \
194         "tooldir=$(tooldir)" \
195         "AR_FLAGS=$(AR_FLAGS)" \
196         "CFLAGS=$(CFLAGS)" \
197         "LOADLIBES=$(LOADLIBES)" \
198         "LDFLAGS=$(LDFLAGS)" \
199         "BISON=$(BISON)" \
200         "LEX=$(LEX)" \
201         "MAKEINFO=$(MAKEINFO)" \
202         "INSTALL=$(INSTALL)" \
203         "INSTALL_DATA=$(INSTALL_DATA)" \
204         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
205         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
206         "C++_FOR_BUILD=$(C++_FOR_BUILD)" \
207         "CC=$(CC_FOR_TARGET)" \
208         "C++=$(C++_FOR_TARGET)" \
209         "AS=$(AS_FOR_TARGET)" \
210         "AR=$(AR_FOR_TARGET)" \
211         "RANLIB=$(RANLIB_FOR_TARGET)" \
212         "NM=$(NM_FOR_TARGET)" \
213         "XTRAFLAGS=$(XTRAFLAGS)"
214
215 # The first rule in the file had better be this one.  Don't put any above it.
216 all:    $(ALL)
217
218 .PHONY: all info install-info clean-info
219 .NOEXPORT:
220
221 info:   
222         @rootme=`pwd` ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) subdir_do DO=info "DODIRS=$(SUBDIRS)" 
223
224 check:
225         @rootme=`pwd` ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=check "DODIRS=$(SUBDIRS)" subdir_do
226
227 clean-info:
228         @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=clean-info "DODIRS=$(SUBDIRS)" subdir_do
229
230 install-info: install-info-dirs force
231         -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
232         if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
233         -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
234         @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=install-info "DODIRS=$(SUBDIRS)" subdir_do
235         @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) dir.info install-dir.info
236
237 install-dir.info:
238         -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
239         if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
240         -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
241         $(INSTALL_DATA) dir.info $(infodir)/dir.info
242
243 all.normal: all-autoconf all-libiberty all-mmalloc all-texinfo \
244         all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
245         all-gcc all-binutils  all-libg++ all-readline all-gdb \
246         all-make all-rcs all-cvs all-diff all-grep \
247         all-patch all-emacs all-ispell all-etc \
248         all-newlib all-gprof all-send_pr all-libm all-deja-gnu
249
250 all.cross: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
251          all-opcodes all-bfd all-readline all-gdb all-binutils all-gcc \
252         all-newlib all-deja-gnu
253
254 clean: clean-autoconf clean-libiberty clean-mmalloc clean-texinfo \
255         clean-bfd clean-newlib clean-binutils clean-flex \
256         clean-byacc clean-ld clean-gas clean-etc clean-opcodes \
257         clean-gcc clean-readline clean-glob clean-gdb \
258         clean-make clean-diff clean-grep clean-rcs \
259         clean-cvs clean-patch clean-emacs clean-ispell \
260         clean-libg++ clean-gprof clean-send_pr clean-libm clean-xiberty \
261         clean-deja-gnu
262         -rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
263
264 clean-stamps:
265         -rm -f all-*
266
267 install: $(INSTALL_TARGET) 
268         -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
269         if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
270         -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
271
272 install.all: install-no-fixedincludes
273         @if [ -f ./gcc/Makefile ] ; then \
274                 rootme=`pwd` ; export rootme ; \
275                 (cd ./gcc; \
276                 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
277         else \
278                 true ; \
279         fi
280
281 install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
282         install-autoconf \
283         install-bfd \
284         install-binutils \
285         install-opcodes \
286         install-byacc \
287         install-cvs \
288         install-diff \
289         install-deja-gnu \
290         install-emacs \
291         install-etc \
292         install-flex \
293         install-gas \
294         install-gdb \
295         install-glob \
296         install-gprof \
297         install-grep \
298         install-ispell \
299         install-ld \
300         install-libg++ \
301         install-libiberty \
302         install-libm \
303         install-make \
304         install-mmalloc \
305         install-newlib \
306         install-patch \
307         install-rcs \
308         install-readline \
309         install-send_pr \
310         install-texinfo 
311         
312 gcc-no-fixedincludes:
313         @if [ -f ./gcc/Makefile ] ; then \
314                 rootme=`pwd` ; export rootme ; \
315                 (cd ./gcc; \
316                 $(MAKE) $(FLAGS_TO_PASS) install install-man \
317                         "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
318         else \
319                 true ; \
320         fi
321
322 install.cross: install-dirs install-libiberty install-mmalloc \
323         install-binutils install-opcodes install-byacc install-flex \
324         install-ld install-gas install-readline \
325         install-glob install-gdb install-mmalloc \
326         install-newlib install-gcc install-etc install-deja-gnu
327
328 ### deja-gnu
329 all-deja-gnu: force
330         @if [ -f ./deja-gnu/Makefile ] ; then \
331                 rootme=`pwd` ; export rootme ; \
332                 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
333         else \
334                 true ; \
335         fi
336
337 clean-deja-gnu: force
338         @if [ -f ./deja-gnu/Makefile ] ; then \
339                 rootme=`pwd` ; export rootme ; \
340                 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
341         else \
342                 true ; \
343         fi
344
345 install-deja-gnu: force
346         @if [ -f ./deja-gnu/Makefile ] ; then \
347                 rootme=`pwd` ; export rootme ; \
348                 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
349         else \
350                 true ; \
351         fi
352
353 ### autoconf
354 all-autoconf: force
355         @if [ -f ./autoconf/Makefile ] ; then \
356                 rootme=`pwd` ; export rootme ; \
357                 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
358         else \
359                 true ; \
360         fi
361
362 clean-autoconf: force
363         @if [ -f ./autoconf/Makefile ] ; then \
364                 rootme=`pwd` ; export rootme ; \
365                 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
366         else \
367                 true ; \
368         fi
369
370 install-autoconf: force
371         @if [ -f ./autoconf/Makefile ] ; then \
372                 rootme=`pwd` ; export rootme ; \
373                 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
374         else \
375                 true ; \
376         fi
377
378 ### etc
379 all-etc: force
380         @if [ -f ./etc/Makefile ] ; then \
381                 rootme=`pwd` ; export rootme ; \
382                 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
383         else \
384                 true ; \
385         fi
386
387 clean-etc: force
388         @if [ -f ./etc/Makefile ] ; then \
389                 rootme=`pwd` ; export rootme ; \
390                 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
391         else \
392                 true ; \
393         fi
394
395 install-etc: force
396         @if [ -f ./etc/Makefile ] ; then \
397                 rootme=`pwd` ; export rootme ; \
398                 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
399         else \
400                 true ; \
401         fi
402
403 ### libiberty
404 all-libiberty: force
405         @if [ -f ./libiberty/Makefile ] ; then \
406                 rootme=`pwd` ; export rootme ; \
407                 (cd ./libiberty; \
408                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
409         else \
410                 true ; \
411         fi
412
413 clean-libiberty: force
414         @if [ -f ./libiberty/Makefile ] ; then \
415                 rootme=`pwd` ; export rootme ; \
416                 (cd ./libiberty; \
417                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
418         else \
419                 true ; \
420         fi
421
422 install-libiberty: force
423         @if [ -f ./libiberty/Makefile ] ; then \
424                 rootme=`pwd` ; export rootme ; \
425                 (cd ./libiberty; \
426                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
427         else \
428                 true ; \
429         fi
430
431 ### xiberty
432 all-xiberty: all-gcc all-newlib
433         @if [ -f ./xiberty/Makefile ] ; then \
434                 rootme=`pwd` ; export rootme ; \
435                 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
436                 (cd ./xiberty; \
437                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
438         else \
439                 true ; \
440         fi
441
442 clean-xiberty: force
443         @if [ -f ./xiberty/Makefile ] ; then \
444                 rootme=`pwd` ; export rootme ; \
445                 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
446                 (cd ./xiberty; \
447                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
448         else \
449                 true ; \
450         fi
451
452 install-xiberty: force
453         @if [ -f ./xiberty/Makefile ] ; then \
454                 rootme=`pwd` ; export rootme ; \
455                 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
456                 (cd ./xiberty; \
457                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
458         else \
459                 true ; \
460         fi
461
462 ### mmalloc
463 all-mmalloc: force
464         @if [ -f ./mmalloc/Makefile ] ; then \
465                 rootme=`pwd` ; export rootme ; \
466                 (cd ./mmalloc; \
467                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
468         else \
469                 true ; \
470         fi
471
472 clean-mmalloc: force
473         @if [ -f ./mmalloc/Makefile ] ; then \
474                 rootme=`pwd` ; export rootme ; \
475                 (cd ./mmalloc; \
476                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
477         else \
478                 true ; \
479         fi
480
481 install-mmalloc: force
482         @if [ -f ./mmalloc/Makefile ] ; then \
483                 rootme=`pwd` ; export rootme ; \
484                 (cd ./mmalloc; \
485                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
486         else \
487                 true ; \
488         fi
489
490 ### texinfo
491 all-texinfo: all-libiberty
492         @if [ -f ./texinfo/Makefile ] ; then \
493                 rootme=`pwd` ; export rootme ; \
494                 (cd ./texinfo; \
495                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
496         else \
497                 true ; \
498         fi
499
500 clean-texinfo: force
501         @if [ -f ./texinfo/Makefile ] ; then \
502                 rootme=`pwd` ; export rootme ; \
503                 (cd ./texinfo; \
504                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
505         else \
506                 true ; \
507         fi
508
509 install-texinfo: force
510         @if [ -f ./texinfo/Makefile ] ; then \
511                 rootme=`pwd` ; export rootme ; \
512                 (cd ./texinfo; \
513                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
514         else \
515                 true ; \
516         fi
517
518 ### bfd
519 all-bfd: force
520         @if [ -f ./bfd/Makefile ] ; then \
521                 rootme=`pwd` ; export rootme ; \
522                 (cd ./bfd; \
523                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
524         else \
525                 true ; \
526         fi
527
528 clean-bfd: force
529         @if [ -f ./bfd/Makefile ] ; then \
530                 rootme=`pwd` ; export rootme ; \
531                 (cd ./bfd; \
532                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
533         else \
534                 true ; \
535         fi
536
537 install-bfd: force
538         @if [ -f ./bfd/Makefile ] ; then \
539                 rootme=`pwd` ; export rootme ; \
540                 (cd ./bfd; \
541                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
542         else \
543                 true ; \
544         fi
545
546
547 ### opcodes
548 all-opcodes: force
549         @if [ -f ./opcodes/Makefile ] ; then \
550                 rootme=`pwd` ; export rootme ; \
551                 (cd ./opcodes; \
552                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
553         else \
554                 true ; \
555         fi
556
557 clean-opcodes: force
558         @if [ -f ./opcodes/Makefile ] ; then \
559                 rootme=`pwd` ; export rootme ; \
560                 (cd ./opcodes; \
561                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
562         else \
563                 true ; \
564         fi
565
566 install-opcodes: force
567         @if [ -f ./opcodes/Makefile ] ; then \
568                 rootme=`pwd` ; export rootme ; \
569                 (cd ./opcodes; \
570                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
571         else \
572                 true ; \
573         fi
574
575 ### binutils
576 all-binutils: all-opcodes all-libiberty all-bfd all-flex
577         @if [ -f ./binutils/Makefile ] ; then \
578                 rootme=`pwd` ; export rootme ; \
579                 (cd ./binutils; \
580                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
581         else \
582                 true ; \
583         fi
584
585 clean-binutils: force
586         @if [ -f ./binutils/Makefile ] ; then \
587                 rootme=`pwd` ; export rootme ; \
588                 (cd ./binutils; \
589                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
590         else \
591                 true ; \
592         fi
593
594 install-binutils: force
595         @if [ -f ./binutils/Makefile ] ; then \
596                 rootme=`pwd` ; export rootme ; \
597                 (cd ./binutils; \
598                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
599         else \
600                 true ; \
601         fi
602
603 ### newlib
604 all-newlib: all-binutils all-ld all-gas all-gcc
605         @if [ -f ./newlib/Makefile ] ; then \
606                 rootme=`pwd` ; export rootme ; \
607                 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
608                 (cd ./newlib; \
609                 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
610         else \
611                 true ; \
612         fi
613
614 clean-newlib: force
615         @if [ -f ./newlib/Makefile ] ; then \
616                 rootme=`pwd` ; export rootme ; \
617                 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
618                 (cd ./newlib; \
619                 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
620         else \
621                 true ; \
622         fi
623
624 install-newlib: force
625         @if [ -f ./newlib/Makefile ] ; then \
626                 rootme=`pwd` ; export rootme ; \
627                 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
628                 (cd ./newlib; \
629                 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
630         else \
631                 true ; \
632         fi
633
634 ### gprof
635 all-gprof: all-libiberty all-bfd
636         @if [ -f ./gprof/Makefile ] ; then \
637                 rootme=`pwd` ; export rootme ; \
638                 (cd ./gprof; \
639                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
640         else \
641                 true ; \
642         fi
643
644 clean-gprof: force
645         @if [ -f ./gprof/Makefile ] ; then \
646                 rootme=`pwd` ; export rootme ; \
647                 (cd ./gprof; \
648                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
649         else \
650                 true ; \
651         fi
652
653 install-gprof: force
654         @if [ -f ./gprof/Makefile ] ; then \
655                 rootme=`pwd` ; export rootme ; \
656                 (cd ./gprof; \
657                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
658         else \
659                 true ; \
660         fi
661
662 ### byacc
663 all-byacc: force
664         @if [ -f ./byacc/Makefile ] ; then \
665                 rootme=`pwd` ; export rootme ; \
666                 (cd ./byacc; \
667                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
668         else \
669                 true ; \
670         fi
671
672 clean-byacc: force
673         @if [ -f ./byacc/Makefile ] ; then \
674                 rootme=`pwd` ; export rootme ; \
675                 (cd ./byacc; \
676                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
677         else \
678                 true ; \
679         fi
680
681 install-byacc: force
682         @if [ -f ./byacc/Makefile ] ; then \
683                 rootme=`pwd` ; export rootme ; \
684                 (cd ./byacc; \
685                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
686         else \
687                 true ; \
688         fi
689
690 ### flex
691 all-flex: all-libiberty
692         @if [ -f ./flex/Makefile ] ; then \
693                 rootme=`pwd` ; export rootme ; \
694                 (cd ./flex; \
695                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
696         else \
697                 true ; \
698         fi
699
700 clean-flex: force
701         @if [ -f ./flex/Makefile ] ; then \
702                 rootme=`pwd` ; export rootme ; \
703                 (cd ./flex; \
704                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
705         else \
706                 true ; \
707         fi
708
709 install-flex: force
710         @if [ -f ./flex/Makefile ] ; then \
711                 rootme=`pwd` ; export rootme ; \
712                 (cd ./flex; \
713                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
714         else \
715                 true ; \
716         fi
717 ### gcc
718 all-gcc: all-libiberty all-byacc
719         @if [ -f ./gcc/Makefile ] ; then \
720                 rootme=`pwd` ; export rootme ; \
721                 (cd ./gcc; \
722                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
723         else \
724                 true ; \
725         fi
726
727 clean-gcc: force
728         @if [ -f ./gcc/Makefile ] ; then \
729                 rootme=`pwd` ; export rootme ; \
730                 (cd ./gcc; \
731                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
732         else \
733                 true ; \
734         fi
735
736 install-gcc: force
737         @if [ -f ./gcc/Makefile ] ; then \
738                 rootme=`pwd` ; export rootme ; \
739                 (cd ./gcc; \
740                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
741         else \
742                 true ; \
743         fi
744
745 ### readline
746 all-readline: force
747         @if [ -f ./readline/Makefile ] ; then \
748                 rootme=`pwd` ; export rootme ; \
749                 (cd ./readline; \
750                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
751         else \
752                 true ; \
753         fi
754
755 clean-readline: force
756         @if [ -f ./readline/Makefile ] ; then \
757                 rootme=`pwd` ; export rootme ; \
758                 (cd ./readline; \
759                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
760         else \
761                 true ; \
762         fi
763
764 install-readline: force
765         @if [ -f ./readline/Makefile ] ; then \
766                 rootme=`pwd` ; export rootme ; \
767                 (cd ./readline; \
768                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
769         else \
770                 true ; \
771         fi
772
773 ### glob
774 all-glob: force
775         @if [ -f ./glob/Makefile ] ; then \
776                 rootme=`pwd` ; export rootme ; \
777                 (cd ./glob; \
778                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
779         else \
780                 true ; \
781         fi
782
783 clean-glob: force
784         @if [ -f ./glob/Makefile ] ; then \
785                 rootme=`pwd` ; export rootme ; \
786                 (cd ./glob; \
787                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
788         else \
789                 true ; \
790         fi
791
792 install-glob: force
793         @if [ -f ./glob/Makefile ] ; then \
794                 rootme=`pwd` ; export rootme ; \
795                 (cd ./glob; \
796                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
797         else \
798                 true ; \
799         fi
800
801 ### gas
802 all-gas: all-libiberty all-opcodes all-bfd
803         @if [ -f ./gas/Makefile ] ; then \
804                 rootme=`pwd` ; export rootme ; \
805                 (cd ./gas; \
806                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
807         else \
808                 true ; \
809         fi
810
811 clean-gas: force
812         @if [ -f ./gas/Makefile ] ; then \
813                 rootme=`pwd` ; export rootme ; \
814                 (cd ./gas; \
815                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
816         else \
817                 true ; \
818         fi
819
820 install-gas: force
821         @if [ -f ./gas/Makefile ] ; then \
822                 rootme=`pwd` ; export rootme ; \
823                 (cd ./gas; \
824                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
825         else \
826                 true ; \
827         fi
828
829 ### gas
830 all-tgas: all-libiberty all-bfd
831         @if [ -f ./tgas/Makefile ] ; then \
832                 rootme=`pwd` ; export rootme ; \
833                 (cd ./tgas; \
834                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
835         else \
836                 true ; \
837         fi
838
839
840 ### ld
841 all-ld: all-libiberty all-bfd all-byacc all-flex
842         @if [ -f ./ld/Makefile ] ; then \
843                 rootme=`pwd` ; export rootme ; \
844                 (cd ./ld; \
845                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
846         else \
847                 true ; \
848         fi
849
850 clean-ld: force
851         @if [ -f ./ld/Makefile ] ; then \
852                 rootme=`pwd` ; export rootme ; \
853                 (cd ./ld; \
854                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
855         else \
856                 true ; \
857         fi
858
859 install-ld: force
860         @if [ -f ./ld/Makefile ] ; then \
861                 rootme=`pwd` ; export rootme ; \
862                 (cd ./ld; \
863                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
864         else \
865                 true ; \
866         fi
867
868 ### gdb
869 all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
870         @if [ -f ./gdb/Makefile ] ; then \
871                 rootme=`pwd` ; export rootme ; \
872                 (cd ./gdb; \
873                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
874         else \
875                 true ; \
876         fi
877
878 clean-gdb: force
879         @if [ -f ./gdb/Makefile ] ; then \
880                 rootme=`pwd` ; export rootme ; \
881                 (cd ./gdb; \
882                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
883         else \
884                 true ; \
885         fi
886
887 install-gdb: force
888         @if [ -f ./gdb/Makefile ] ; then \
889                 rootme=`pwd` ; export rootme ; \
890                 (cd ./gdb; \
891                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
892         else \
893                 true ; \
894         fi
895
896 ### make
897 all-make: all-libiberty
898         @if [ -f ./make/Makefile ] ; then \
899                 rootme=`pwd` ; export rootme ; \
900                 (cd ./make; \
901                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
902         else \
903                 true ; \
904         fi
905
906 clean-make: force
907         @if [ -f ./make/Makefile ] ; then \
908                 rootme=`pwd` ; export rootme ; \
909                 (cd ./make; \
910                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
911         else \
912                 true ; \
913         fi
914
915 install-make: force
916         @if [ -f ./make/Makefile ] ; then \
917                 rootme=`pwd` ; export rootme ; \
918                 (cd ./make; \
919                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
920         else \
921                 true ; \
922         fi
923
924 ### diff
925 all-diff: force
926         @if [ -f ./diff/Makefile ] ; then \
927                 rootme=`pwd` ; export rootme ; \
928                 (cd ./diff; \
929                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
930         else \
931                 true ; \
932         fi
933
934 clean-diff: force
935         @if [ -f ./diff/Makefile ] ; then \
936                 rootme=`pwd` ; export rootme ; \
937                 (cd ./diff; \
938                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
939         else \
940                 true ; \
941         fi
942
943 install-diff: force
944         @if [ -f ./diff/Makefile ] ; then \
945                 rootme=`pwd` ; export rootme ; \
946                 (cd ./diff/; \
947                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
948         else \
949                 true ; \
950         fi
951
952 ### grep
953 all-grep: force
954         @if [ -f ./grep/Makefile ] ; then \
955                 rootme=`pwd` ; export rootme ; \
956                 (cd ./grep; \
957                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
958         else \
959                 true ; \
960         fi
961
962 clean-grep: force
963         @if [ -f ./grep/Makefile ] ; then \
964                 rootme=`pwd` ; export rootme ; \
965                 (cd ./grep; \
966                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
967         else \
968                 true ; \
969         fi
970
971 install-grep: force
972         @if [ -f ./grep/Makefile ] ; then \
973                 rootme=`pwd` ; export rootme ; \
974                 (cd ./grep; \
975                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
976         else \
977                 true ; \
978         fi
979
980 ### rcs
981 all-rcs: force
982         @if [ -f ./rcs/Makefile ] ; then \
983                 rootme=`pwd` ; export rootme ; \
984                 (cd ./rcs; \
985                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
986         else \
987                 true ; \
988         fi
989
990 clean-rcs: force
991         @if [ -f ./rcs/Makefile ] ; then \
992                 rootme=`pwd` ; export rootme ; \
993                 (cd ./rcs; \
994                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
995         else \
996                 true ; \
997         fi
998
999 install-rcs: force
1000         @if [ -f ./rcs/Makefile ] ; then \
1001                 rootme=`pwd` ; export rootme ; \
1002                 (cd ./rcs; \
1003                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1004         else \
1005                 true ; \
1006         fi
1007
1008 ### cvs
1009 all-cvs: force
1010         @if [ -f ./cvs/Makefile ] ; then \
1011                 rootme=`pwd` ; export rootme ; \
1012                 (cd ./cvs; \
1013                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1014         else \
1015                 true ; \
1016         fi
1017
1018 clean-cvs: force
1019         @if [ -f ./cvs/Makefile ] ; then \
1020                 rootme=`pwd` ; export rootme ; \
1021                 (cd ./cvs; \
1022                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1023         else \
1024                 true ; \
1025         fi
1026
1027 install-cvs: force
1028         @if [ -f ./cvs/Makefile ] ; then \
1029                 rootme=`pwd` ; export rootme ; \
1030                 (cd ./cvs; \
1031                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1032         else \
1033                 true ; \
1034         fi
1035
1036 ### patch
1037 all-patch: force
1038         @if [ -f ./patch/Makefile ] ; then \
1039                 rootme=`pwd` ; export rootme ; \
1040                 (cd ./patch; \
1041                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1042         else \
1043                 true ; \
1044         fi
1045
1046 clean-patch: force
1047         @if [ -f ./patch/Makefile ] ; then \
1048                 rootme=`pwd` ; export rootme ; \
1049                 (cd ./patch; \
1050                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1051         else \
1052                 true ; \
1053         fi
1054
1055 install-patch: force
1056         @if [ -f ./patch/Makefile ] ; then \
1057                 rootme=`pwd` ; export rootme ; \
1058                 (cd ./patch; \
1059                 $(MAKE) $(FLAGS_TO_PASS) \
1060                         bindir=$(bindir) \
1061                         man1dir=$(man1dir) install) ; \
1062         else \
1063                 true ; \
1064         fi
1065
1066 ### emacs
1067 all-emacs: force
1068         @if [ -f ./emacs/Makefile ] ; then \
1069                 rootme=`pwd` ; export rootme ; \
1070                 (cd ./emacs; \
1071                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1072         else \
1073                 true ; \
1074         fi
1075
1076 clean-emacs: force
1077         @if [ -f ./emacs/Makefile ] ; then \
1078                 rootme=`pwd` ; export rootme ; \
1079                 (cd ./emacs; \
1080                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1081         else \
1082                 true ; \
1083         fi
1084
1085 install-emacs: force
1086         @if [ -f ./emacs/Makefile ] ; then \
1087                 rootme=`pwd` ; export rootme ; \
1088                 (cd ./emacs; \
1089                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1090         else \
1091                 true ; \
1092         fi
1093
1094 ### ispell
1095 all-ispell: all-emacs
1096         @if [ -f ./ispell/Makefile ] ; then \
1097                 rootme=`pwd` ; export rootme ; \
1098                 (cd ./ispell; \
1099                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1100         else \
1101                 true ; \
1102         fi
1103
1104 clean-ispell: force
1105         @if [ -f ./ispell/Makefile ] ; then \
1106                 rootme=`pwd` ; export rootme ; \
1107                 (cd ./ispell; \
1108                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1109         else \
1110                 true ; \
1111         fi
1112
1113 install-ispell: force
1114         @if [ -f ./ispell/Makefile ] ; then \
1115                 rootme=`pwd` ; export rootme ; \
1116                 (cd ./ispell; \
1117                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1118         else \
1119                 true ; \
1120         fi
1121
1122 ### send_pr
1123 all-send_pr: force
1124         @if [ -f ./send_pr/Makefile ] ; then \
1125                 rootme=`pwd` ; export rootme ; \
1126                 (cd ./send_pr; \
1127                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1128         else \
1129                 true ; \
1130         fi
1131
1132 clean-send_pr: force
1133         @if [ -f ./send_pr/Makefile ] ; then \
1134                 rootme=`pwd` ; export rootme ; \
1135                 (cd ./send_pr; \
1136                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1137         else \
1138                 true ; \
1139         fi
1140
1141 install-send_pr: force
1142         @if [ -f ./send_pr/Makefile ] ; then \
1143                 rootme=`pwd` ; export rootme ; \
1144                 (cd ./send_pr; \
1145                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1146         else \
1147                 true ; \
1148         fi
1149
1150 ### libm
1151 all-libm: force
1152         @if [ -f ./libm/Makefile ] ; then \
1153                 rootme=`pwd` ; export rootme ; \
1154                 (cd ./libm; \
1155                 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1156         else \
1157                 true ; \
1158         fi
1159
1160 clean-libm: force
1161         @if [ -f ./libm/Makefile ] ; then \
1162                 rootme=`pwd` ; export rootme ; \
1163                 (cd ./libm; \
1164                 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1165         else \
1166                 true ; \
1167         fi
1168
1169 install-libm: force
1170         @if [ -f ./libm/Makefile ] ; then \
1171                 rootme=`pwd` ; export rootme ; \
1172                 (cd ./libm; \
1173                 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1174         else \
1175                 true ; \
1176         fi
1177
1178 ### libg++
1179
1180 all-libg++: all-gas all-ld all-gcc
1181         @if [ -f ./libg++/Makefile ] ; then \
1182                 rootme=`pwd` ; export rootme ; \
1183                 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1184                 (cd ./libg++; \
1185                 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
1186         else \
1187                 true ; \
1188         fi
1189
1190 clean-libg++: force
1191         @if [ -f ./libg++/Makefile ] ; then \
1192                 rootme=`pwd` ; export rootme ; \
1193                 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1194                 (cd ./libg++; \
1195                 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
1196         else \
1197                 true ; \
1198         fi
1199
1200 install-libg++: force
1201         @if [ -f ./libg++/Makefile ] ; then \
1202                 rootme=`pwd` ; export rootme ; \
1203                 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1204                 (cd ./libg++; \
1205                 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
1206         else \
1207                 true ; \
1208         fi
1209
1210 ### other supporting targets
1211 # this is a bad hack.
1212 all.xclib:      all.normal
1213         if [ -f clib/Makefile ] ; then \
1214                 (cd clib ; $(MAKE) $(FLAGS_TO_PASS)) ; \
1215         fi
1216
1217 subdir_do:
1218         @for i in $(DODIRS); do \
1219           if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1220             case $$i in \
1221             libg++ | xiberty | newlib) \
1222               if (rootme=`pwd` ; export rootme ; \
1223                   srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1224                   cd ./$$i ; \
1225                   $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1226               else exit 1 ; fi \
1227               ;; \
1228             *) \
1229               if (rootme=`pwd` ; export rootme ; \
1230                   cd ./$$i ; \
1231                   $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1232               else exit 1 ; fi \
1233               ;; \
1234             esac ; \
1235           else true ; fi ; \
1236         done
1237
1238 # The "else true" stuff is for Ultrix; the shell returns the exit code
1239 # of the "if" command, if no commands are run in the "then" or "else" part,
1240 # causing Make to quit.
1241
1242 MAKEDIRS= \
1243         $(prefix) \
1244         $(exec_prefix) \
1245         $(tooldir)
1246
1247 #       $(bindir) \
1248 #       $(libdir) \
1249 #       $(includedir) \
1250 #       $(datadir) \
1251 #       $(docdir) \
1252 #       $(mandir) \
1253 #       $(man1dir) \
1254 #       $(man5dir)
1255
1256 #       $(man2dir) \
1257 #       $(man3dir) \
1258 #       $(man4dir) \
1259 #       $(man6dir) \
1260 #       $(man7dir) \
1261 #       $(man8dir)
1262
1263 install-dirs:
1264         for i in $(MAKEDIRS) ; do \
1265                 echo Making $$i... ; \
1266                 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1267                 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1268                 if [ ! -d $$i ] ; then \
1269                         if mkdir $$i ; then \
1270                                 true ; \
1271                         else \
1272                                 exit 1 ; \
1273                         fi ; \
1274                 else \
1275                         true ; \
1276                 fi ; \
1277         done
1278
1279 MAKEINFODIRS= \
1280         $(prefix)
1281
1282 #       $(infodir)
1283
1284 install-info-dirs:
1285         if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
1286 #       if [ -d $(datadir) ] ; then true ; else mkdir $(datadir) ; fi
1287 #       if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
1288
1289 dir.info:
1290         $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
1291         mv -f dir.info.new dir.info
1292
1293 etags tags: TAGS
1294
1295 TAGS:
1296         etags `$(MAKE) ls`
1297
1298 ls:
1299         @echo Makefile
1300         @for i in $(SUBDIRS); \
1301         do \
1302                 (cd $$i; \
1303                         pwd=`pwd`; \
1304                         wd=`basename $$pwd`; \
1305                         for j in `$(MAKE) ls`; \
1306                         do \
1307                                 echo $$wd/$$j; \
1308                         done) \
1309         done
1310
1311 force:
1312
1313 # with the gnu make, this is done automatically.
1314
1315 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
1316         $(SHELL) ./config.status
1317
1318 #
1319 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1320
1321 DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
1322         config.sub config configure.man configure.texi move-if-change \
1323         COPYING.LIB
1324 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
1325 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
1326
1327 setup-dirs: force_update
1328         ./configure sun4
1329         make clean
1330         ./configure -rm sun4
1331         chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1332
1333 gdb.tar.Z: setup-dirs
1334         (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1335         $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1336
1337 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1338         rm -rf proto-toplev; mkdir proto-toplev
1339         ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1340         (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1341                 ln -s ../$$i . ; \
1342         done)
1343         # Put only one copy (four hard links) of COPYING in the tar file.
1344         rm                          proto-toplev/bfd/COPYING
1345         ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1346         rm                          proto-toplev/include/COPYING
1347         ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1348         rm                          proto-toplev/readline/COPYING
1349         ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
1350         # Take out texinfo from configurable dirs
1351         rm proto-toplev/configure.in
1352         sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
1353         # Take out glob from buildable dirs
1354         rm proto-toplev/Makefile.in
1355
1356         sed -e '/^SUBDIRS =/s/glob //' \
1357             -e '/^all\.normal: /s/\all-texinfo //' \
1358             -e '/^clean: /s/clean-texinfo //' \
1359             -e '/^install\.all: /s/install-texinfo //' \
1360         <Makefile.in >proto-toplev/Makefile.in
1361
1362         mkdir proto-toplev/texinfo
1363         mkdir proto-toplev/texinfo/fsf
1364         ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
1365         chmod og=u `find proto-toplev -print`
1366         (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1367                 echo "==> Making gdb-$$VER.tar.Z"; \
1368                 ln -s proto-toplev gdb-$$VER; \
1369                 tar cfh - gdb-$$VER \
1370                 | compress -v >gdb-$$VER.tar.Z)
1371
1372 force_update:
1373
1374 nothing:
1375
1376 # end of Makefile.in