2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991 Cygnus Support
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.
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.
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. */
24 datadir = $(prefix)/lib
25 bindir = $(prefix)/bin
26 libdir = $(prefix)/lib
27 mandir = $(datadir)/man
28 man1dir = $(mandir)/man1
29 man2dir = $(mandir)/man2
30 man3dir = $(mandir)/man3
31 man4dir = $(mandir)/man4
32 man5dir = $(mandir)/man5
33 man6dir = $(mandir)/man6
34 man7dir = $(mandir)/man7
35 man8dir = $(mandir)/man8
36 man9dir = $(mandir)/man9
37 infodir = $(datadir)/info
38 includedir = $(prefix)/include
39 docdir
= $(datadir)/doc
44 INSTALL_PROGRAM
= $(INSTALL
)
45 INSTALL_DATA
= $(INSTALL
)
51 BISON
= `if [ -d $(unsubdir)/../bison ] ; \
52 then echo \`pwd\
`/$(unsubdir)/../bison$(subdir)/bison -L \`pwd\
`/$(unsubdir)/../bison$(subdir)/ -y ; \
56 FRESHMAKEINFO
= `if [ -d $(unsubdir)/../texinfo/C ] ; \
57 then echo \`pwd\
`/$(unsubdir)/../texinfo/C$(subdir)/makeinfo ; \
60 #\`(cd $(srcdir)/bison ; \\`pwd\\`)\`
61 SUBDIRS
= libiberty glob readline bfd gdb binutils
ld gas gcc libg
++ gnulib clib
65 INSTALL_TARGET
= install.
all
71 #### host and target specific makefile fragments come in here.
74 .PHONY
: all info install-info clean-info
79 $(MAKE
) subdir_do DO
=info "DODIRS=$(SUBDIRS)"
82 $(MAKE
) subdir_do DO
=clean-info
"DODIRS=$(SUBDIRS)"
85 cfg-paper.
info: cfg-paper.texi
86 $(MAKEINFO
) -o cfg-paper.
info $(srcdir)/cfg-paper.texi
88 configure.
info: configure.texi
89 $(MAKEINFO
) -o configure.
info $(srcdir)/configure.texi
91 install-info
: install-info-dirs
force
92 $(MAKE
) subdir_do DO
=install-info
"DODIRS=$(SUBDIRS)"
93 $(INSTALL_DATA
) cfg-paper.
info $(infodir)/cfg-paper.
info
94 $(MAKE
) dir.
info install-dir.
info
97 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
101 all.normal
: all-texinfo all-bison all-byacc all-flex all-ld \
102 all-gcc all-gas all-binutils \
103 all-libg
++ all-gdb all-make all-cvs all-emacs all-ispell all-fileutils
104 all.cross
: all-bison all-ld all-gnulib all-gdb
105 # $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
107 clean: clean-libiberty clean-texinfo clean-bfd clean-binutils \
108 clean-bison clean-byacc clean-flex clean-ld clean-gas \
109 clean-gcc clean-gnulib clean-readline clean-glob clean-gdb \
110 clean-make clean-diff clean-grep clean-rcs clean-gdbm \
111 clean-cvs clean-emacs clean-ispell clean-fileutils
112 rm -rf
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
114 install: $(INSTALL_TARGET
) $(srcdir)/configure.man
115 $(INSTALL_DATA
) $(srcdir)/configure.man
$(man1dir)/configure
.1
117 install.
all: install-dirs install-libiberty install-texinfo \
118 install-binutils install-bison install-byacc install-flex \
119 install-ld install-gas install-gcc install-gnulib \
120 install-readline install-glob install-gdb install-make \
121 install-cvs install-emacs install-ispell install-fileutils
122 install.cross
: install-dirs install-libiberty install-binutils install-bison \
123 install-byacc install-ld install-gas install-gnulib \
124 install-readline install-glob install-gdb
127 .PHONY
: all-libiberty just-libiberty
128 all-libiberty
: just-libiberty
129 just-libiberty
: force
130 if
[ -d
$(unsubdir
)/libiberty
] ; then \
131 (cd
$(unsubdir
)/libiberty
$(subdir
); \
133 "against=$(against)" \
135 "AR_FLAGS=$(AR_FLAGS)" \
138 "LOADLIBES=$(LOADLIBES)" \
139 "LDFLAGS=$(LDFLAGS)" \
141 "MAKEINFO=$(MAKEINFO)" \
147 clean-libiberty
: force
148 if
[ -d
$(unsubdir
)/libiberty
] ; then \
149 (cd
$(unsubdir
)/libiberty
$(subdir
); \
151 "against=$(against)" \
153 "AR_FLAGS=$(AR_FLAGS)" \
156 "LOADLIBES=$(LOADLIBES)" \
157 "LDFLAGS=$(LDFLAGS)" \
159 "MAKEINFO=$(MAKEINFO)" \
165 install-libiberty
: force
166 if
[ -d
$(unsubdir
)/libiberty
] ; then \
167 (cd
$(unsubdir
)/libiberty
$(subdir
); \
169 "against=$(against)" \
171 "AR_FLAGS=$(AR_FLAGS)" \
174 "LOADLIBES=$(LOADLIBES)" \
175 "LDFLAGS=$(LDFLAGS)" \
177 "MAKEINFO=$(MAKEINFO)" \
184 .PHONY
: all-texinfo just-texinfo
185 all-texinfo
: just-texinfo
186 just-texinfo
: just-libiberty
force
187 if
[ -d
$(unsubdir
)/texinfo
] ; then \
188 (cd
$(unsubdir
)/texinfo
$(subdir
); \
190 "against=$(against)" \
192 "AR_FLAGS=$(AR_FLAGS)" \
195 "LOADLIBES=$(LOADLIBES)" \
196 "LDFLAGS=$(LDFLAGS)" \
198 "MAKEINFO=$(MAKEINFO)" \
205 if
[ -d
$(unsubdir
)/texinfo
] ; then \
206 (cd
$(unsubdir
)/texinfo
$(subdir
); \
208 "against=$(against)" \
210 "AR_FLAGS=$(AR_FLAGS)" \
213 "LOADLIBES=$(LOADLIBES)" \
214 "LDFLAGS=$(LDFLAGS)" \
216 "MAKEINFO=$(MAKEINFO)" \
222 install-texinfo
: force
223 if
[ -d
$(unsubdir
)/texinfo
] ; then \
224 (cd
$(unsubdir
)/texinfo
$(subdir
); \
226 "against=$(against)" \
228 "AR_FLAGS=$(AR_FLAGS)" \
231 "LOADLIBES=$(LOADLIBES)" \
232 "LDFLAGS=$(LDFLAGS)" \
234 "MAKEINFO=$(MAKEINFO)" \
241 .PHONY
: all-bfd just-bfd
244 if
[ -d
$(unsubdir
)/bfd
] ; then \
245 (cd
$(unsubdir
)/bfd
$(subdir
); \
247 "against=$(against)" \
249 "AR_FLAGS=$(AR_FLAGS)" \
252 "LOADLIBES=$(LOADLIBES)" \
253 "LDFLAGS=$(LDFLAGS)" \
255 "MAKEINFO=$(MAKEINFO)" \
262 if
[ -d
$(unsubdir
)/bfd
] ; then \
263 (cd
$(unsubdir
)/bfd
$(subdir
); \
265 "against=$(against)" \
267 "AR_FLAGS=$(AR_FLAGS)" \
270 "LOADLIBES=$(LOADLIBES)" \
271 "LDFLAGS=$(LDFLAGS)" \
273 "MAKEINFO=$(MAKEINFO)" \
280 if
[ -d
$(unsubdir
)/bfd
] ; then \
281 (cd
$(unsubdir
)/bfd
$(subdir
); \
283 "against=$(against)" \
285 "AR_FLAGS=$(AR_FLAGS)" \
288 "LOADLIBES=$(LOADLIBES)" \
289 "LDFLAGS=$(LDFLAGS)" \
291 "MAKEINFO=$(MAKEINFO)" \
298 .PHONY
: all-binutils just-binutils
299 all-binutils
: just-binutils
300 just-binutils
: just-libiberty just-bfd
force
301 if
[ -d
$(unsubdir
)/binutils
] ; then \
302 (cd
$(unsubdir
)/binutils
$(subdir
); \
304 "against=$(against)" \
306 "AR_FLAGS=$(AR_FLAGS)" \
309 "LOADLIBES=$(LOADLIBES)" \
310 "LDFLAGS=$(LDFLAGS)" \
312 "MAKEINFO=$(MAKEINFO)" \
318 clean-binutils
: force
319 if
[ -d
$(unsubdir
)/binutils
] ; then \
320 (cd
$(unsubdir
)/binutils
$(subdir
); \
322 "against=$(against)" \
324 "AR_FLAGS=$(AR_FLAGS)" \
327 "LOADLIBES=$(LOADLIBES)" \
328 "LDFLAGS=$(LDFLAGS)" \
330 "MAKEINFO=$(MAKEINFO)" \
336 install-binutils
: force
337 if
[ -d
$(unsubdir
)/binutils
] ; then \
338 (cd
$(unsubdir
)/binutils
$(subdir
); \
340 "against=$(against)" \
342 "AR_FLAGS=$(AR_FLAGS)" \
345 "LOADLIBES=$(LOADLIBES)" \
346 "LDFLAGS=$(LDFLAGS)" \
348 "MAKEINFO=$(MAKEINFO)" \
355 .PHONY
: all-byacc just-byacc
356 all-byacc
: just-byacc
358 if
[ -d
$(unsubdir
)/byacc
] ; then \
359 (cd
$(unsubdir
)/byacc
$(subdir
); \
361 "against=$(against)" \
363 "AR_FLAGS=$(AR_FLAGS)" \
366 "LOADLIBES=$(LOADLIBES)" \
367 "LDFLAGS=$(LDFLAGS)" \
369 "MAKEINFO=$(MAKEINFO)" \
376 if
[ -d
$(unsubdir
)/byacc
] ; then \
377 (cd
$(unsubdir
)/byacc
$(subdir
); \
379 "against=$(against)" \
381 "AR_FLAGS=$(AR_FLAGS)" \
384 "LOADLIBES=$(LOADLIBES)" \
385 "LDFLAGS=$(LDFLAGS)" \
387 "MAKEINFO=$(MAKEINFO)" \
394 if
[ -d
$(unsubdir
)/byacc
] ; then \
395 (cd
$(unsubdir
)/byacc
$(subdir
); \
397 "against=$(against)" \
399 "AR_FLAGS=$(AR_FLAGS)" \
402 "LOADLIBES=$(LOADLIBES)" \
403 "LDFLAGS=$(LDFLAGS)" \
405 "MAKEINFO=$(MAKEINFO)" \
412 .PHONY
: all-bison just-bison
413 all-bison
: just-bison
414 just-bison
: just-libiberty
force
415 if
[ -d
$(unsubdir
)/bison
] ; then \
416 (cd
$(unsubdir
)/bison
$(subdir
); \
418 "against=$(against)" \
420 "AR_FLAGS=$(AR_FLAGS)" \
423 "LOADLIBES=$(LOADLIBES)" \
424 "LDFLAGS=$(LDFLAGS)" \
426 "MAKEINFO=$(MAKEINFO)" \
433 if
[ -d
$(unsubdir
)/bison
] ; then \
434 (cd
$(unsubdir
)/bison
$(subdir
); \
436 "against=$(against)" \
438 "AR_FLAGS=$(AR_FLAGS)" \
441 "LOADLIBES=$(LOADLIBES)" \
442 "LDFLAGS=$(LDFLAGS)" \
444 "MAKEINFO=$(MAKEINFO)" \
451 if
[ -d
$(unsubdir
)/bison
] ; then \
452 (cd
$(unsubdir
)/bison
$(subdir
); \
454 "against=$(against)" \
456 "AR_FLAGS=$(AR_FLAGS)" \
459 "LOADLIBES=$(LOADLIBES)" \
460 "LDFLAGS=$(LDFLAGS)" \
462 "MAKEINFO=$(MAKEINFO)" \
469 .PHONY
: all-gcc just-gcc
471 #just-gcc: just-libiberty just-bison just-gnulib1 force
472 just-gcc
: just-libiberty just-bison
force
473 if
[ -d
$(unsubdir
)/gcc
] ; then \
474 (cd
$(unsubdir
)/gcc
$(subdir
); \
476 "against=$(against)" \
478 "AR_FLAGS=$(AR_FLAGS)" \
481 "LOADLIBES=$(LOADLIBES)" \
482 "LDFLAGS=$(LDFLAGS)" \
484 "MAKEINFO=$(MAKEINFO)" \
491 if
[ -d
$(unsubdir
)/gcc
] ; then \
492 (cd
$(unsubdir
)/gcc
$(subdir
); \
494 "against=$(against)" \
496 "AR_FLAGS=$(AR_FLAGS)" \
499 "LOADLIBES=$(LOADLIBES)" \
500 "LDFLAGS=$(LDFLAGS)" \
502 "MAKEINFO=$(MAKEINFO)" \
509 if
[ -d
$(unsubdir
)/gcc
] ; then \
510 (cd
$(unsubdir
)/gcc
$(subdir
); \
512 "against=$(against)" \
514 "AR_FLAGS=$(AR_FLAGS)" \
517 "LOADLIBES=$(LOADLIBES)" \
518 "LDFLAGS=$(LDFLAGS)" \
520 "MAKEINFO=$(MAKEINFO)" \
527 .PHONY
: all-readline just-readline
528 all-readline
: just-readline
530 if
[ -d
$(unsubdir
)/readline
] ; then \
531 (cd
$(unsubdir
)/readline
$(subdir
); \
533 "against=$(against)" \
535 "AR_FLAGS=$(AR_FLAGS)" \
538 "LOADLIBES=$(LOADLIBES)" \
539 "LDFLAGS=$(LDFLAGS)" \
541 "MAKEINFO=$(MAKEINFO)" \
547 clean-readline
: force
548 if
[ -d
$(unsubdir
)/readline
] ; then \
549 (cd
$(unsubdir
)/readline
$(subdir
); \
551 "against=$(against)" \
553 "AR_FLAGS=$(AR_FLAGS)" \
556 "LOADLIBES=$(LOADLIBES)" \
557 "LDFLAGS=$(LDFLAGS)" \
559 "MAKEINFO=$(MAKEINFO)" \
565 install-readline
: force
566 if
[ -d
$(unsubdir
)/readline
] ; then \
567 (cd
$(unsubdir
)/readline
$(subdir
); \
569 "against=$(against)" \
571 "AR_FLAGS=$(AR_FLAGS)" \
574 "LOADLIBES=$(LOADLIBES)" \
575 "LDFLAGS=$(LDFLAGS)" \
577 "MAKEINFO=$(MAKEINFO)" \
584 .PHONY
: all-glob just-glob
587 if
[ -d
$(unsubdir
)/glob
] ; then \
588 (cd
$(unsubdir
)/glob
$(subdir
); \
590 "against=$(against)" \
592 "AR_FLAGS=$(AR_FLAGS)" \
595 "LOADLIBES=$(LOADLIBES)" \
596 "LDFLAGS=$(LDFLAGS)" \
598 "MAKEINFO=$(MAKEINFO)" \
605 if
[ -d
$(unsubdir
)/glob
] ; then \
606 (cd
$(unsubdir
)/glob
$(subdir
); \
608 "against=$(against)" \
610 "AR_FLAGS=$(AR_FLAGS)" \
613 "LOADLIBES=$(LOADLIBES)" \
614 "LDFLAGS=$(LDFLAGS)" \
616 "MAKEINFO=$(MAKEINFO)" \
623 if
[ -d
$(unsubdir
)/glob
] ; then \
624 (cd
$(unsubdir
)/glob
$(subdir
); \
626 "against=$(against)" \
628 "AR_FLAGS=$(AR_FLAGS)" \
631 "LOADLIBES=$(LOADLIBES)" \
632 "LDFLAGS=$(LDFLAGS)" \
634 "MAKEINFO=$(MAKEINFO)" \
641 .PHONY
: all-gas just-gas
643 just-gas
: just-libiberty just-bfd
force
644 if
[ -d
$(unsubdir
)/gas
] ; then \
645 (cd
$(unsubdir
)/gas
$(subdir
); \
647 "against=$(against)" \
649 "AR_FLAGS=$(AR_FLAGS)" \
652 "LOADLIBES=$(LOADLIBES)" \
653 "LDFLAGS=$(LDFLAGS)" \
655 "MAKEINFO=$(MAKEINFO)" \
662 if
[ -d
$(unsubdir
)/gas
] ; then \
663 (cd
$(unsubdir
)/gas
$(subdir
); \
665 "against=$(against)" \
667 "AR_FLAGS=$(AR_FLAGS)" \
670 "LOADLIBES=$(LOADLIBES)" \
671 "LDFLAGS=$(LDFLAGS)" \
673 "MAKEINFO=$(MAKEINFO)" \
680 if
[ -d
$(unsubdir
)/gas
] ; then \
681 (cd
$(unsubdir
)/gas
$(subdir
); \
683 "against=$(against)" \
685 "AR_FLAGS=$(AR_FLAGS)" \
688 "LOADLIBES=$(LOADLIBES)" \
689 "LDFLAGS=$(LDFLAGS)" \
691 "MAKEINFO=$(MAKEINFO)" \
698 .PHONY
: all-ld just-ld
700 just-ld
: just-libiberty just-bfd just-bison
force
701 if
[ -d
$(unsubdir
)/ld ] ; then \
702 (cd
$(unsubdir
)/ld$(subdir
); \
704 "against=$(against)" \
706 "AR_FLAGS=$(AR_FLAGS)" \
709 "LOADLIBES=$(LOADLIBES)" \
710 "LDFLAGS=$(LDFLAGS)" \
712 "MAKEINFO=$(MAKEINFO)" \
719 if
[ -d
$(unsubdir
)/ld ] ; then \
720 (cd
$(unsubdir
)/ld$(subdir
); \
722 "against=$(against)" \
724 "AR_FLAGS=$(AR_FLAGS)" \
727 "LOADLIBES=$(LOADLIBES)" \
728 "LDFLAGS=$(LDFLAGS)" \
730 "MAKEINFO=$(MAKEINFO)" \
737 if
[ -d
$(unsubdir
)/ld ] ; then \
738 (cd
$(unsubdir
)/ld$(subdir
); \
740 "against=$(against)" \
742 "AR_FLAGS=$(AR_FLAGS)" \
745 "LOADLIBES=$(LOADLIBES)" \
746 "LDFLAGS=$(LDFLAGS)" \
748 "MAKEINFO=$(MAKEINFO)" \
754 ### gnulib (and gnulib1)
755 .PHONY
: all-gnulib just-gnulib1 just-gnulib
756 just-gnulib1
: all-gas all-binutils
force
757 if
[ -d
$(unsubdir
)/gnulib
] ; then \
758 (cd
$(unsubdir
)/gnulib
$(subdir
); \
760 "against=$(against)" \
762 "AR_FLAGS=$(AR_FLAGS)" \
765 "LOADLIBES=$(LOADLIBES)" \
766 "LDFLAGS=$(LDFLAGS)" \
768 "MAKEINFO=$(MAKEINFO)" \
775 if
[ -d
$(unsubdir
)/gnulib
] ; then \
776 (cd
$(unsubdir
)/gnulib
$(subdir
); \
778 "against=$(against)" \
780 "AR_FLAGS=$(AR_FLAGS)" \
783 "LOADLIBES=$(LOADLIBES)" \
784 "LDFLAGS=$(LDFLAGS)" \
786 "MAKEINFO=$(MAKEINFO)" \
792 install-gnulib1
: force
793 echo gnulib1 is a component
, not an installable target
795 all-gnulib
: just-gnulib
796 just-gnulib
: all-gcc all-gas all-binutils
force
798 if
[ -d
$(unsubdir
)/gnulib
] ; then \
799 (cd
$(unsubdir
)/gnulib
$(subdir
); \
801 "against=$(against)" \
803 "AR_FLAGS=$(AR_FLAGS)" \
806 "LOADLIBES=$(LOADLIBES)" \
807 "LDFLAGS=$(LDFLAGS)" \
809 "MAKEINFO=$(MAKEINFO)" \
816 if
[ -d
$(unsubdir
)/gnulib
] ; then \
817 (cd
$(unsubdir
)/gnulib
$(subdir
); \
819 "against=$(against)" \
821 "AR_FLAGS=$(AR_FLAGS)" \
824 "LOADLIBES=$(LOADLIBES)" \
825 "LDFLAGS=$(LDFLAGS)" \
827 "MAKEINFO=$(MAKEINFO)" \
833 install-gnulib
: force
834 if
[ -d
$(unsubdir
)/gnulib
] ; then \
835 (cd
$(unsubdir
)/gnulib
$(subdir
); \
837 "against=$(against)" \
839 "AR_FLAGS=$(AR_FLAGS)" \
842 "LOADLIBES=$(LOADLIBES)" \
843 "LDFLAGS=$(LDFLAGS)" \
845 "MAKEINFO=$(MAKEINFO)" \
852 .PHONY
: all-gdb just-gdb
854 just-gdb
: just-bfd just-libiberty just-readline just-glob just-bison
force
855 if
[ -d
$(unsubdir
)/gdb
] ; then \
856 (cd
$(unsubdir
)/gdb
$(subdir
); \
858 "against=$(against)" \
860 "AR_FLAGS=$(AR_FLAGS)" \
863 "LOADLIBES=$(LOADLIBES)" \
864 "LDFLAGS=$(LDFLAGS)" \
866 "MAKEINFO=$(MAKEINFO)" \
873 if
[ -d
$(unsubdir
)/gdb
] ; then \
874 (cd
$(unsubdir
)/gdb
$(subdir
); \
876 "against=$(against)" \
878 "AR_FLAGS=$(AR_FLAGS)" \
881 "LOADLIBES=$(LOADLIBES)" \
882 "LDFLAGS=$(LDFLAGS)" \
884 "MAKEINFO=$(MAKEINFO)" \
891 if
[ -d
$(unsubdir
)/gdb
] ; then \
892 (cd
$(unsubdir
)/gdb
$(subdir
); \
894 "against=$(against)" \
896 "AR_FLAGS=$(AR_FLAGS)" \
899 "LOADLIBES=$(LOADLIBES)" \
900 "LDFLAGS=$(LDFLAGS)" \
902 "MAKEINFO=$(MAKEINFO)" \
909 .PHONY
: all-make just-make
911 just-make
: all-libiberty
force
912 if
[ -d
$(unsubdir
)/make
] ; then \
913 (cd
$(unsubdir
)/make
$(subdir
); \
915 "against=$(against)" \
917 "AR_FLAGS=$(AR_FLAGS)" \
920 "LOADLIBES=$(LOADLIBES)" \
921 "LDFLAGS=$(LDFLAGS)" \
923 "MAKEINFO=$(MAKEINFO)" \
930 if
[ -d
$(unsubdir
)/make
] ; then \
931 (cd
$(unsubdir
)/make
$(subdir
); \
933 "against=$(against)" \
935 "AR_FLAGS=$(AR_FLAGS)" \
938 "LOADLIBES=$(LOADLIBES)" \
939 "LDFLAGS=$(LDFLAGS)" \
941 "MAKEINFO=$(MAKEINFO)" \
948 if
[ -d
$(unsubdir
)/make
] ; then \
949 (cd
$(unsubdir
)/make
$(subdir
); \
951 "against=$(against)" \
953 "AR_FLAGS=$(AR_FLAGS)" \
956 "LOADLIBES=$(LOADLIBES)" \
957 "LDFLAGS=$(LDFLAGS)" \
959 "MAKEINFO=$(MAKEINFO)" \
966 .PHONY
: all-diff just-diff
969 if
[ -d
$(unsubdir
)/diff
] ; then \
970 (cd
$(unsubdir
)/diff
$(subdir
); \
972 "against=$(against)" \
974 "AR_FLAGS=$(AR_FLAGS)" \
977 "LOADLIBES=$(LOADLIBES)" \
978 "LDFLAGS=$(LDFLAGS)" \
980 "MAKEINFO=$(MAKEINFO)" \
987 if
[ -d
$(unsubdir
)/diff
] ; then \
988 (cd
$(unsubdir
)/diff
$(subdir
); \
990 "against=$(against)" \
992 "AR_FLAGS=$(AR_FLAGS)" \
995 "LOADLIBES=$(LOADLIBES)" \
996 "LDFLAGS=$(LDFLAGS)" \
998 "MAKEINFO=$(MAKEINFO)" \
1005 if
[ -d
$(unsubdir
)/diff
] ; then \
1006 (cd
$(unsubdir
)/diff
/$(subdir
); \
1008 "against=$(against)" \
1010 "AR_FLAGS=$(AR_FLAGS)" \
1012 "RANLIB=$(RANLIB)" \
1013 "LOADLIBES=$(LOADLIBES)" \
1014 "LDFLAGS=$(LDFLAGS)" \
1016 "MAKEINFO=$(MAKEINFO)" \
1023 .PHONY
: all-grep just-grep
1026 if
[ -d
$(unsubdir
)/grep
] ; then \
1027 (cd
$(unsubdir
)/grep
$(subdir
); \
1029 "against=$(against)" \
1031 "AR_FLAGS=$(AR_FLAGS)" \
1033 "RANLIB=$(RANLIB)" \
1034 "LOADLIBES=$(LOADLIBES)" \
1035 "LDFLAGS=$(LDFLAGS)" \
1037 "MAKEINFO=$(MAKEINFO)" \
1044 if
[ -d
$(unsubdir
)/grep
] ; then \
1045 (cd
$(unsubdir
)/grep
$(subdir
); \
1047 "against=$(against)" \
1049 "AR_FLAGS=$(AR_FLAGS)" \
1051 "RANLIB=$(RANLIB)" \
1052 "LOADLIBES=$(LOADLIBES)" \
1053 "LDFLAGS=$(LDFLAGS)" \
1055 "MAKEINFO=$(MAKEINFO)" \
1062 if
[ -d
$(unsubdir
)/grep
] ; then \
1063 (cd
$(unsubdir
)/grep
$(subdir
); \
1065 "against=$(against)" \
1067 "AR_FLAGS=$(AR_FLAGS)" \
1069 "RANLIB=$(RANLIB)" \
1070 "LOADLIBES=$(LOADLIBES)" \
1071 "LDFLAGS=$(LDFLAGS)" \
1073 "MAKEINFO=$(MAKEINFO)" \
1080 .PHONY
: all-rcs just-rcs
1082 just-rcs
: just-diff just-grep
force
1083 if
[ -d
$(unsubdir
)/rcs
] ; then \
1084 (cd
$(unsubdir
)/rcs
$(subdir
); \
1086 "against=$(against)" \
1088 "AR_FLAGS=$(AR_FLAGS)" \
1090 "RANLIB=$(RANLIB)" \
1091 "LOADLIBES=$(LOADLIBES)" \
1092 "LDFLAGS=$(LDFLAGS)" \
1094 "MAKEINFO=$(MAKEINFO)" \
1101 if
[ -d
$(unsubdir
)/rcs
] ; then \
1102 (cd
$(unsubdir
)/rcs
$(subdir
); \
1104 "against=$(against)" \
1106 "AR_FLAGS=$(AR_FLAGS)" \
1108 "RANLIB=$(RANLIB)" \
1109 "LOADLIBES=$(LOADLIBES)" \
1110 "LDFLAGS=$(LDFLAGS)" \
1112 "MAKEINFO=$(MAKEINFO)" \
1118 install-rcs
: install-grep install-diff
force
1119 if
[ -d
$(unsubdir
)/rcs
] ; then \
1120 (cd
$(unsubdir
)/rcs
$(subdir
); \
1122 "against=$(against)" \
1124 "AR_FLAGS=$(AR_FLAGS)" \
1126 "RANLIB=$(RANLIB)" \
1127 "LOADLIBES=$(LOADLIBES)" \
1128 "LDFLAGS=$(LDFLAGS)" \
1130 "MAKEINFO=$(MAKEINFO)" \
1137 .PHONY
: all-gdbm just-gdbm
1140 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1141 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1143 "against=$(against)" \
1145 "AR_FLAGS=$(AR_FLAGS)" \
1147 "RANLIB=$(RANLIB)" \
1148 "LOADLIBES=$(LOADLIBES)" \
1149 "LDFLAGS=$(LDFLAGS)" \
1151 "MAKEINFO=$(MAKEINFO)" \
1158 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1159 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1161 "against=$(against)" \
1163 "AR_FLAGS=$(AR_FLAGS)" \
1165 "RANLIB=$(RANLIB)" \
1166 "LOADLIBES=$(LOADLIBES)" \
1167 "LDFLAGS=$(LDFLAGS)" \
1169 "MAKEINFO=$(MAKEINFO)" \
1176 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1177 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1179 "against=$(against)" \
1181 "AR_FLAGS=$(AR_FLAGS)" \
1183 "RANLIB=$(RANLIB)" \
1184 "LOADLIBES=$(LOADLIBES)" \
1185 "LDFLAGS=$(LDFLAGS)" \
1187 "MAKEINFO=$(MAKEINFO)" \
1194 .PHONY
: all-cvs just-cvs
1195 all-cvs
: just-cvs just-rcs just-grep just-diff
1196 just-cvs
: just-gdbm
force
1197 if
[ -d
$(unsubdir
)/cvs
] ; then \
1198 (cd
$(unsubdir
)/cvs
$(subdir
); \
1200 "against=$(against)" \
1202 "AR_FLAGS=$(AR_FLAGS)" \
1204 "RANLIB=$(RANLIB)" \
1205 "LOADLIBES=$(LOADLIBES)" \
1206 "LDFLAGS=$(LDFLAGS)" \
1208 "MAKEINFO=$(MAKEINFO)" \
1214 clean-cvs
: clean-gdbm
force
1215 if
[ -d
$(unsubdir
)/cvs
] ; then \
1216 (cd
$(unsubdir
)/cvs
$(subdir
); \
1218 "against=$(against)" \
1220 "AR_FLAGS=$(AR_FLAGS)" \
1222 "RANLIB=$(RANLIB)" \
1223 "LOADLIBES=$(LOADLIBES)" \
1224 "LDFLAGS=$(LDFLAGS)" \
1226 "MAKEINFO=$(MAKEINFO)" \
1232 install-cvs
: install-rcs install-gdbm
force
1233 if
[ -d
$(unsubdir
)/cvs
] ; then \
1234 (cd
$(unsubdir
)/cvs
$(subdir
); \
1236 "against=$(against)" \
1238 "AR_FLAGS=$(AR_FLAGS)" \
1240 "RANLIB=$(RANLIB)" \
1241 "LOADLIBES=$(LOADLIBES)" \
1242 "LDFLAGS=$(LDFLAGS)" \
1244 "MAKEINFO=$(MAKEINFO)" \
1251 .PHONY
: all-emacs just-emacs
1252 all-emacs
: just-emacs
1254 if
[ -d
$(unsubdir
)/emacs
] ; then \
1255 (cd
$(unsubdir
)/emacs
$(subdir
); \
1257 "against=$(against)" \
1259 "AR_FLAGS=$(AR_FLAGS)" \
1261 "RANLIB=$(RANLIB)" \
1262 "LOADLIBES=$(LOADLIBES)" \
1263 "LDFLAGS=$(LDFLAGS)" \
1265 "MAKEINFO=$(MAKEINFO)" \
1272 if
[ -d
$(unsubdir
)/emacs
] ; then \
1273 (cd
$(unsubdir
)/emacs
$(subdir
); \
1275 "against=$(against)" \
1277 "AR_FLAGS=$(AR_FLAGS)" \
1279 "RANLIB=$(RANLIB)" \
1280 "LOADLIBES=$(LOADLIBES)" \
1281 "LDFLAGS=$(LDFLAGS)" \
1283 "MAKEINFO=$(MAKEINFO)" \
1289 install-emacs
: install-rcs install-gdbm
force
1290 if
[ -d
$(unsubdir
)/emacs
] ; then \
1291 (cd
$(unsubdir
)/emacs
$(subdir
); \
1293 "against=$(against)" \
1295 "AR_FLAGS=$(AR_FLAGS)" \
1297 "RANLIB=$(RANLIB)" \
1298 "LOADLIBES=$(LOADLIBES)" \
1299 "LDFLAGS=$(LDFLAGS)" \
1301 "MAKEINFO=$(MAKEINFO)" \
1308 .PHONY
: all-ispell just-ispell
1309 all-ispell
: just-ispell
1310 just-ispell
: all-emacs
force
1311 if
[ -d
$(unsubdir
)/ispell
] ; then \
1312 (cd
$(unsubdir
)/ispell
$(subdir
); \
1314 "against=$(against)" \
1316 "AR_FLAGS=$(AR_FLAGS)" \
1318 "RANLIB=$(RANLIB)" \
1319 "LOADLIBES=$(LOADLIBES)" \
1320 "LDFLAGS=$(LDFLAGS)" \
1322 "MAKEINFO=$(MAKEINFO)" \
1329 if
[ -d
$(unsubdir
)/ispell
] ; then \
1330 (cd
$(unsubdir
)/ispell
$(subdir
); \
1332 "against=$(against)" \
1334 "AR_FLAGS=$(AR_FLAGS)" \
1336 "RANLIB=$(RANLIB)" \
1337 "LOADLIBES=$(LOADLIBES)" \
1338 "LDFLAGS=$(LDFLAGS)" \
1340 "MAKEINFO=$(MAKEINFO)" \
1346 install-ispell
: install-rcs install-gdbm
force
1347 if
[ -d
$(unsubdir
)/ispell
] ; then \
1348 (cd
$(unsubdir
)/ispell
$(subdir
); \
1350 "against=$(against)" \
1352 "AR_FLAGS=$(AR_FLAGS)" \
1354 "RANLIB=$(RANLIB)" \
1355 "LOADLIBES=$(LOADLIBES)" \
1356 "LDFLAGS=$(LDFLAGS)" \
1358 "MAKEINFO=$(MAKEINFO)" \
1365 .PHONY
: all-flex just-flex
1368 if
[ -d
$(unsubdir
)/flex
] ; then \
1369 (cd
$(unsubdir
)/flex
$(subdir
); \
1371 "against=$(against)" \
1373 "AR_FLAGS=$(AR_FLAGS)" \
1375 "RANLIB=$(RANLIB)" \
1376 "LOADLIBES=$(LOADLIBES)" \
1377 "LDFLAGS=$(LDFLAGS)" \
1379 "MAKEINFO=$(MAKEINFO)" \
1386 if
[ -d
$(unsubdir
)/flex
] ; then \
1387 (cd
$(unsubdir
)/flex
$(subdir
); \
1389 "against=$(against)" \
1391 "AR_FLAGS=$(AR_FLAGS)" \
1393 "RANLIB=$(RANLIB)" \
1394 "LOADLIBES=$(LOADLIBES)" \
1395 "LDFLAGS=$(LDFLAGS)" \
1397 "MAKEINFO=$(MAKEINFO)" \
1404 if
[ -d
$(unsubdir
)/flex
] ; then \
1405 (cd
$(unsubdir
)/flex
$(subdir
); \
1407 "against=$(against)" \
1409 "AR_FLAGS=$(AR_FLAGS)" \
1411 "RANLIB=$(RANLIB)" \
1412 "LOADLIBES=$(LOADLIBES)" \
1413 "LDFLAGS=$(LDFLAGS)" \
1415 "MAKEINFO=$(MAKEINFO)" \
1422 .PHONY
: all-fileutils just-fileutils
1423 all-fileutils
: just-fileutils
1424 just-fileutils
: force
1425 if
[ -d
$(unsubdir
)/fileutils
] ; then \
1426 (cd
$(unsubdir
)/fileutils
$(subdir
); \
1428 "prefix=$(prefix)" \
1429 "datadir=$(datadir)" \
1430 "mandir=$(mandir)" \
1431 "against=$(against)" \
1433 "AR_FLAGS=$(AR_FLAGS)" \
1435 "RANLIB=$(RANLIB)" \
1436 "LOADLIBES=$(LOADLIBES)" \
1437 "LDFLAGS=$(LDFLAGS)" \
1439 "MAKEINFO=$(MAKEINFO)" \
1445 clean-fileutils
: force
1446 if
[ -d
$(unsubdir
)/fileutils
] ; then \
1447 (cd
$(unsubdir
)/fileutils
$(subdir
); \
1449 "prefix=$(prefix)" \
1450 "datadir=$(datadir)" \
1451 "mandir=$(mandir)" \
1452 "against=$(against)" \
1454 "AR_FLAGS=$(AR_FLAGS)" \
1456 "RANLIB=$(RANLIB)" \
1457 "LOADLIBES=$(LOADLIBES)" \
1458 "LDFLAGS=$(LDFLAGS)" \
1460 "MAKEINFO=$(MAKEINFO)" \
1466 install-fileutils
: force
1467 if
[ -d
$(unsubdir
)/fileutils
] ; then \
1468 (cd
$(unsubdir
)/fileutils
$(subdir
); \
1470 "prefix=$(prefix)" \
1471 "datadir=$(datadir)" \
1472 "mandir=$(mandir)" \
1473 "against=$(against)" \
1475 "AR_FLAGS=$(AR_FLAGS)" \
1477 "RANLIB=$(RANLIB)" \
1478 "LOADLIBES=$(LOADLIBES)" \
1479 "LDFLAGS=$(LDFLAGS)" \
1481 "MAKEINFO=$(MAKEINFO)" \
1488 .PHONY
: all-libg
++ just-libg
++
1489 all-libg
++: just-libg
++
1490 # NOTE! We have added GXX= to the $(MAKE) line!!! Do not clone this one.
1491 just-libg
++: just-gcc
force
1492 if
[ -d
$(unsubdir
)/libg
++ ] ; then \
1493 MYGCC
="`pwd`/gcc"; \
1494 (cd
$(unsubdir
)/libg
++$(subdir
); \
1496 GXX
="$(GCCDIR)/gcc -B$(GCCDIR)/" \
1497 "prefix=$(prefix)" \
1498 "datadir=$(datadir)" \
1499 "mandir=$(mandir)" \
1500 "against=$(against)" \
1502 "AR_FLAGS=$(AR_FLAGS)" \
1504 "RANLIB=$(RANLIB)" \
1505 "LOADLIBES=$(LOADLIBES)" \
1506 "LDFLAGS=$(LDFLAGS)" \
1508 "MAKEINFO=$(MAKEINFO)" \
1515 if
[ -d
$(unsubdir
)/libg
++ ] ; then \
1516 (cd
$(unsubdir
)/libg
++$(subdir
); \
1518 "prefix=$(prefix)" \
1519 "datadir=$(datadir)" \
1520 "mandir=$(mandir)" \
1521 "against=$(against)" \
1523 "AR_FLAGS=$(AR_FLAGS)" \
1525 "RANLIB=$(RANLIB)" \
1526 "LOADLIBES=$(LOADLIBES)" \
1527 "LDFLAGS=$(LDFLAGS)" \
1529 "MAKEINFO=$(MAKEINFO)" \
1535 install-libg
++: force
1536 if
[ -d
$(unsubdir
)/libg
++ ] ; then \
1537 (cd
$(unsubdir
)/libg
++$(subdir
); \
1539 "prefix=$(prefix)" \
1540 "datadir=$(datadir)" \
1541 "mandir=$(mandir)" \
1542 "against=$(against)" \
1544 "AR_FLAGS=$(AR_FLAGS)" \
1546 "RANLIB=$(RANLIB)" \
1547 "LOADLIBES=$(LOADLIBES)" \
1548 "LDFLAGS=$(LDFLAGS)" \
1550 "MAKEINFO=$(MAKEINFO)" \
1556 ### other supporting targets
1557 # this is a bad hack.
1558 all.xclib
: all.normal
1559 if
[ -d clib
] ; then \
1560 (cd clib
; $(MAKE
)) ; \
1564 for i in
$(DODIRS
); do \
1565 if
[ -f
$(unsubdir
)/$$i/localenv
] ; then \
1566 if
(cd
$(unsubdir
)/$$i$(subdir
); \
1568 "against=$(against)" \
1570 "MAKEINFO=$(MAKEINFO)" \
1571 $(DO
)) ; then true
; \
1572 else exit
1 ; fi
; \
1573 else if
[ -d
$(unsubdir
)/$$i ] ; then \
1574 if
(cd
$(unsubdir
)/$$i$(subdir
); \
1576 "against=$(against)" \
1578 "AR_FLAGS=$(AR_FLAGS)" \
1580 "RANLIB=$(RANLIB)" \
1581 "LOADLIBES=$(LOADLIBES)" \
1582 "LDFLAGS=$(LDFLAGS)" \
1584 "MAKEINFO=$(MAKEINFO)" \
1585 $(DO
)) ; then true
; \
1586 else exit
1 ; fi
; \
1594 $(MAKE
) pass
"stagepass=stage1"
1596 $(MAKE
) pass
"stagepass=stage2"
1600 $(MAKE
) pass
"stagepass=stage1"
1602 $(MAKE
) pass
"stagepass=stage2"
1606 $(MAKE
) pass
"stagepass=stage2"
1610 cp
$(srcdir)/gcc
/gstdarg.h
$(unsubdir
)/gas
$(subdir
)/stdarg.h
1611 $(MAKE
) subdir_do
"DO=all info" "DODIRS=$(SUBDIRS)" \
1612 "CC=`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/gcc \
1613 -O $(GCCVERBOSE) -I`pwd`/$(unsubdir)/gcc$(subdir)/include \
1614 -B`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/ \
1615 -B`pwd`/$(unsubdir)/gas$(subdir)/$(stagepass)/ \
1616 -B`pwd`/$(unsubdir)/ld$(subdir)/$(stagepass)/" \
1617 "AR=`pwd`/$(unsubdir)/binutils$(subdir)/$(stagepass)/ar" \
1618 "LD=`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/gcc $(GCCVERBOSE)" \
1619 "RANLIB=`pwd`/$(unsubdir)/binutils$(subdir)/$(stagepass)/ranlib" \
1620 "LOADLIBES=`pwd`/$(unsubdir)/gnulib$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \
1621 "LDFLAGS=-nostdlib /lib/crt0.o \
1622 -L`pwd`/$(unsubdir)/gnulib$(subdir)/$(stagepass)/ \
1623 -B`pwd`/$(unsubdir)/ld$(subdir)/$(stagepass)/"
1627 $(MAKE
) subdir_do DO
=stage1
"DODIRS=$(SUBDIRS)"
1630 $(MAKE
) subdir_do DO
=stage2
"DODIRS=$(SUBDIRS)"
1633 $(MAKE
) subdir_do DO
=stage3
"DODIRS=$(SUBDIRS)"
1636 $(MAKE
) subdir_do DO
=stage4
"DODIRS=$(SUBDIRS)"
1640 comparison
:; $(MAKE
) subdir_do DO
=comparison against
=$(against
) "DODIRS=$(SUBDIRS)"
1642 de-stage1
:; $(MAKE
) subdir_do DO
=de-stage1
"DODIRS=$(SUBDIRS)"
1643 de-stage2
:; $(MAKE
) subdir_do DO
=de-stage2
"DODIRS=$(SUBDIRS)"
1644 de-stage3
:; $(MAKE
) subdir_do DO
=de-stage3
"DODIRS=$(SUBDIRS)"
1645 de-stage4
:; $(MAKE
) subdir_do DO
=de-stage4
"DODIRS=$(SUBDIRS)"
1647 # The "else true" stuff is for Ultrix; the shell returns the exit code
1648 # of the "if" command, if no commands are run in the "then" or "else" part,
1649 # causing Make to quit.
1670 for i in
$(MAKEDIRS
) ; do \
1671 echo Making
$$i...
; \
1672 if
[ -d
$$i ] ; then true
; else mkdir
$$i || exit
1 ; fi
; \
1679 install-info-dirs
: force
1680 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1681 if
[ -d
$(datadir) ] ; then true
; else mkdir
$(datadir) ; fi
1682 if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1685 $(srcdir)/texinfo
/gen-info-dir
$(infodir) > dir.
info.new
1686 mv
-f
dir.
info.new
dir.
info
1695 @for i in
$(SUBDIRS
); \
1699 wd
=`basename $$pwd`; \
1700 for j in
`$(MAKE) ls`; \
1708 # with the gnu make, this is done automatically.
1710 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1711 $(SHELL
) .
/config.status
1714 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1716 DEVO_SUPPORT
= README DOC.configure Makefile.in configure configure.in \
1718 GDB_SUPPORT_DIRS
= bfd
include libiberty readline glob
1719 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
) texinfo
/fsf
/texinfo.
tex
1721 setup-dirs
: force_update
1724 .
/configure
-rm sun4
1725 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1727 bfd.ilrt.
tar.Z
: setup-dirs
1728 rm -f bfd.ilrt.
tar.Z
1729 tar cf
- $(DEVO_SUPPORT
) $(GDB_SUPPORT_FILES
) \
1730 | compress
-v
>bfd.ilrt.
tar.Z
1732 gdb.
tar.Z
: setup-dirs
1733 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1734 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1736 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/fsf
/texinfo.
tex
1737 rm -rf proto-toplev
; mkdir proto-toplev
1738 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1739 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1742 # Take out texinfo from configurable dirs
1743 rm proto-toplev
/configure.in
1744 sed
'/^configdirs=/s/texinfo //' <configure.in
>proto-toplev
/configure.in
1745 # Take out glob from buildable dirs
1746 rm proto-toplev
/Makefile.in
1747 sed
'/^SUBDIRS =/s/glob //' <Makefile.in
>proto-toplev
/Makefile.in
1748 mkdir proto-toplev
/texinfo
1749 mkdir proto-toplev
/texinfo
/fsf
1750 ln
-s ..
/..
/..
/texinfo
/fsf
/texinfo.
tex proto-toplev
/texinfo
/fsf
/
1751 chmod og
=u
`find proto-toplev -print`
1752 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1753 echo
"==> Making gdb-$$VER.tar.Z"; \
1754 ln
-s proto-toplev gdb-
$$VER; \
1755 tar cfh
- gdb-
$$VER \
1756 | compress
-v
>gdb-
$$VER.
tar.Z
)
1762 # end of Makefile.in