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 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)"
81 install-info: dir.info install-info-dirs force
82 $(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)"
83 # $(MAKE) install-dir.info
86 all.normal: all-texinfo all-bison all-byacc all-ld all-gnulib all-gdb all-make \
87 all-cvs all-emacs all-ispell
88 all.cross: all-bison all-ld all-gnulib all-gdb
89 # $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
91 clean: clean-libiberty clean-texinfo clean-bfd clean-binutils clean-bison \
92 clean-byacc clean-ld clean-gas clean-gcc clean-gnulib clean-readline \
93 clean-glob clean-gdb clean-make clean-diff clean-grep clean-rcs \
94 clean-gdbm clean-cvs clean-emacs clean-ispell
95 rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
97 install: $(INSTALL_TARGET)
99 install.all: install-dirs install-libiberty install-texinfo install-binutils install-bison \
100 install-byacc install-ld install-gas install-gcc install-gnulib \
101 install-readline install-glob install-gdb install-make install-cvs \
102 install-emacs install-ispell
103 install.cross: install-dirs install-libiberty install-binutils install-bison \
104 install-byacc install-ld install-gas install-gnulib \
105 install-readline install-glob install-gdb
108 .PHONY: all-libiberty just-libiberty
109 all-libiberty: just-libiberty
110 just-libiberty: force
111 if [ -d $(unsubdir)/libiberty ] ; then \
112 (cd $(unsubdir)/libiberty$(subdir); \
114 "against=$(against)" \
116 "AR_FLAGS=$(AR_FLAGS)" \
119 "LOADLIBES=$(LOADLIBES)" \
120 "LDFLAGS=$(LDFLAGS)" \
122 "MAKEINFO=$(MAKEINFO)" \
128 clean-libiberty: force
129 if [ -d $(unsubdir)/libiberty ] ; then \
130 (cd $(unsubdir)/libiberty$(subdir); \
132 "against=$(against)" \
134 "AR_FLAGS=$(AR_FLAGS)" \
137 "LOADLIBES=$(LOADLIBES)" \
138 "LDFLAGS=$(LDFLAGS)" \
140 "MAKEINFO=$(MAKEINFO)" \
146 install-libiberty: force
147 if [ -d $(unsubdir)/libiberty ] ; then \
148 (cd $(unsubdir)/libiberty$(subdir); \
150 "against=$(against)" \
152 "AR_FLAGS=$(AR_FLAGS)" \
155 "LOADLIBES=$(LOADLIBES)" \
156 "LDFLAGS=$(LDFLAGS)" \
158 "MAKEINFO=$(MAKEINFO)" \
165 .PHONY: all-texinfo just-texinfo
166 all-texinfo: just-texinfo
167 just-texinfo: just-libiberty force
168 if [ -d $(unsubdir)/texinfo ] ; then \
169 (cd $(unsubdir)/texinfo$(subdir); \
171 "against=$(against)" \
173 "AR_FLAGS=$(AR_FLAGS)" \
176 "LOADLIBES=$(LOADLIBES)" \
177 "LDFLAGS=$(LDFLAGS)" \
179 "MAKEINFO=$(MAKEINFO)" \
186 if [ -d $(unsubdir)/texinfo ] ; then \
187 (cd $(unsubdir)/texinfo$(subdir); \
189 "against=$(against)" \
191 "AR_FLAGS=$(AR_FLAGS)" \
194 "LOADLIBES=$(LOADLIBES)" \
195 "LDFLAGS=$(LDFLAGS)" \
197 "MAKEINFO=$(MAKEINFO)" \
203 install-texinfo: force
204 if [ -d $(unsubdir)/texinfo ] ; then \
205 (cd $(unsubdir)/texinfo$(subdir); \
207 "against=$(against)" \
209 "AR_FLAGS=$(AR_FLAGS)" \
212 "LOADLIBES=$(LOADLIBES)" \
213 "LDFLAGS=$(LDFLAGS)" \
215 "MAKEINFO=$(MAKEINFO)" \
222 .PHONY: all-bfd just-bfd
225 if [ -d $(unsubdir)/bfd ] ; then \
226 (cd $(unsubdir)/bfd$(subdir); \
228 "against=$(against)" \
230 "AR_FLAGS=$(AR_FLAGS)" \
233 "LOADLIBES=$(LOADLIBES)" \
234 "LDFLAGS=$(LDFLAGS)" \
236 "MAKEINFO=$(MAKEINFO)" \
243 if [ -d $(unsubdir)/bfd ] ; then \
244 (cd $(unsubdir)/bfd$(subdir); \
246 "against=$(against)" \
248 "AR_FLAGS=$(AR_FLAGS)" \
251 "LOADLIBES=$(LOADLIBES)" \
252 "LDFLAGS=$(LDFLAGS)" \
254 "MAKEINFO=$(MAKEINFO)" \
261 if [ -d $(unsubdir)/bfd ] ; then \
262 (cd $(unsubdir)/bfd$(subdir); \
264 "against=$(against)" \
266 "AR_FLAGS=$(AR_FLAGS)" \
269 "LOADLIBES=$(LOADLIBES)" \
270 "LDFLAGS=$(LDFLAGS)" \
272 "MAKEINFO=$(MAKEINFO)" \
279 .PHONY: all-binutils just-binutils
280 all-binutils: just-binutils
281 just-binutils: just-libiberty just-bfd force
282 if [ -d $(unsubdir)/binutils ] ; then \
283 (cd $(unsubdir)/binutils$(subdir); \
285 "against=$(against)" \
287 "AR_FLAGS=$(AR_FLAGS)" \
290 "LOADLIBES=$(LOADLIBES)" \
291 "LDFLAGS=$(LDFLAGS)" \
293 "MAKEINFO=$(MAKEINFO)" \
299 clean-binutils: force
300 if [ -d $(unsubdir)/binutils ] ; then \
301 (cd $(unsubdir)/binutils$(subdir); \
303 "against=$(against)" \
305 "AR_FLAGS=$(AR_FLAGS)" \
308 "LOADLIBES=$(LOADLIBES)" \
309 "LDFLAGS=$(LDFLAGS)" \
311 "MAKEINFO=$(MAKEINFO)" \
317 install-binutils: force
318 if [ -d $(unsubdir)/binutils ] ; then \
319 (cd $(unsubdir)/binutils$(subdir); \
321 "against=$(against)" \
323 "AR_FLAGS=$(AR_FLAGS)" \
326 "LOADLIBES=$(LOADLIBES)" \
327 "LDFLAGS=$(LDFLAGS)" \
329 "MAKEINFO=$(MAKEINFO)" \
336 .PHONY: all-byacc just-byacc
337 all-byacc: just-byacc
339 if [ -d $(unsubdir)/byacc ] ; then \
340 (cd $(unsubdir)/byacc$(subdir); \
342 "against=$(against)" \
344 "AR_FLAGS=$(AR_FLAGS)" \
347 "LOADLIBES=$(LOADLIBES)" \
348 "LDFLAGS=$(LDFLAGS)" \
350 "MAKEINFO=$(MAKEINFO)" \
357 if [ -d $(unsubdir)/byacc ] ; then \
358 (cd $(unsubdir)/byacc$(subdir); \
360 "against=$(against)" \
362 "AR_FLAGS=$(AR_FLAGS)" \
365 "LOADLIBES=$(LOADLIBES)" \
366 "LDFLAGS=$(LDFLAGS)" \
368 "MAKEINFO=$(MAKEINFO)" \
375 if [ -d $(unsubdir)/byacc ] ; then \
376 (cd $(unsubdir)/byacc$(subdir); \
378 "against=$(against)" \
380 "AR_FLAGS=$(AR_FLAGS)" \
383 "LOADLIBES=$(LOADLIBES)" \
384 "LDFLAGS=$(LDFLAGS)" \
386 "MAKEINFO=$(MAKEINFO)" \
393 .PHONY: all-bison just-bison
394 all-bison: just-bison
395 just-bison: just-libiberty force
396 if [ -d $(unsubdir)/bison ] ; then \
397 (cd $(unsubdir)/bison$(subdir); \
399 "against=$(against)" \
401 "AR_FLAGS=$(AR_FLAGS)" \
404 "LOADLIBES=$(LOADLIBES)" \
405 "LDFLAGS=$(LDFLAGS)" \
407 "MAKEINFO=$(MAKEINFO)" \
414 if [ -d $(unsubdir)/bison ] ; then \
415 (cd $(unsubdir)/bison$(subdir); \
417 "against=$(against)" \
419 "AR_FLAGS=$(AR_FLAGS)" \
422 "LOADLIBES=$(LOADLIBES)" \
423 "LDFLAGS=$(LDFLAGS)" \
425 "MAKEINFO=$(MAKEINFO)" \
432 if [ -d $(unsubdir)/bison ] ; then \
433 (cd $(unsubdir)/bison$(subdir); \
435 "against=$(against)" \
437 "AR_FLAGS=$(AR_FLAGS)" \
440 "LOADLIBES=$(LOADLIBES)" \
441 "LDFLAGS=$(LDFLAGS)" \
443 "MAKEINFO=$(MAKEINFO)" \
450 .PHONY: all-gcc just-gcc
452 just-gcc: just-libiberty just-bison force
453 if [ -d $(unsubdir)/gcc ] ; then \
454 (cd $(unsubdir)/gcc$(subdir); \
456 "against=$(against)" \
458 "AR_FLAGS=$(AR_FLAGS)" \
461 "LOADLIBES=$(LOADLIBES)" \
462 "LDFLAGS=$(LDFLAGS)" \
464 "MAKEINFO=$(MAKEINFO)" \
471 if [ -d $(unsubdir)/gcc ] ; then \
472 (cd $(unsubdir)/gcc$(subdir); \
474 "against=$(against)" \
476 "AR_FLAGS=$(AR_FLAGS)" \
479 "LOADLIBES=$(LOADLIBES)" \
480 "LDFLAGS=$(LDFLAGS)" \
482 "MAKEINFO=$(MAKEINFO)" \
489 if [ -d $(unsubdir)/gcc ] ; then \
490 (cd $(unsubdir)/gcc$(subdir); \
492 "against=$(against)" \
494 "AR_FLAGS=$(AR_FLAGS)" \
497 "LOADLIBES=$(LOADLIBES)" \
498 "LDFLAGS=$(LDFLAGS)" \
500 "MAKEINFO=$(MAKEINFO)" \
507 .PHONY: all-readline just-readline
508 all-readline: just-readline
510 if [ -d $(unsubdir)/readline ] ; then \
511 (cd $(unsubdir)/readline$(subdir); \
513 "against=$(against)" \
515 "AR_FLAGS=$(AR_FLAGS)" \
518 "LOADLIBES=$(LOADLIBES)" \
519 "LDFLAGS=$(LDFLAGS)" \
521 "MAKEINFO=$(MAKEINFO)" \
527 clean-readline: force
528 if [ -d $(unsubdir)/readline ] ; then \
529 (cd $(unsubdir)/readline$(subdir); \
531 "against=$(against)" \
533 "AR_FLAGS=$(AR_FLAGS)" \
536 "LOADLIBES=$(LOADLIBES)" \
537 "LDFLAGS=$(LDFLAGS)" \
539 "MAKEINFO=$(MAKEINFO)" \
545 install-readline: force
546 if [ -d $(unsubdir)/readline ] ; then \
547 (cd $(unsubdir)/readline$(subdir); \
549 "against=$(against)" \
551 "AR_FLAGS=$(AR_FLAGS)" \
554 "LOADLIBES=$(LOADLIBES)" \
555 "LDFLAGS=$(LDFLAGS)" \
557 "MAKEINFO=$(MAKEINFO)" \
564 .PHONY: all-glob just-glob
567 if [ -d $(unsubdir)/glob ] ; then \
568 (cd $(unsubdir)/glob$(subdir); \
570 "against=$(against)" \
572 "AR_FLAGS=$(AR_FLAGS)" \
575 "LOADLIBES=$(LOADLIBES)" \
576 "LDFLAGS=$(LDFLAGS)" \
578 "MAKEINFO=$(MAKEINFO)" \
585 if [ -d $(unsubdir)/glob ] ; then \
586 (cd $(unsubdir)/glob$(subdir); \
588 "against=$(against)" \
590 "AR_FLAGS=$(AR_FLAGS)" \
593 "LOADLIBES=$(LOADLIBES)" \
594 "LDFLAGS=$(LDFLAGS)" \
596 "MAKEINFO=$(MAKEINFO)" \
603 if [ -d $(unsubdir)/glob ] ; then \
604 (cd $(unsubdir)/glob$(subdir); \
606 "against=$(against)" \
608 "AR_FLAGS=$(AR_FLAGS)" \
611 "LOADLIBES=$(LOADLIBES)" \
612 "LDFLAGS=$(LDFLAGS)" \
614 "MAKEINFO=$(MAKEINFO)" \
621 .PHONY: all-gas just-gas
623 just-gas: just-libiberty just-bfd force
624 if [ -d $(unsubdir)/gas ] ; then \
625 (cd $(unsubdir)/gas$(subdir); \
627 "against=$(against)" \
629 "AR_FLAGS=$(AR_FLAGS)" \
632 "LOADLIBES=$(LOADLIBES)" \
633 "LDFLAGS=$(LDFLAGS)" \
635 "MAKEINFO=$(MAKEINFO)" \
642 if [ -d $(unsubdir)/gas ] ; then \
643 (cd $(unsubdir)/gas$(subdir); \
645 "against=$(against)" \
647 "AR_FLAGS=$(AR_FLAGS)" \
650 "LOADLIBES=$(LOADLIBES)" \
651 "LDFLAGS=$(LDFLAGS)" \
653 "MAKEINFO=$(MAKEINFO)" \
660 if [ -d $(unsubdir)/gas ] ; then \
661 (cd $(unsubdir)/gas$(subdir); \
663 "against=$(against)" \
665 "AR_FLAGS=$(AR_FLAGS)" \
668 "LOADLIBES=$(LOADLIBES)" \
669 "LDFLAGS=$(LDFLAGS)" \
671 "MAKEINFO=$(MAKEINFO)" \
678 .PHONY: all-ld just-ld
680 just-ld: just-libiberty just-bfd just-bison force
681 if [ -d $(unsubdir)/ld ] ; then \
682 (cd $(unsubdir)/ld$(subdir); \
684 "against=$(against)" \
686 "AR_FLAGS=$(AR_FLAGS)" \
689 "LOADLIBES=$(LOADLIBES)" \
690 "LDFLAGS=$(LDFLAGS)" \
692 "MAKEINFO=$(MAKEINFO)" \
699 if [ -d $(unsubdir)/ld ] ; then \
700 (cd $(unsubdir)/ld$(subdir); \
702 "against=$(against)" \
704 "AR_FLAGS=$(AR_FLAGS)" \
707 "LOADLIBES=$(LOADLIBES)" \
708 "LDFLAGS=$(LDFLAGS)" \
710 "MAKEINFO=$(MAKEINFO)" \
717 if [ -d $(unsubdir)/ld ] ; then \
718 (cd $(unsubdir)/ld$(subdir); \
720 "against=$(against)" \
722 "AR_FLAGS=$(AR_FLAGS)" \
725 "LOADLIBES=$(LOADLIBES)" \
726 "LDFLAGS=$(LDFLAGS)" \
728 "MAKEINFO=$(MAKEINFO)" \
735 .PHONY: all-gnulib just-gnulib
736 all-gnulib: just-gnulib
737 just-gnulib: all-gcc all-gas all-binutils force
738 if [ -d $(unsubdir)/gnulib ] ; then \
739 (cd $(unsubdir)/gnulib$(subdir); \
741 "against=$(against)" \
743 "AR_FLAGS=$(AR_FLAGS)" \
746 "LOADLIBES=$(LOADLIBES)" \
747 "LDFLAGS=$(LDFLAGS)" \
749 "MAKEINFO=$(MAKEINFO)" \
756 if [ -d $(unsubdir)/gnulib ] ; then \
757 (cd $(unsubdir)/gnulib$(subdir); \
759 "against=$(against)" \
761 "AR_FLAGS=$(AR_FLAGS)" \
764 "LOADLIBES=$(LOADLIBES)" \
765 "LDFLAGS=$(LDFLAGS)" \
767 "MAKEINFO=$(MAKEINFO)" \
773 install-gnulib: force
774 if [ -d $(unsubdir)/gnulib ] ; then \
775 (cd $(unsubdir)/gnulib$(subdir); \
777 "against=$(against)" \
779 "AR_FLAGS=$(AR_FLAGS)" \
782 "LOADLIBES=$(LOADLIBES)" \
783 "LDFLAGS=$(LDFLAGS)" \
785 "MAKEINFO=$(MAKEINFO)" \
792 .PHONY: all-gdb just-gdb
794 just-gdb: just-bfd just-libiberty just-readline just-glob just-bison force
795 if [ -d $(unsubdir)/gdb ] ; then \
796 (cd $(unsubdir)/gdb$(subdir); \
798 "against=$(against)" \
800 "AR_FLAGS=$(AR_FLAGS)" \
803 "LOADLIBES=$(LOADLIBES)" \
804 "LDFLAGS=$(LDFLAGS)" \
806 "MAKEINFO=$(MAKEINFO)" \
813 if [ -d $(unsubdir)/gdb ] ; then \
814 (cd $(unsubdir)/gdb$(subdir); \
816 "against=$(against)" \
818 "AR_FLAGS=$(AR_FLAGS)" \
821 "LOADLIBES=$(LOADLIBES)" \
822 "LDFLAGS=$(LDFLAGS)" \
824 "MAKEINFO=$(MAKEINFO)" \
831 if [ -d $(unsubdir)/gdb ] ; then \
832 (cd $(unsubdir)/gdb$(subdir); \
834 "against=$(against)" \
836 "AR_FLAGS=$(AR_FLAGS)" \
839 "LOADLIBES=$(LOADLIBES)" \
840 "LDFLAGS=$(LDFLAGS)" \
842 "MAKEINFO=$(MAKEINFO)" \
849 .PHONY: all-make just-make
851 just-make: all-libiberty force
852 if [ -d $(unsubdir)/make ] ; then \
853 (cd $(unsubdir)/make$(subdir); \
855 "against=$(against)" \
857 "AR_FLAGS=$(AR_FLAGS)" \
860 "LOADLIBES=$(LOADLIBES)" \
861 "LDFLAGS=$(LDFLAGS)" \
863 "MAKEINFO=$(MAKEINFO)" \
870 if [ -d $(unsubdir)/make ] ; then \
871 (cd $(unsubdir)/make$(subdir); \
873 "against=$(against)" \
875 "AR_FLAGS=$(AR_FLAGS)" \
878 "LOADLIBES=$(LOADLIBES)" \
879 "LDFLAGS=$(LDFLAGS)" \
881 "MAKEINFO=$(MAKEINFO)" \
888 if [ -d $(unsubdir)/make ] ; then \
889 (cd $(unsubdir)/make$(subdir); \
891 "against=$(against)" \
893 "AR_FLAGS=$(AR_FLAGS)" \
896 "LOADLIBES=$(LOADLIBES)" \
897 "LDFLAGS=$(LDFLAGS)" \
899 "MAKEINFO=$(MAKEINFO)" \
906 .PHONY: all-diff just-diff
909 if [ -d $(unsubdir)/diff ] ; then \
910 (cd $(unsubdir)/diff$(subdir); \
912 "against=$(against)" \
914 "AR_FLAGS=$(AR_FLAGS)" \
917 "LOADLIBES=$(LOADLIBES)" \
918 "LDFLAGS=$(LDFLAGS)" \
920 "MAKEINFO=$(MAKEINFO)" \
927 if [ -d $(unsubdir)/diff ] ; then \
928 (cd $(unsubdir)/diff$(subdir); \
930 "against=$(against)" \
932 "AR_FLAGS=$(AR_FLAGS)" \
935 "LOADLIBES=$(LOADLIBES)" \
936 "LDFLAGS=$(LDFLAGS)" \
938 "MAKEINFO=$(MAKEINFO)" \
945 if [ -d $(unsubdir)/diff ] ; then \
946 (cd $(unsubdir)/diff/$(subdir); \
948 "against=$(against)" \
950 "AR_FLAGS=$(AR_FLAGS)" \
953 "LOADLIBES=$(LOADLIBES)" \
954 "LDFLAGS=$(LDFLAGS)" \
956 "MAKEINFO=$(MAKEINFO)" \
963 .PHONY: all-grep just-grep
966 if [ -d $(unsubdir)/grep ] ; then \
967 (cd $(unsubdir)/grep$(subdir); \
969 "against=$(against)" \
971 "AR_FLAGS=$(AR_FLAGS)" \
974 "LOADLIBES=$(LOADLIBES)" \
975 "LDFLAGS=$(LDFLAGS)" \
977 "MAKEINFO=$(MAKEINFO)" \
984 if [ -d $(unsubdir)/grep ] ; then \
985 (cd $(unsubdir)/grep$(subdir); \
987 "against=$(against)" \
989 "AR_FLAGS=$(AR_FLAGS)" \
992 "LOADLIBES=$(LOADLIBES)" \
993 "LDFLAGS=$(LDFLAGS)" \
995 "MAKEINFO=$(MAKEINFO)" \
1002 if [ -d $(unsubdir)/grep ] ; then \
1003 (cd $(unsubdir)/grep$(subdir); \
1005 "against=$(against)" \
1007 "AR_FLAGS=$(AR_FLAGS)" \
1009 "RANLIB=$(RANLIB)" \
1010 "LOADLIBES=$(LOADLIBES)" \
1011 "LDFLAGS=$(LDFLAGS)" \
1013 "MAKEINFO=$(MAKEINFO)" \
1020 .PHONY: all-rcs just-rcs
1022 just-rcs: just-diff just-grep force
1023 if [ -d $(unsubdir)/rcs ] ; then \
1024 (cd $(unsubdir)/rcs$(subdir); \
1026 "against=$(against)" \
1028 "AR_FLAGS=$(AR_FLAGS)" \
1030 "RANLIB=$(RANLIB)" \
1031 "LOADLIBES=$(LOADLIBES)" \
1032 "LDFLAGS=$(LDFLAGS)" \
1034 "MAKEINFO=$(MAKEINFO)" \
1041 if [ -d $(unsubdir)/rcs ] ; then \
1042 (cd $(unsubdir)/rcs$(subdir); \
1044 "against=$(against)" \
1046 "AR_FLAGS=$(AR_FLAGS)" \
1048 "RANLIB=$(RANLIB)" \
1049 "LOADLIBES=$(LOADLIBES)" \
1050 "LDFLAGS=$(LDFLAGS)" \
1052 "MAKEINFO=$(MAKEINFO)" \
1058 install-rcs: install-grep install-diff force
1059 if [ -d $(unsubdir)/rcs ] ; then \
1060 (cd $(unsubdir)/rcs$(subdir); \
1062 "against=$(against)" \
1064 "AR_FLAGS=$(AR_FLAGS)" \
1066 "RANLIB=$(RANLIB)" \
1067 "LOADLIBES=$(LOADLIBES)" \
1068 "LDFLAGS=$(LDFLAGS)" \
1070 "MAKEINFO=$(MAKEINFO)" \
1077 .PHONY: all-gdbm just-gdbm
1080 if [ -d $(unsubdir)/gdbm ] ; then \
1081 (cd $(unsubdir)/gdbm$(subdir); \
1083 "against=$(against)" \
1085 "AR_FLAGS=$(AR_FLAGS)" \
1087 "RANLIB=$(RANLIB)" \
1088 "LOADLIBES=$(LOADLIBES)" \
1089 "LDFLAGS=$(LDFLAGS)" \
1091 "MAKEINFO=$(MAKEINFO)" \
1098 if [ -d $(unsubdir)/gdbm ] ; then \
1099 (cd $(unsubdir)/gdbm$(subdir); \
1101 "against=$(against)" \
1103 "AR_FLAGS=$(AR_FLAGS)" \
1105 "RANLIB=$(RANLIB)" \
1106 "LOADLIBES=$(LOADLIBES)" \
1107 "LDFLAGS=$(LDFLAGS)" \
1109 "MAKEINFO=$(MAKEINFO)" \
1116 if [ -d $(unsubdir)/gdbm ] ; then \
1117 (cd $(unsubdir)/gdbm$(subdir); \
1119 "against=$(against)" \
1121 "AR_FLAGS=$(AR_FLAGS)" \
1123 "RANLIB=$(RANLIB)" \
1124 "LOADLIBES=$(LOADLIBES)" \
1125 "LDFLAGS=$(LDFLAGS)" \
1127 "MAKEINFO=$(MAKEINFO)" \
1134 .PHONY: all-cvs just-cvs
1135 all-cvs: just-cvs just-rcs just-grep just-diff
1136 just-cvs: just-gdbm force
1137 if [ -d $(unsubdir)/cvs ] ; then \
1138 (cd $(unsubdir)/cvs$(subdir); \
1140 "against=$(against)" \
1142 "AR_FLAGS=$(AR_FLAGS)" \
1144 "RANLIB=$(RANLIB)" \
1145 "LOADLIBES=$(LOADLIBES)" \
1146 "LDFLAGS=$(LDFLAGS)" \
1148 "MAKEINFO=$(MAKEINFO)" \
1155 if [ -d $(unsubdir)/cvs ] ; then \
1156 (cd $(unsubdir)/cvs$(subdir); \
1158 "against=$(against)" \
1160 "AR_FLAGS=$(AR_FLAGS)" \
1162 "RANLIB=$(RANLIB)" \
1163 "LOADLIBES=$(LOADLIBES)" \
1164 "LDFLAGS=$(LDFLAGS)" \
1166 "MAKEINFO=$(MAKEINFO)" \
1172 install-cvs: install-rcs install-gdbm force
1173 if [ -d $(unsubdir)/cvs ] ; then \
1174 (cd $(unsubdir)/cvs$(subdir); \
1176 "against=$(against)" \
1178 "AR_FLAGS=$(AR_FLAGS)" \
1180 "RANLIB=$(RANLIB)" \
1181 "LOADLIBES=$(LOADLIBES)" \
1182 "LDFLAGS=$(LDFLAGS)" \
1184 "MAKEINFO=$(MAKEINFO)" \
1191 .PHONY: all-emacs just-emacs
1192 all-emacs: just-emacs
1194 if [ -d $(unsubdir)/emacs ] ; then \
1195 (cd $(unsubdir)/emacs$(subdir); \
1197 "against=$(against)" \
1199 "AR_FLAGS=$(AR_FLAGS)" \
1201 "RANLIB=$(RANLIB)" \
1202 "LOADLIBES=$(LOADLIBES)" \
1203 "LDFLAGS=$(LDFLAGS)" \
1205 "MAKEINFO=$(MAKEINFO)" \
1212 if [ -d $(unsubdir)/emacs ] ; then \
1213 (cd $(unsubdir)/emacs$(subdir); \
1215 "against=$(against)" \
1217 "AR_FLAGS=$(AR_FLAGS)" \
1219 "RANLIB=$(RANLIB)" \
1220 "LOADLIBES=$(LOADLIBES)" \
1221 "LDFLAGS=$(LDFLAGS)" \
1223 "MAKEINFO=$(MAKEINFO)" \
1229 install-emacs: install-rcs install-gdbm force
1230 if [ -d $(unsubdir)/emacs ] ; then \
1231 (cd $(unsubdir)/emacs$(subdir); \
1233 "against=$(against)" \
1235 "AR_FLAGS=$(AR_FLAGS)" \
1237 "RANLIB=$(RANLIB)" \
1238 "LOADLIBES=$(LOADLIBES)" \
1239 "LDFLAGS=$(LDFLAGS)" \
1241 "MAKEINFO=$(MAKEINFO)" \
1248 .PHONY: all-ispell just-ispell
1249 all-ispell: just-ispell
1250 just-ispell: all-emacs force
1251 if [ -d $(unsubdir)/ispell ] ; then \
1252 (cd $(unsubdir)/ispell$(subdir); \
1254 "against=$(against)" \
1256 "AR_FLAGS=$(AR_FLAGS)" \
1258 "RANLIB=$(RANLIB)" \
1259 "LOADLIBES=$(LOADLIBES)" \
1260 "LDFLAGS=$(LDFLAGS)" \
1262 "MAKEINFO=$(MAKEINFO)" \
1269 if [ -d $(unsubdir)/ispell ] ; then \
1270 (cd $(unsubdir)/ispell$(subdir); \
1272 "against=$(against)" \
1274 "AR_FLAGS=$(AR_FLAGS)" \
1276 "RANLIB=$(RANLIB)" \
1277 "LOADLIBES=$(LOADLIBES)" \
1278 "LDFLAGS=$(LDFLAGS)" \
1280 "MAKEINFO=$(MAKEINFO)" \
1286 install-ispell: install-rcs install-gdbm force
1287 if [ -d $(unsubdir)/ispell ] ; then \
1288 (cd $(unsubdir)/ispell$(subdir); \
1290 "against=$(against)" \
1292 "AR_FLAGS=$(AR_FLAGS)" \
1294 "RANLIB=$(RANLIB)" \
1295 "LOADLIBES=$(LOADLIBES)" \
1296 "LDFLAGS=$(LDFLAGS)" \
1298 "MAKEINFO=$(MAKEINFO)" \
1304 ### other supporting targets
1305 # this is a bad hack.
1306 all.xclib: all.normal
1307 if [ -d clib ] ; then \
1308 (cd clib ; $(MAKE)) ; \
1312 for i in $(DODIRS); do \
1313 if [ -f $(unsubdir)/$$i/localenv ] ; then \
1314 if (cd $(unsubdir)/$$i$(subdir); \
1316 "against=$(against)" \
1318 "MAKEINFO=$(MAKEINFO)" \
1319 $(DO)) ; then true ; \
1320 else exit 1 ; fi ; \
1321 else if [ -d $(unsubdir)/$$i ] ; then \
1322 if (cd $(unsubdir)/$$i$(subdir); \
1324 "against=$(against)" \
1326 "AR_FLAGS=$(AR_FLAGS)" \
1328 "RANLIB=$(RANLIB)" \
1329 "LOADLIBES=$(LOADLIBES)" \
1330 "LDFLAGS=$(LDFLAGS)" \
1332 "MAKEINFO=$(MAKEINFO)" \
1333 $(DO)) ; then true ; \
1334 else exit 1 ; fi ; \
1342 $(MAKE) pass "stagepass=stage1"
1344 $(MAKE) pass "stagepass=stage2"
1348 $(MAKE) pass "stagepass=stage1"
1350 $(MAKE) pass "stagepass=stage2"
1354 $(MAKE) pass "stagepass=stage2"
1358 cp $(srcdir)/gcc/gstdarg.h $(unsubdir)/gas$(subdir)/stdarg.h
1359 $(MAKE) subdir_do "DO=all info" "DODIRS=$(SUBDIRS)" \
1360 "CC=`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/gcc \
1361 -O $(GCCVERBOSE) -I`pwd`/$(unsubdir)/gcc$(subdir)/include \
1362 -B`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/ \
1363 -B`pwd`/$(unsubdir)/gas$(subdir)/$(stagepass)/ \
1364 -B`pwd`/$(unsubdir)/ld$(subdir)/$(stagepass)/" \
1365 "AR=`pwd`/$(unsubdir)/binutils$(subdir)/$(stagepass)/ar" \
1366 "LD=`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/gcc $(GCCVERBOSE)" \
1367 "RANLIB=`pwd`/$(unsubdir)/binutils$(subdir)/$(stagepass)/ranlib" \
1368 "LOADLIBES=`pwd`/$(unsubdir)/gnulib$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \
1369 "LDFLAGS=-nostdlib /lib/crt0.o \
1370 -L`pwd`/$(unsubdir)/gnulib$(subdir)/$(stagepass)/ \
1371 -B`pwd`/$(unsubdir)/ld$(subdir)/$(stagepass)/"
1375 $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
1378 $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
1381 $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
1384 $(MAKE) subdir_do DO=stage4 "DODIRS=$(SUBDIRS)"
1388 comparison:; $(MAKE) subdir_do DO=comparison against=$(against) "DODIRS=$(SUBDIRS)"
1390 de-stage1:; $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
1391 de-stage2:; $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
1392 de-stage3:; $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
1393 de-stage4:; $(MAKE) subdir_do DO=de-stage4 "DODIRS=$(SUBDIRS)"
1395 # The "else true" stuff is for Ultrix; the shell returns the exit code
1396 # of the "if" command, if no commands are run in the "then" or "else" part,
1397 # causing Make to quit.
1418 for i in $(MAKEDIRS) ; do \
1419 echo Making $$i... ; \
1420 if [ -d $$i ] ; then true ; else mkdir $$i || exit 1 ; fi ; \
1427 install-info-dirs: force
1428 for i in $(MAKEINFODIRS) ; do \
1429 echo Making $$i... ; \
1430 if [ -d $$i ] ; then true ; else mkdir $$i ; fi ; \
1434 $(srcdir)/texinfo/gen-info-dir $(infodir) > dir.info.new
1435 mv -f dir.info.new dir.info
1444 @for i in $(SUBDIRS); \
1448 wd=`basename $$pwd`; \
1449 for j in `$(MAKE) ls`; \
1457 # with the gnu make, this is done automatically.
1459 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
1460 $(SHELL) ./config.status
1463 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1465 DEVO_SUPPORT= README DOC.configure Makefile.in configure configure.in \
1467 GDB_SUPPORT_DIRS= bfd include libiberty readline glob
1468 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
1470 setup-dirs: force_update
1473 ./configure -rm sun4
1474 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1476 bfd.ilrt.tar.Z: setup-dirs
1477 rm -f bfd.ilrt.tar.Z
1478 tar cf - $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) \
1479 | compress -v >bfd.ilrt.tar.Z
1481 gdb.tar.Z: setup-dirs
1482 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1483 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1485 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1486 rm -rf proto-toplev; mkdir proto-toplev
1487 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1488 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1491 # Take out texinfo from configurable dirs
1492 rm proto-toplev/configure.in
1493 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
1494 # Take out glob from buildable dirs
1495 rm proto-toplev/Makefile.in
1496 sed '/^SUBDIRS =/s/glob //' <Makefile.in >proto-toplev/Makefile.in
1497 mkdir proto-toplev/texinfo
1498 mkdir proto-toplev/texinfo/fsf
1499 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
1500 chmod og=u `find proto-toplev -print`
1501 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1502 echo "==> Making gdb-$$VER.tar.Z"; \
1503 ln -s proto-toplev gdb-$$VER; \
1504 tar cfh - gdb-$$VER \
1505 | compress -v >gdb-$$VER.tar.Z)
1511 # end of Makefile.in