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
78 info: configure.
info doc.
info
79 $(MAKE
) subdir_do DO
=info "DODIRS=$(SUBDIRS)"
81 configure.
info: configure.texi
82 $(MAKEINFO
) -o configure.
info $(srcdir)/configure.texi
85 $(MAKEINFO
) -o doc.
info $(srcdir)/doc.texi
87 install-info
: install-info-dirs
force
88 $(MAKE
) subdir_do DO
=install-info
"DODIRS=$(SUBDIRS)"
89 $(MAKE
) dir.
info install-dir.
info
92 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
95 all.normal
: all-texinfo all-bison all-byacc all-ld all-gnulib all-gdb all-make \
96 all-cvs all-emacs all-ispell
97 all.cross
: all-bison all-ld all-gnulib all-gdb
98 # $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
100 clean: clean-libiberty clean-texinfo clean-bfd clean-binutils clean-bison \
101 clean-byacc clean-ld clean-gas clean-gcc clean-gnulib clean-readline \
102 clean-glob clean-gdb clean-make clean-diff clean-grep clean-rcs \
103 clean-gdbm clean-cvs clean-emacs clean-ispell
104 rm -rf
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
106 install: $(INSTALL_TARGET
)
107 $(INSTALL_DATA
) configure.man
$(man1dir)/configure
.1
109 install.
all: install-dirs install-libiberty install-texinfo install-binutils install-bison \
110 install-byacc install-ld install-gas install-gcc install-gnulib \
111 install-readline install-glob install-gdb install-make install-cvs \
112 install-emacs install-ispell
113 install.cross
: install-dirs install-libiberty install-binutils install-bison \
114 install-byacc install-ld install-gas install-gnulib \
115 install-readline install-glob install-gdb
118 .PHONY
: all-libiberty just-libiberty
119 all-libiberty
: just-libiberty
120 just-libiberty
: force
121 if
[ -d
$(unsubdir
)/libiberty
] ; then \
122 (cd
$(unsubdir
)/libiberty
$(subdir
); \
124 "against=$(against)" \
126 "AR_FLAGS=$(AR_FLAGS)" \
129 "LOADLIBES=$(LOADLIBES)" \
130 "LDFLAGS=$(LDFLAGS)" \
132 "MAKEINFO=$(MAKEINFO)" \
138 clean-libiberty
: force
139 if
[ -d
$(unsubdir
)/libiberty
] ; then \
140 (cd
$(unsubdir
)/libiberty
$(subdir
); \
142 "against=$(against)" \
144 "AR_FLAGS=$(AR_FLAGS)" \
147 "LOADLIBES=$(LOADLIBES)" \
148 "LDFLAGS=$(LDFLAGS)" \
150 "MAKEINFO=$(MAKEINFO)" \
156 install-libiberty
: force
157 if
[ -d
$(unsubdir
)/libiberty
] ; then \
158 (cd
$(unsubdir
)/libiberty
$(subdir
); \
160 "against=$(against)" \
162 "AR_FLAGS=$(AR_FLAGS)" \
165 "LOADLIBES=$(LOADLIBES)" \
166 "LDFLAGS=$(LDFLAGS)" \
168 "MAKEINFO=$(MAKEINFO)" \
175 .PHONY
: all-texinfo just-texinfo
176 all-texinfo
: just-texinfo
177 just-texinfo
: just-libiberty
force
178 if
[ -d
$(unsubdir
)/texinfo
] ; then \
179 (cd
$(unsubdir
)/texinfo
$(subdir
); \
181 "against=$(against)" \
183 "AR_FLAGS=$(AR_FLAGS)" \
186 "LOADLIBES=$(LOADLIBES)" \
187 "LDFLAGS=$(LDFLAGS)" \
189 "MAKEINFO=$(MAKEINFO)" \
196 if
[ -d
$(unsubdir
)/texinfo
] ; then \
197 (cd
$(unsubdir
)/texinfo
$(subdir
); \
199 "against=$(against)" \
201 "AR_FLAGS=$(AR_FLAGS)" \
204 "LOADLIBES=$(LOADLIBES)" \
205 "LDFLAGS=$(LDFLAGS)" \
207 "MAKEINFO=$(MAKEINFO)" \
213 install-texinfo
: force
214 if
[ -d
$(unsubdir
)/texinfo
] ; then \
215 (cd
$(unsubdir
)/texinfo
$(subdir
); \
217 "against=$(against)" \
219 "AR_FLAGS=$(AR_FLAGS)" \
222 "LOADLIBES=$(LOADLIBES)" \
223 "LDFLAGS=$(LDFLAGS)" \
225 "MAKEINFO=$(MAKEINFO)" \
232 .PHONY
: all-bfd just-bfd
235 if
[ -d
$(unsubdir
)/bfd
] ; then \
236 (cd
$(unsubdir
)/bfd
$(subdir
); \
238 "against=$(against)" \
240 "AR_FLAGS=$(AR_FLAGS)" \
243 "LOADLIBES=$(LOADLIBES)" \
244 "LDFLAGS=$(LDFLAGS)" \
246 "MAKEINFO=$(MAKEINFO)" \
253 if
[ -d
$(unsubdir
)/bfd
] ; then \
254 (cd
$(unsubdir
)/bfd
$(subdir
); \
256 "against=$(against)" \
258 "AR_FLAGS=$(AR_FLAGS)" \
261 "LOADLIBES=$(LOADLIBES)" \
262 "LDFLAGS=$(LDFLAGS)" \
264 "MAKEINFO=$(MAKEINFO)" \
271 if
[ -d
$(unsubdir
)/bfd
] ; then \
272 (cd
$(unsubdir
)/bfd
$(subdir
); \
274 "against=$(against)" \
276 "AR_FLAGS=$(AR_FLAGS)" \
279 "LOADLIBES=$(LOADLIBES)" \
280 "LDFLAGS=$(LDFLAGS)" \
282 "MAKEINFO=$(MAKEINFO)" \
289 .PHONY
: all-binutils just-binutils
290 all-binutils
: just-binutils
291 just-binutils
: just-libiberty just-bfd
force
292 if
[ -d
$(unsubdir
)/binutils
] ; then \
293 (cd
$(unsubdir
)/binutils
$(subdir
); \
295 "against=$(against)" \
297 "AR_FLAGS=$(AR_FLAGS)" \
300 "LOADLIBES=$(LOADLIBES)" \
301 "LDFLAGS=$(LDFLAGS)" \
303 "MAKEINFO=$(MAKEINFO)" \
309 clean-binutils
: force
310 if
[ -d
$(unsubdir
)/binutils
] ; then \
311 (cd
$(unsubdir
)/binutils
$(subdir
); \
313 "against=$(against)" \
315 "AR_FLAGS=$(AR_FLAGS)" \
318 "LOADLIBES=$(LOADLIBES)" \
319 "LDFLAGS=$(LDFLAGS)" \
321 "MAKEINFO=$(MAKEINFO)" \
327 install-binutils
: force
328 if
[ -d
$(unsubdir
)/binutils
] ; then \
329 (cd
$(unsubdir
)/binutils
$(subdir
); \
331 "against=$(against)" \
333 "AR_FLAGS=$(AR_FLAGS)" \
336 "LOADLIBES=$(LOADLIBES)" \
337 "LDFLAGS=$(LDFLAGS)" \
339 "MAKEINFO=$(MAKEINFO)" \
346 .PHONY
: all-byacc just-byacc
347 all-byacc
: just-byacc
349 if
[ -d
$(unsubdir
)/byacc
] ; then \
350 (cd
$(unsubdir
)/byacc
$(subdir
); \
352 "against=$(against)" \
354 "AR_FLAGS=$(AR_FLAGS)" \
357 "LOADLIBES=$(LOADLIBES)" \
358 "LDFLAGS=$(LDFLAGS)" \
360 "MAKEINFO=$(MAKEINFO)" \
367 if
[ -d
$(unsubdir
)/byacc
] ; then \
368 (cd
$(unsubdir
)/byacc
$(subdir
); \
370 "against=$(against)" \
372 "AR_FLAGS=$(AR_FLAGS)" \
375 "LOADLIBES=$(LOADLIBES)" \
376 "LDFLAGS=$(LDFLAGS)" \
378 "MAKEINFO=$(MAKEINFO)" \
385 if
[ -d
$(unsubdir
)/byacc
] ; then \
386 (cd
$(unsubdir
)/byacc
$(subdir
); \
388 "against=$(against)" \
390 "AR_FLAGS=$(AR_FLAGS)" \
393 "LOADLIBES=$(LOADLIBES)" \
394 "LDFLAGS=$(LDFLAGS)" \
396 "MAKEINFO=$(MAKEINFO)" \
403 .PHONY
: all-bison just-bison
404 all-bison
: just-bison
405 just-bison
: just-libiberty
force
406 if
[ -d
$(unsubdir
)/bison
] ; then \
407 (cd
$(unsubdir
)/bison
$(subdir
); \
409 "against=$(against)" \
411 "AR_FLAGS=$(AR_FLAGS)" \
414 "LOADLIBES=$(LOADLIBES)" \
415 "LDFLAGS=$(LDFLAGS)" \
417 "MAKEINFO=$(MAKEINFO)" \
424 if
[ -d
$(unsubdir
)/bison
] ; then \
425 (cd
$(unsubdir
)/bison
$(subdir
); \
427 "against=$(against)" \
429 "AR_FLAGS=$(AR_FLAGS)" \
432 "LOADLIBES=$(LOADLIBES)" \
433 "LDFLAGS=$(LDFLAGS)" \
435 "MAKEINFO=$(MAKEINFO)" \
442 if
[ -d
$(unsubdir
)/bison
] ; then \
443 (cd
$(unsubdir
)/bison
$(subdir
); \
445 "against=$(against)" \
447 "AR_FLAGS=$(AR_FLAGS)" \
450 "LOADLIBES=$(LOADLIBES)" \
451 "LDFLAGS=$(LDFLAGS)" \
453 "MAKEINFO=$(MAKEINFO)" \
460 .PHONY
: all-gcc just-gcc
462 just-gcc
: just-libiberty just-bison
force
463 if
[ -d
$(unsubdir
)/gcc
] ; then \
464 (cd
$(unsubdir
)/gcc
$(subdir
); \
466 "against=$(against)" \
468 "AR_FLAGS=$(AR_FLAGS)" \
471 "LOADLIBES=$(LOADLIBES)" \
472 "LDFLAGS=$(LDFLAGS)" \
474 "MAKEINFO=$(MAKEINFO)" \
481 if
[ -d
$(unsubdir
)/gcc
] ; then \
482 (cd
$(unsubdir
)/gcc
$(subdir
); \
484 "against=$(against)" \
486 "AR_FLAGS=$(AR_FLAGS)" \
489 "LOADLIBES=$(LOADLIBES)" \
490 "LDFLAGS=$(LDFLAGS)" \
492 "MAKEINFO=$(MAKEINFO)" \
499 if
[ -d
$(unsubdir
)/gcc
] ; then \
500 (cd
$(unsubdir
)/gcc
$(subdir
); \
502 "against=$(against)" \
504 "AR_FLAGS=$(AR_FLAGS)" \
507 "LOADLIBES=$(LOADLIBES)" \
508 "LDFLAGS=$(LDFLAGS)" \
510 "MAKEINFO=$(MAKEINFO)" \
517 .PHONY
: all-readline just-readline
518 all-readline
: just-readline
520 if
[ -d
$(unsubdir
)/readline
] ; then \
521 (cd
$(unsubdir
)/readline
$(subdir
); \
523 "against=$(against)" \
525 "AR_FLAGS=$(AR_FLAGS)" \
528 "LOADLIBES=$(LOADLIBES)" \
529 "LDFLAGS=$(LDFLAGS)" \
531 "MAKEINFO=$(MAKEINFO)" \
537 clean-readline
: force
538 if
[ -d
$(unsubdir
)/readline
] ; then \
539 (cd
$(unsubdir
)/readline
$(subdir
); \
541 "against=$(against)" \
543 "AR_FLAGS=$(AR_FLAGS)" \
546 "LOADLIBES=$(LOADLIBES)" \
547 "LDFLAGS=$(LDFLAGS)" \
549 "MAKEINFO=$(MAKEINFO)" \
555 install-readline
: force
556 if
[ -d
$(unsubdir
)/readline
] ; then \
557 (cd
$(unsubdir
)/readline
$(subdir
); \
559 "against=$(against)" \
561 "AR_FLAGS=$(AR_FLAGS)" \
564 "LOADLIBES=$(LOADLIBES)" \
565 "LDFLAGS=$(LDFLAGS)" \
567 "MAKEINFO=$(MAKEINFO)" \
574 .PHONY
: all-glob just-glob
577 if
[ -d
$(unsubdir
)/glob
] ; then \
578 (cd
$(unsubdir
)/glob
$(subdir
); \
580 "against=$(against)" \
582 "AR_FLAGS=$(AR_FLAGS)" \
585 "LOADLIBES=$(LOADLIBES)" \
586 "LDFLAGS=$(LDFLAGS)" \
588 "MAKEINFO=$(MAKEINFO)" \
595 if
[ -d
$(unsubdir
)/glob
] ; then \
596 (cd
$(unsubdir
)/glob
$(subdir
); \
598 "against=$(against)" \
600 "AR_FLAGS=$(AR_FLAGS)" \
603 "LOADLIBES=$(LOADLIBES)" \
604 "LDFLAGS=$(LDFLAGS)" \
606 "MAKEINFO=$(MAKEINFO)" \
613 if
[ -d
$(unsubdir
)/glob
] ; then \
614 (cd
$(unsubdir
)/glob
$(subdir
); \
616 "against=$(against)" \
618 "AR_FLAGS=$(AR_FLAGS)" \
621 "LOADLIBES=$(LOADLIBES)" \
622 "LDFLAGS=$(LDFLAGS)" \
624 "MAKEINFO=$(MAKEINFO)" \
631 .PHONY
: all-gas just-gas
633 just-gas
: just-libiberty just-bfd
force
634 if
[ -d
$(unsubdir
)/gas
] ; then \
635 (cd
$(unsubdir
)/gas
$(subdir
); \
637 "against=$(against)" \
639 "AR_FLAGS=$(AR_FLAGS)" \
642 "LOADLIBES=$(LOADLIBES)" \
643 "LDFLAGS=$(LDFLAGS)" \
645 "MAKEINFO=$(MAKEINFO)" \
652 if
[ -d
$(unsubdir
)/gas
] ; then \
653 (cd
$(unsubdir
)/gas
$(subdir
); \
655 "against=$(against)" \
657 "AR_FLAGS=$(AR_FLAGS)" \
660 "LOADLIBES=$(LOADLIBES)" \
661 "LDFLAGS=$(LDFLAGS)" \
663 "MAKEINFO=$(MAKEINFO)" \
670 if
[ -d
$(unsubdir
)/gas
] ; then \
671 (cd
$(unsubdir
)/gas
$(subdir
); \
673 "against=$(against)" \
675 "AR_FLAGS=$(AR_FLAGS)" \
678 "LOADLIBES=$(LOADLIBES)" \
679 "LDFLAGS=$(LDFLAGS)" \
681 "MAKEINFO=$(MAKEINFO)" \
688 .PHONY
: all-ld just-ld
690 just-ld
: just-libiberty just-bfd just-bison
force
691 if
[ -d
$(unsubdir
)/ld ] ; then \
692 (cd
$(unsubdir
)/ld$(subdir
); \
694 "against=$(against)" \
696 "AR_FLAGS=$(AR_FLAGS)" \
699 "LOADLIBES=$(LOADLIBES)" \
700 "LDFLAGS=$(LDFLAGS)" \
702 "MAKEINFO=$(MAKEINFO)" \
709 if
[ -d
$(unsubdir
)/ld ] ; then \
710 (cd
$(unsubdir
)/ld$(subdir
); \
712 "against=$(against)" \
714 "AR_FLAGS=$(AR_FLAGS)" \
717 "LOADLIBES=$(LOADLIBES)" \
718 "LDFLAGS=$(LDFLAGS)" \
720 "MAKEINFO=$(MAKEINFO)" \
727 if
[ -d
$(unsubdir
)/ld ] ; then \
728 (cd
$(unsubdir
)/ld$(subdir
); \
730 "against=$(against)" \
732 "AR_FLAGS=$(AR_FLAGS)" \
735 "LOADLIBES=$(LOADLIBES)" \
736 "LDFLAGS=$(LDFLAGS)" \
738 "MAKEINFO=$(MAKEINFO)" \
745 .PHONY
: all-gnulib just-gnulib
746 all-gnulib
: just-gnulib
747 just-gnulib
: all-gcc all-gas all-binutils
force
748 if
[ -d
$(unsubdir
)/gnulib
] ; then \
749 (cd
$(unsubdir
)/gnulib
$(subdir
); \
751 "against=$(against)" \
753 "AR_FLAGS=$(AR_FLAGS)" \
756 "LOADLIBES=$(LOADLIBES)" \
757 "LDFLAGS=$(LDFLAGS)" \
759 "MAKEINFO=$(MAKEINFO)" \
766 if
[ -d
$(unsubdir
)/gnulib
] ; then \
767 (cd
$(unsubdir
)/gnulib
$(subdir
); \
769 "against=$(against)" \
771 "AR_FLAGS=$(AR_FLAGS)" \
774 "LOADLIBES=$(LOADLIBES)" \
775 "LDFLAGS=$(LDFLAGS)" \
777 "MAKEINFO=$(MAKEINFO)" \
783 install-gnulib
: force
784 if
[ -d
$(unsubdir
)/gnulib
] ; then \
785 (cd
$(unsubdir
)/gnulib
$(subdir
); \
787 "against=$(against)" \
789 "AR_FLAGS=$(AR_FLAGS)" \
792 "LOADLIBES=$(LOADLIBES)" \
793 "LDFLAGS=$(LDFLAGS)" \
795 "MAKEINFO=$(MAKEINFO)" \
802 .PHONY
: all-gdb just-gdb
804 just-gdb
: just-bfd just-libiberty just-readline just-glob just-bison
force
805 if
[ -d
$(unsubdir
)/gdb
] ; then \
806 (cd
$(unsubdir
)/gdb
$(subdir
); \
808 "against=$(against)" \
810 "AR_FLAGS=$(AR_FLAGS)" \
813 "LOADLIBES=$(LOADLIBES)" \
814 "LDFLAGS=$(LDFLAGS)" \
816 "MAKEINFO=$(MAKEINFO)" \
823 if
[ -d
$(unsubdir
)/gdb
] ; then \
824 (cd
$(unsubdir
)/gdb
$(subdir
); \
826 "against=$(against)" \
828 "AR_FLAGS=$(AR_FLAGS)" \
831 "LOADLIBES=$(LOADLIBES)" \
832 "LDFLAGS=$(LDFLAGS)" \
834 "MAKEINFO=$(MAKEINFO)" \
841 if
[ -d
$(unsubdir
)/gdb
] ; then \
842 (cd
$(unsubdir
)/gdb
$(subdir
); \
844 "against=$(against)" \
846 "AR_FLAGS=$(AR_FLAGS)" \
849 "LOADLIBES=$(LOADLIBES)" \
850 "LDFLAGS=$(LDFLAGS)" \
852 "MAKEINFO=$(MAKEINFO)" \
859 .PHONY
: all-make just-make
861 just-make
: all-libiberty
force
862 if
[ -d
$(unsubdir
)/make
] ; then \
863 (cd
$(unsubdir
)/make
$(subdir
); \
865 "against=$(against)" \
867 "AR_FLAGS=$(AR_FLAGS)" \
870 "LOADLIBES=$(LOADLIBES)" \
871 "LDFLAGS=$(LDFLAGS)" \
873 "MAKEINFO=$(MAKEINFO)" \
880 if
[ -d
$(unsubdir
)/make
] ; then \
881 (cd
$(unsubdir
)/make
$(subdir
); \
883 "against=$(against)" \
885 "AR_FLAGS=$(AR_FLAGS)" \
888 "LOADLIBES=$(LOADLIBES)" \
889 "LDFLAGS=$(LDFLAGS)" \
891 "MAKEINFO=$(MAKEINFO)" \
898 if
[ -d
$(unsubdir
)/make
] ; then \
899 (cd
$(unsubdir
)/make
$(subdir
); \
901 "against=$(against)" \
903 "AR_FLAGS=$(AR_FLAGS)" \
906 "LOADLIBES=$(LOADLIBES)" \
907 "LDFLAGS=$(LDFLAGS)" \
909 "MAKEINFO=$(MAKEINFO)" \
916 .PHONY
: all-diff just-diff
919 if
[ -d
$(unsubdir
)/diff
] ; then \
920 (cd
$(unsubdir
)/diff
$(subdir
); \
922 "against=$(against)" \
924 "AR_FLAGS=$(AR_FLAGS)" \
927 "LOADLIBES=$(LOADLIBES)" \
928 "LDFLAGS=$(LDFLAGS)" \
930 "MAKEINFO=$(MAKEINFO)" \
937 if
[ -d
$(unsubdir
)/diff
] ; then \
938 (cd
$(unsubdir
)/diff
$(subdir
); \
940 "against=$(against)" \
942 "AR_FLAGS=$(AR_FLAGS)" \
945 "LOADLIBES=$(LOADLIBES)" \
946 "LDFLAGS=$(LDFLAGS)" \
948 "MAKEINFO=$(MAKEINFO)" \
955 if
[ -d
$(unsubdir
)/diff
] ; then \
956 (cd
$(unsubdir
)/diff
/$(subdir
); \
958 "against=$(against)" \
960 "AR_FLAGS=$(AR_FLAGS)" \
963 "LOADLIBES=$(LOADLIBES)" \
964 "LDFLAGS=$(LDFLAGS)" \
966 "MAKEINFO=$(MAKEINFO)" \
973 .PHONY
: all-grep just-grep
976 if
[ -d
$(unsubdir
)/grep
] ; then \
977 (cd
$(unsubdir
)/grep
$(subdir
); \
979 "against=$(against)" \
981 "AR_FLAGS=$(AR_FLAGS)" \
984 "LOADLIBES=$(LOADLIBES)" \
985 "LDFLAGS=$(LDFLAGS)" \
987 "MAKEINFO=$(MAKEINFO)" \
994 if
[ -d
$(unsubdir
)/grep
] ; then \
995 (cd
$(unsubdir
)/grep
$(subdir
); \
997 "against=$(against)" \
999 "AR_FLAGS=$(AR_FLAGS)" \
1001 "RANLIB=$(RANLIB)" \
1002 "LOADLIBES=$(LOADLIBES)" \
1003 "LDFLAGS=$(LDFLAGS)" \
1005 "MAKEINFO=$(MAKEINFO)" \
1012 if
[ -d
$(unsubdir
)/grep
] ; then \
1013 (cd
$(unsubdir
)/grep
$(subdir
); \
1015 "against=$(against)" \
1017 "AR_FLAGS=$(AR_FLAGS)" \
1019 "RANLIB=$(RANLIB)" \
1020 "LOADLIBES=$(LOADLIBES)" \
1021 "LDFLAGS=$(LDFLAGS)" \
1023 "MAKEINFO=$(MAKEINFO)" \
1030 .PHONY
: all-rcs just-rcs
1032 just-rcs
: just-diff just-grep
force
1033 if
[ -d
$(unsubdir
)/rcs
] ; then \
1034 (cd
$(unsubdir
)/rcs
$(subdir
); \
1036 "against=$(against)" \
1038 "AR_FLAGS=$(AR_FLAGS)" \
1040 "RANLIB=$(RANLIB)" \
1041 "LOADLIBES=$(LOADLIBES)" \
1042 "LDFLAGS=$(LDFLAGS)" \
1044 "MAKEINFO=$(MAKEINFO)" \
1051 if
[ -d
$(unsubdir
)/rcs
] ; then \
1052 (cd
$(unsubdir
)/rcs
$(subdir
); \
1054 "against=$(against)" \
1056 "AR_FLAGS=$(AR_FLAGS)" \
1058 "RANLIB=$(RANLIB)" \
1059 "LOADLIBES=$(LOADLIBES)" \
1060 "LDFLAGS=$(LDFLAGS)" \
1062 "MAKEINFO=$(MAKEINFO)" \
1068 install-rcs
: install-grep install-diff
force
1069 if
[ -d
$(unsubdir
)/rcs
] ; then \
1070 (cd
$(unsubdir
)/rcs
$(subdir
); \
1072 "against=$(against)" \
1074 "AR_FLAGS=$(AR_FLAGS)" \
1076 "RANLIB=$(RANLIB)" \
1077 "LOADLIBES=$(LOADLIBES)" \
1078 "LDFLAGS=$(LDFLAGS)" \
1080 "MAKEINFO=$(MAKEINFO)" \
1087 .PHONY
: all-gdbm just-gdbm
1090 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1091 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1093 "against=$(against)" \
1095 "AR_FLAGS=$(AR_FLAGS)" \
1097 "RANLIB=$(RANLIB)" \
1098 "LOADLIBES=$(LOADLIBES)" \
1099 "LDFLAGS=$(LDFLAGS)" \
1101 "MAKEINFO=$(MAKEINFO)" \
1108 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1109 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1111 "against=$(against)" \
1113 "AR_FLAGS=$(AR_FLAGS)" \
1115 "RANLIB=$(RANLIB)" \
1116 "LOADLIBES=$(LOADLIBES)" \
1117 "LDFLAGS=$(LDFLAGS)" \
1119 "MAKEINFO=$(MAKEINFO)" \
1126 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1127 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1129 "against=$(against)" \
1131 "AR_FLAGS=$(AR_FLAGS)" \
1133 "RANLIB=$(RANLIB)" \
1134 "LOADLIBES=$(LOADLIBES)" \
1135 "LDFLAGS=$(LDFLAGS)" \
1137 "MAKEINFO=$(MAKEINFO)" \
1144 .PHONY
: all-cvs just-cvs
1145 all-cvs
: just-cvs just-rcs just-grep just-diff
1146 just-cvs
: just-gdbm
force
1147 if
[ -d
$(unsubdir
)/cvs
] ; then \
1148 (cd
$(unsubdir
)/cvs
$(subdir
); \
1150 "against=$(against)" \
1152 "AR_FLAGS=$(AR_FLAGS)" \
1154 "RANLIB=$(RANLIB)" \
1155 "LOADLIBES=$(LOADLIBES)" \
1156 "LDFLAGS=$(LDFLAGS)" \
1158 "MAKEINFO=$(MAKEINFO)" \
1165 if
[ -d
$(unsubdir
)/cvs
] ; then \
1166 (cd
$(unsubdir
)/cvs
$(subdir
); \
1168 "against=$(against)" \
1170 "AR_FLAGS=$(AR_FLAGS)" \
1172 "RANLIB=$(RANLIB)" \
1173 "LOADLIBES=$(LOADLIBES)" \
1174 "LDFLAGS=$(LDFLAGS)" \
1176 "MAKEINFO=$(MAKEINFO)" \
1182 install-cvs
: install-rcs install-gdbm
force
1183 if
[ -d
$(unsubdir
)/cvs
] ; then \
1184 (cd
$(unsubdir
)/cvs
$(subdir
); \
1186 "against=$(against)" \
1188 "AR_FLAGS=$(AR_FLAGS)" \
1190 "RANLIB=$(RANLIB)" \
1191 "LOADLIBES=$(LOADLIBES)" \
1192 "LDFLAGS=$(LDFLAGS)" \
1194 "MAKEINFO=$(MAKEINFO)" \
1201 .PHONY
: all-emacs just-emacs
1202 all-emacs
: just-emacs
1204 if
[ -d
$(unsubdir
)/emacs
] ; then \
1205 (cd
$(unsubdir
)/emacs
$(subdir
); \
1207 "against=$(against)" \
1209 "AR_FLAGS=$(AR_FLAGS)" \
1211 "RANLIB=$(RANLIB)" \
1212 "LOADLIBES=$(LOADLIBES)" \
1213 "LDFLAGS=$(LDFLAGS)" \
1215 "MAKEINFO=$(MAKEINFO)" \
1222 if
[ -d
$(unsubdir
)/emacs
] ; then \
1223 (cd
$(unsubdir
)/emacs
$(subdir
); \
1225 "against=$(against)" \
1227 "AR_FLAGS=$(AR_FLAGS)" \
1229 "RANLIB=$(RANLIB)" \
1230 "LOADLIBES=$(LOADLIBES)" \
1231 "LDFLAGS=$(LDFLAGS)" \
1233 "MAKEINFO=$(MAKEINFO)" \
1239 install-emacs
: install-rcs install-gdbm
force
1240 if
[ -d
$(unsubdir
)/emacs
] ; then \
1241 (cd
$(unsubdir
)/emacs
$(subdir
); \
1243 "against=$(against)" \
1245 "AR_FLAGS=$(AR_FLAGS)" \
1247 "RANLIB=$(RANLIB)" \
1248 "LOADLIBES=$(LOADLIBES)" \
1249 "LDFLAGS=$(LDFLAGS)" \
1251 "MAKEINFO=$(MAKEINFO)" \
1258 .PHONY
: all-ispell just-ispell
1259 all-ispell
: just-ispell
1260 just-ispell
: all-emacs
force
1261 if
[ -d
$(unsubdir
)/ispell
] ; then \
1262 (cd
$(unsubdir
)/ispell
$(subdir
); \
1264 "against=$(against)" \
1266 "AR_FLAGS=$(AR_FLAGS)" \
1268 "RANLIB=$(RANLIB)" \
1269 "LOADLIBES=$(LOADLIBES)" \
1270 "LDFLAGS=$(LDFLAGS)" \
1272 "MAKEINFO=$(MAKEINFO)" \
1279 if
[ -d
$(unsubdir
)/ispell
] ; then \
1280 (cd
$(unsubdir
)/ispell
$(subdir
); \
1282 "against=$(against)" \
1284 "AR_FLAGS=$(AR_FLAGS)" \
1286 "RANLIB=$(RANLIB)" \
1287 "LOADLIBES=$(LOADLIBES)" \
1288 "LDFLAGS=$(LDFLAGS)" \
1290 "MAKEINFO=$(MAKEINFO)" \
1296 install-ispell
: install-rcs install-gdbm
force
1297 if
[ -d
$(unsubdir
)/ispell
] ; then \
1298 (cd
$(unsubdir
)/ispell
$(subdir
); \
1300 "against=$(against)" \
1302 "AR_FLAGS=$(AR_FLAGS)" \
1304 "RANLIB=$(RANLIB)" \
1305 "LOADLIBES=$(LOADLIBES)" \
1306 "LDFLAGS=$(LDFLAGS)" \
1308 "MAKEINFO=$(MAKEINFO)" \
1314 ### other supporting targets
1315 # this is a bad hack.
1316 all.xclib
: all.normal
1317 if
[ -d clib
] ; then \
1318 (cd clib
; $(MAKE
)) ; \
1322 for i in
$(DODIRS
); do \
1323 if
[ -f
$(unsubdir
)/$$i/localenv
] ; then \
1324 if
(cd
$(unsubdir
)/$$i$(subdir
); \
1326 "against=$(against)" \
1328 "MAKEINFO=$(MAKEINFO)" \
1329 $(DO
)) ; then true
; \
1330 else exit
1 ; fi
; \
1331 else if
[ -d
$(unsubdir
)/$$i ] ; then \
1332 if
(cd
$(unsubdir
)/$$i$(subdir
); \
1334 "against=$(against)" \
1336 "AR_FLAGS=$(AR_FLAGS)" \
1338 "RANLIB=$(RANLIB)" \
1339 "LOADLIBES=$(LOADLIBES)" \
1340 "LDFLAGS=$(LDFLAGS)" \
1342 "MAKEINFO=$(MAKEINFO)" \
1343 $(DO
)) ; then true
; \
1344 else exit
1 ; fi
; \
1352 $(MAKE
) pass
"stagepass=stage1"
1354 $(MAKE
) pass
"stagepass=stage2"
1358 $(MAKE
) pass
"stagepass=stage1"
1360 $(MAKE
) pass
"stagepass=stage2"
1364 $(MAKE
) pass
"stagepass=stage2"
1368 cp
$(srcdir)/gcc
/gstdarg.h
$(unsubdir
)/gas
$(subdir
)/stdarg.h
1369 $(MAKE
) subdir_do
"DO=all info" "DODIRS=$(SUBDIRS)" \
1370 "CC=`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/gcc \
1371 -O $(GCCVERBOSE) -I`pwd`/$(unsubdir)/gcc$(subdir)/include \
1372 -B`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/ \
1373 -B`pwd`/$(unsubdir)/gas$(subdir)/$(stagepass)/ \
1374 -B`pwd`/$(unsubdir)/ld$(subdir)/$(stagepass)/" \
1375 "AR=`pwd`/$(unsubdir)/binutils$(subdir)/$(stagepass)/ar" \
1376 "LD=`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/gcc $(GCCVERBOSE)" \
1377 "RANLIB=`pwd`/$(unsubdir)/binutils$(subdir)/$(stagepass)/ranlib" \
1378 "LOADLIBES=`pwd`/$(unsubdir)/gnulib$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \
1379 "LDFLAGS=-nostdlib /lib/crt0.o \
1380 -L`pwd`/$(unsubdir)/gnulib$(subdir)/$(stagepass)/ \
1381 -B`pwd`/$(unsubdir)/ld$(subdir)/$(stagepass)/"
1385 $(MAKE
) subdir_do DO
=stage1
"DODIRS=$(SUBDIRS)"
1388 $(MAKE
) subdir_do DO
=stage2
"DODIRS=$(SUBDIRS)"
1391 $(MAKE
) subdir_do DO
=stage3
"DODIRS=$(SUBDIRS)"
1394 $(MAKE
) subdir_do DO
=stage4
"DODIRS=$(SUBDIRS)"
1398 comparison
:; $(MAKE
) subdir_do DO
=comparison against
=$(against
) "DODIRS=$(SUBDIRS)"
1400 de-stage1
:; $(MAKE
) subdir_do DO
=de-stage1
"DODIRS=$(SUBDIRS)"
1401 de-stage2
:; $(MAKE
) subdir_do DO
=de-stage2
"DODIRS=$(SUBDIRS)"
1402 de-stage3
:; $(MAKE
) subdir_do DO
=de-stage3
"DODIRS=$(SUBDIRS)"
1403 de-stage4
:; $(MAKE
) subdir_do DO
=de-stage4
"DODIRS=$(SUBDIRS)"
1405 # The "else true" stuff is for Ultrix; the shell returns the exit code
1406 # of the "if" command, if no commands are run in the "then" or "else" part,
1407 # causing Make to quit.
1428 for i in
$(MAKEDIRS
) ; do \
1429 echo Making
$$i...
; \
1430 if
[ -d
$$i ] ; then true
; else mkdir
$$i || exit
1 ; fi
; \
1437 install-info-dirs
: force
1438 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1439 if
[ -d
$(datadir) ] ; then true
; else mkdir
$(datadir) ; fi
1440 if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1443 $(srcdir)/texinfo
/gen-info-dir
$(infodir) > dir.
info.new
1444 mv
-f
dir.
info.new
dir.
info
1453 @for i in
$(SUBDIRS
); \
1457 wd
=`basename $$pwd`; \
1458 for j in
`$(MAKE) ls`; \
1466 # with the gnu make, this is done automatically.
1468 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1469 $(SHELL
) .
/config.status
1472 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1474 DEVO_SUPPORT
= README DOC.configure Makefile.in configure configure.in \
1476 GDB_SUPPORT_DIRS
= bfd
include libiberty readline glob
1477 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
) texinfo
/fsf
/texinfo.
tex
1479 setup-dirs
: force_update
1482 .
/configure
-rm sun4
1483 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1485 bfd.ilrt.
tar.Z
: setup-dirs
1486 rm -f bfd.ilrt.
tar.Z
1487 tar cf
- $(DEVO_SUPPORT
) $(GDB_SUPPORT_FILES
) \
1488 | compress
-v
>bfd.ilrt.
tar.Z
1490 gdb.
tar.Z
: setup-dirs
1491 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1492 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1494 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/fsf
/texinfo.
tex
1495 rm -rf proto-toplev
; mkdir proto-toplev
1496 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1497 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1500 # Take out texinfo from configurable dirs
1501 rm proto-toplev
/configure.in
1502 sed
'/^configdirs=/s/texinfo //' <configure.in
>proto-toplev
/configure.in
1503 # Take out glob from buildable dirs
1504 rm proto-toplev
/Makefile.in
1505 sed
'/^SUBDIRS =/s/glob //' <Makefile.in
>proto-toplev
/Makefile.in
1506 mkdir proto-toplev
/texinfo
1507 mkdir proto-toplev
/texinfo
/fsf
1508 ln
-s ..
/..
/..
/texinfo
/fsf
/texinfo.
tex proto-toplev
/texinfo
/fsf
/
1509 chmod og
=u
`find proto-toplev -print`
1510 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1511 echo
"==> Making gdb-$$VER.tar.Z"; \
1512 ln
-s proto-toplev gdb-
$$VER; \
1513 tar cfh
- gdb-
$$VER \
1514 | compress
-v
>gdb-
$$VER.
tar.Z
)
1520 # end of Makefile.in