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 cfg-paper.
info: cfg-paper.texi
82 $(MAKEINFO
) -o cfg-paper.
info $(srcdir)/cfg-paper.texi
84 configure.
info: configure.texi
85 $(MAKEINFO
) -o configure.
info $(srcdir)/configure.texi
87 install-info
: install-info-dirs
force
88 $(MAKE
) subdir_do DO
=install-info
"DODIRS=$(SUBDIRS)"
89 $(INSTALL_DATA
) cfg-paper.
info $(infodir)/cfg-paper.
info
90 $(MAKE
) dir.
info install-dir.
info
93 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
96 all.normal
: all-texinfo all-bison all-byacc all-ld all-gnulib all-gdb all-make \
97 all-cvs all-emacs all-ispell
98 all.cross
: all-bison all-ld all-gnulib all-gdb
99 # $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
101 clean: clean-libiberty clean-texinfo clean-bfd clean-binutils clean-bison \
102 clean-byacc clean-ld clean-gas clean-gcc clean-gnulib clean-readline \
103 clean-glob clean-gdb clean-make clean-diff clean-grep clean-rcs \
104 clean-gdbm clean-cvs clean-emacs clean-ispell
105 rm -rf
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
107 install: $(INSTALL_TARGET
)
108 $(INSTALL_DATA
) configure.man
$(man1dir)/configure
.1
110 install.
all: install-dirs install-libiberty install-texinfo install-binutils install-bison \
111 install-byacc install-ld install-gas install-gcc install-gnulib \
112 install-readline install-glob install-gdb install-make install-cvs \
113 install-emacs install-ispell
114 install.cross
: install-dirs install-libiberty install-binutils install-bison \
115 install-byacc install-ld install-gas install-gnulib \
116 install-readline install-glob install-gdb
119 .PHONY
: all-libiberty just-libiberty
120 all-libiberty
: just-libiberty
121 just-libiberty
: force
122 if
[ -d
$(unsubdir
)/libiberty
] ; then \
123 (cd
$(unsubdir
)/libiberty
$(subdir
); \
125 "against=$(against)" \
127 "AR_FLAGS=$(AR_FLAGS)" \
130 "LOADLIBES=$(LOADLIBES)" \
131 "LDFLAGS=$(LDFLAGS)" \
133 "MAKEINFO=$(MAKEINFO)" \
139 clean-libiberty
: force
140 if
[ -d
$(unsubdir
)/libiberty
] ; then \
141 (cd
$(unsubdir
)/libiberty
$(subdir
); \
143 "against=$(against)" \
145 "AR_FLAGS=$(AR_FLAGS)" \
148 "LOADLIBES=$(LOADLIBES)" \
149 "LDFLAGS=$(LDFLAGS)" \
151 "MAKEINFO=$(MAKEINFO)" \
157 install-libiberty
: force
158 if
[ -d
$(unsubdir
)/libiberty
] ; then \
159 (cd
$(unsubdir
)/libiberty
$(subdir
); \
161 "against=$(against)" \
163 "AR_FLAGS=$(AR_FLAGS)" \
166 "LOADLIBES=$(LOADLIBES)" \
167 "LDFLAGS=$(LDFLAGS)" \
169 "MAKEINFO=$(MAKEINFO)" \
176 .PHONY
: all-texinfo just-texinfo
177 all-texinfo
: just-texinfo
178 just-texinfo
: just-libiberty
force
179 if
[ -d
$(unsubdir
)/texinfo
] ; then \
180 (cd
$(unsubdir
)/texinfo
$(subdir
); \
182 "against=$(against)" \
184 "AR_FLAGS=$(AR_FLAGS)" \
187 "LOADLIBES=$(LOADLIBES)" \
188 "LDFLAGS=$(LDFLAGS)" \
190 "MAKEINFO=$(MAKEINFO)" \
197 if
[ -d
$(unsubdir
)/texinfo
] ; then \
198 (cd
$(unsubdir
)/texinfo
$(subdir
); \
200 "against=$(against)" \
202 "AR_FLAGS=$(AR_FLAGS)" \
205 "LOADLIBES=$(LOADLIBES)" \
206 "LDFLAGS=$(LDFLAGS)" \
208 "MAKEINFO=$(MAKEINFO)" \
214 install-texinfo
: force
215 if
[ -d
$(unsubdir
)/texinfo
] ; then \
216 (cd
$(unsubdir
)/texinfo
$(subdir
); \
218 "against=$(against)" \
220 "AR_FLAGS=$(AR_FLAGS)" \
223 "LOADLIBES=$(LOADLIBES)" \
224 "LDFLAGS=$(LDFLAGS)" \
226 "MAKEINFO=$(MAKEINFO)" \
233 .PHONY
: all-bfd just-bfd
236 if
[ -d
$(unsubdir
)/bfd
] ; then \
237 (cd
$(unsubdir
)/bfd
$(subdir
); \
239 "against=$(against)" \
241 "AR_FLAGS=$(AR_FLAGS)" \
244 "LOADLIBES=$(LOADLIBES)" \
245 "LDFLAGS=$(LDFLAGS)" \
247 "MAKEINFO=$(MAKEINFO)" \
254 if
[ -d
$(unsubdir
)/bfd
] ; then \
255 (cd
$(unsubdir
)/bfd
$(subdir
); \
257 "against=$(against)" \
259 "AR_FLAGS=$(AR_FLAGS)" \
262 "LOADLIBES=$(LOADLIBES)" \
263 "LDFLAGS=$(LDFLAGS)" \
265 "MAKEINFO=$(MAKEINFO)" \
272 if
[ -d
$(unsubdir
)/bfd
] ; then \
273 (cd
$(unsubdir
)/bfd
$(subdir
); \
275 "against=$(against)" \
277 "AR_FLAGS=$(AR_FLAGS)" \
280 "LOADLIBES=$(LOADLIBES)" \
281 "LDFLAGS=$(LDFLAGS)" \
283 "MAKEINFO=$(MAKEINFO)" \
290 .PHONY
: all-binutils just-binutils
291 all-binutils
: just-binutils
292 just-binutils
: just-libiberty just-bfd
force
293 if
[ -d
$(unsubdir
)/binutils
] ; then \
294 (cd
$(unsubdir
)/binutils
$(subdir
); \
296 "against=$(against)" \
298 "AR_FLAGS=$(AR_FLAGS)" \
301 "LOADLIBES=$(LOADLIBES)" \
302 "LDFLAGS=$(LDFLAGS)" \
304 "MAKEINFO=$(MAKEINFO)" \
310 clean-binutils
: force
311 if
[ -d
$(unsubdir
)/binutils
] ; then \
312 (cd
$(unsubdir
)/binutils
$(subdir
); \
314 "against=$(against)" \
316 "AR_FLAGS=$(AR_FLAGS)" \
319 "LOADLIBES=$(LOADLIBES)" \
320 "LDFLAGS=$(LDFLAGS)" \
322 "MAKEINFO=$(MAKEINFO)" \
328 install-binutils
: force
329 if
[ -d
$(unsubdir
)/binutils
] ; then \
330 (cd
$(unsubdir
)/binutils
$(subdir
); \
332 "against=$(against)" \
334 "AR_FLAGS=$(AR_FLAGS)" \
337 "LOADLIBES=$(LOADLIBES)" \
338 "LDFLAGS=$(LDFLAGS)" \
340 "MAKEINFO=$(MAKEINFO)" \
347 .PHONY
: all-byacc just-byacc
348 all-byacc
: just-byacc
350 if
[ -d
$(unsubdir
)/byacc
] ; then \
351 (cd
$(unsubdir
)/byacc
$(subdir
); \
353 "against=$(against)" \
355 "AR_FLAGS=$(AR_FLAGS)" \
358 "LOADLIBES=$(LOADLIBES)" \
359 "LDFLAGS=$(LDFLAGS)" \
361 "MAKEINFO=$(MAKEINFO)" \
368 if
[ -d
$(unsubdir
)/byacc
] ; then \
369 (cd
$(unsubdir
)/byacc
$(subdir
); \
371 "against=$(against)" \
373 "AR_FLAGS=$(AR_FLAGS)" \
376 "LOADLIBES=$(LOADLIBES)" \
377 "LDFLAGS=$(LDFLAGS)" \
379 "MAKEINFO=$(MAKEINFO)" \
386 if
[ -d
$(unsubdir
)/byacc
] ; then \
387 (cd
$(unsubdir
)/byacc
$(subdir
); \
389 "against=$(against)" \
391 "AR_FLAGS=$(AR_FLAGS)" \
394 "LOADLIBES=$(LOADLIBES)" \
395 "LDFLAGS=$(LDFLAGS)" \
397 "MAKEINFO=$(MAKEINFO)" \
404 .PHONY
: all-bison just-bison
405 all-bison
: just-bison
406 just-bison
: just-libiberty
force
407 if
[ -d
$(unsubdir
)/bison
] ; then \
408 (cd
$(unsubdir
)/bison
$(subdir
); \
410 "against=$(against)" \
412 "AR_FLAGS=$(AR_FLAGS)" \
415 "LOADLIBES=$(LOADLIBES)" \
416 "LDFLAGS=$(LDFLAGS)" \
418 "MAKEINFO=$(MAKEINFO)" \
425 if
[ -d
$(unsubdir
)/bison
] ; then \
426 (cd
$(unsubdir
)/bison
$(subdir
); \
428 "against=$(against)" \
430 "AR_FLAGS=$(AR_FLAGS)" \
433 "LOADLIBES=$(LOADLIBES)" \
434 "LDFLAGS=$(LDFLAGS)" \
436 "MAKEINFO=$(MAKEINFO)" \
443 if
[ -d
$(unsubdir
)/bison
] ; then \
444 (cd
$(unsubdir
)/bison
$(subdir
); \
446 "against=$(against)" \
448 "AR_FLAGS=$(AR_FLAGS)" \
451 "LOADLIBES=$(LOADLIBES)" \
452 "LDFLAGS=$(LDFLAGS)" \
454 "MAKEINFO=$(MAKEINFO)" \
461 .PHONY
: all-gcc just-gcc
463 just-gcc
: just-libiberty just-bison just-gnulib1
force
464 if
[ -d
$(unsubdir
)/gcc
] ; then \
465 (cd
$(unsubdir
)/gcc
$(subdir
); \
467 "against=$(against)" \
469 "AR_FLAGS=$(AR_FLAGS)" \
472 "LOADLIBES=$(LOADLIBES)" \
473 "LDFLAGS=$(LDFLAGS)" \
475 "MAKEINFO=$(MAKEINFO)" \
482 if
[ -d
$(unsubdir
)/gcc
] ; then \
483 (cd
$(unsubdir
)/gcc
$(subdir
); \
485 "against=$(against)" \
487 "AR_FLAGS=$(AR_FLAGS)" \
490 "LOADLIBES=$(LOADLIBES)" \
491 "LDFLAGS=$(LDFLAGS)" \
493 "MAKEINFO=$(MAKEINFO)" \
500 if
[ -d
$(unsubdir
)/gcc
] ; then \
501 (cd
$(unsubdir
)/gcc
$(subdir
); \
503 "against=$(against)" \
505 "AR_FLAGS=$(AR_FLAGS)" \
508 "LOADLIBES=$(LOADLIBES)" \
509 "LDFLAGS=$(LDFLAGS)" \
511 "MAKEINFO=$(MAKEINFO)" \
518 .PHONY
: all-readline just-readline
519 all-readline
: just-readline
521 if
[ -d
$(unsubdir
)/readline
] ; then \
522 (cd
$(unsubdir
)/readline
$(subdir
); \
524 "against=$(against)" \
526 "AR_FLAGS=$(AR_FLAGS)" \
529 "LOADLIBES=$(LOADLIBES)" \
530 "LDFLAGS=$(LDFLAGS)" \
532 "MAKEINFO=$(MAKEINFO)" \
538 clean-readline
: force
539 if
[ -d
$(unsubdir
)/readline
] ; then \
540 (cd
$(unsubdir
)/readline
$(subdir
); \
542 "against=$(against)" \
544 "AR_FLAGS=$(AR_FLAGS)" \
547 "LOADLIBES=$(LOADLIBES)" \
548 "LDFLAGS=$(LDFLAGS)" \
550 "MAKEINFO=$(MAKEINFO)" \
556 install-readline
: force
557 if
[ -d
$(unsubdir
)/readline
] ; then \
558 (cd
$(unsubdir
)/readline
$(subdir
); \
560 "against=$(against)" \
562 "AR_FLAGS=$(AR_FLAGS)" \
565 "LOADLIBES=$(LOADLIBES)" \
566 "LDFLAGS=$(LDFLAGS)" \
568 "MAKEINFO=$(MAKEINFO)" \
575 .PHONY
: all-glob just-glob
578 if
[ -d
$(unsubdir
)/glob
] ; then \
579 (cd
$(unsubdir
)/glob
$(subdir
); \
581 "against=$(against)" \
583 "AR_FLAGS=$(AR_FLAGS)" \
586 "LOADLIBES=$(LOADLIBES)" \
587 "LDFLAGS=$(LDFLAGS)" \
589 "MAKEINFO=$(MAKEINFO)" \
596 if
[ -d
$(unsubdir
)/glob
] ; then \
597 (cd
$(unsubdir
)/glob
$(subdir
); \
599 "against=$(against)" \
601 "AR_FLAGS=$(AR_FLAGS)" \
604 "LOADLIBES=$(LOADLIBES)" \
605 "LDFLAGS=$(LDFLAGS)" \
607 "MAKEINFO=$(MAKEINFO)" \
614 if
[ -d
$(unsubdir
)/glob
] ; then \
615 (cd
$(unsubdir
)/glob
$(subdir
); \
617 "against=$(against)" \
619 "AR_FLAGS=$(AR_FLAGS)" \
622 "LOADLIBES=$(LOADLIBES)" \
623 "LDFLAGS=$(LDFLAGS)" \
625 "MAKEINFO=$(MAKEINFO)" \
632 .PHONY
: all-gas just-gas
634 just-gas
: just-libiberty just-bfd
force
635 if
[ -d
$(unsubdir
)/gas
] ; then \
636 (cd
$(unsubdir
)/gas
$(subdir
); \
638 "against=$(against)" \
640 "AR_FLAGS=$(AR_FLAGS)" \
643 "LOADLIBES=$(LOADLIBES)" \
644 "LDFLAGS=$(LDFLAGS)" \
646 "MAKEINFO=$(MAKEINFO)" \
653 if
[ -d
$(unsubdir
)/gas
] ; then \
654 (cd
$(unsubdir
)/gas
$(subdir
); \
656 "against=$(against)" \
658 "AR_FLAGS=$(AR_FLAGS)" \
661 "LOADLIBES=$(LOADLIBES)" \
662 "LDFLAGS=$(LDFLAGS)" \
664 "MAKEINFO=$(MAKEINFO)" \
671 if
[ -d
$(unsubdir
)/gas
] ; then \
672 (cd
$(unsubdir
)/gas
$(subdir
); \
674 "against=$(against)" \
676 "AR_FLAGS=$(AR_FLAGS)" \
679 "LOADLIBES=$(LOADLIBES)" \
680 "LDFLAGS=$(LDFLAGS)" \
682 "MAKEINFO=$(MAKEINFO)" \
689 .PHONY
: all-ld just-ld
691 just-ld
: just-libiberty just-bfd just-bison
force
692 if
[ -d
$(unsubdir
)/ld ] ; then \
693 (cd
$(unsubdir
)/ld$(subdir
); \
695 "against=$(against)" \
697 "AR_FLAGS=$(AR_FLAGS)" \
700 "LOADLIBES=$(LOADLIBES)" \
701 "LDFLAGS=$(LDFLAGS)" \
703 "MAKEINFO=$(MAKEINFO)" \
710 if
[ -d
$(unsubdir
)/ld ] ; then \
711 (cd
$(unsubdir
)/ld$(subdir
); \
713 "against=$(against)" \
715 "AR_FLAGS=$(AR_FLAGS)" \
718 "LOADLIBES=$(LOADLIBES)" \
719 "LDFLAGS=$(LDFLAGS)" \
721 "MAKEINFO=$(MAKEINFO)" \
728 if
[ -d
$(unsubdir
)/ld ] ; then \
729 (cd
$(unsubdir
)/ld$(subdir
); \
731 "against=$(against)" \
733 "AR_FLAGS=$(AR_FLAGS)" \
736 "LOADLIBES=$(LOADLIBES)" \
737 "LDFLAGS=$(LDFLAGS)" \
739 "MAKEINFO=$(MAKEINFO)" \
745 ### gnulib (and gnulib1)
746 .PHONY
: all-gnulib just-gnulib1 just-gnulib
747 just-gnulib1
: 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-gnulib1
: force
784 echo gnulib1 is a component
, not an installable target
786 all-gnulib
: just-gnulib
787 just-gnulib
: all-gcc all-gas all-binutils
force
788 if
[ -d
$(unsubdir
)/gnulib
] ; then \
789 (cd
$(unsubdir
)/gnulib
$(subdir
); \
791 "against=$(against)" \
793 "AR_FLAGS=$(AR_FLAGS)" \
796 "LOADLIBES=$(LOADLIBES)" \
797 "LDFLAGS=$(LDFLAGS)" \
799 "MAKEINFO=$(MAKEINFO)" \
806 if
[ -d
$(unsubdir
)/gnulib
] ; then \
807 (cd
$(unsubdir
)/gnulib
$(subdir
); \
809 "against=$(against)" \
811 "AR_FLAGS=$(AR_FLAGS)" \
814 "LOADLIBES=$(LOADLIBES)" \
815 "LDFLAGS=$(LDFLAGS)" \
817 "MAKEINFO=$(MAKEINFO)" \
823 install-gnulib
: force
824 if
[ -d
$(unsubdir
)/gnulib
] ; then \
825 (cd
$(unsubdir
)/gnulib
$(subdir
); \
827 "against=$(against)" \
829 "AR_FLAGS=$(AR_FLAGS)" \
832 "LOADLIBES=$(LOADLIBES)" \
833 "LDFLAGS=$(LDFLAGS)" \
835 "MAKEINFO=$(MAKEINFO)" \
842 .PHONY
: all-gdb just-gdb
844 just-gdb
: just-bfd just-libiberty just-readline just-glob just-bison
force
845 if
[ -d
$(unsubdir
)/gdb
] ; then \
846 (cd
$(unsubdir
)/gdb
$(subdir
); \
848 "against=$(against)" \
850 "AR_FLAGS=$(AR_FLAGS)" \
853 "LOADLIBES=$(LOADLIBES)" \
854 "LDFLAGS=$(LDFLAGS)" \
856 "MAKEINFO=$(MAKEINFO)" \
863 if
[ -d
$(unsubdir
)/gdb
] ; then \
864 (cd
$(unsubdir
)/gdb
$(subdir
); \
866 "against=$(against)" \
868 "AR_FLAGS=$(AR_FLAGS)" \
871 "LOADLIBES=$(LOADLIBES)" \
872 "LDFLAGS=$(LDFLAGS)" \
874 "MAKEINFO=$(MAKEINFO)" \
881 if
[ -d
$(unsubdir
)/gdb
] ; then \
882 (cd
$(unsubdir
)/gdb
$(subdir
); \
884 "against=$(against)" \
886 "AR_FLAGS=$(AR_FLAGS)" \
889 "LOADLIBES=$(LOADLIBES)" \
890 "LDFLAGS=$(LDFLAGS)" \
892 "MAKEINFO=$(MAKEINFO)" \
899 .PHONY
: all-make just-make
901 just-make
: all-libiberty
force
902 if
[ -d
$(unsubdir
)/make
] ; then \
903 (cd
$(unsubdir
)/make
$(subdir
); \
905 "against=$(against)" \
907 "AR_FLAGS=$(AR_FLAGS)" \
910 "LOADLIBES=$(LOADLIBES)" \
911 "LDFLAGS=$(LDFLAGS)" \
913 "MAKEINFO=$(MAKEINFO)" \
920 if
[ -d
$(unsubdir
)/make
] ; then \
921 (cd
$(unsubdir
)/make
$(subdir
); \
923 "against=$(against)" \
925 "AR_FLAGS=$(AR_FLAGS)" \
928 "LOADLIBES=$(LOADLIBES)" \
929 "LDFLAGS=$(LDFLAGS)" \
931 "MAKEINFO=$(MAKEINFO)" \
938 if
[ -d
$(unsubdir
)/make
] ; then \
939 (cd
$(unsubdir
)/make
$(subdir
); \
941 "against=$(against)" \
943 "AR_FLAGS=$(AR_FLAGS)" \
946 "LOADLIBES=$(LOADLIBES)" \
947 "LDFLAGS=$(LDFLAGS)" \
949 "MAKEINFO=$(MAKEINFO)" \
956 .PHONY
: all-diff just-diff
959 if
[ -d
$(unsubdir
)/diff
] ; then \
960 (cd
$(unsubdir
)/diff
$(subdir
); \
962 "against=$(against)" \
964 "AR_FLAGS=$(AR_FLAGS)" \
967 "LOADLIBES=$(LOADLIBES)" \
968 "LDFLAGS=$(LDFLAGS)" \
970 "MAKEINFO=$(MAKEINFO)" \
977 if
[ -d
$(unsubdir
)/diff
] ; then \
978 (cd
$(unsubdir
)/diff
$(subdir
); \
980 "against=$(against)" \
982 "AR_FLAGS=$(AR_FLAGS)" \
985 "LOADLIBES=$(LOADLIBES)" \
986 "LDFLAGS=$(LDFLAGS)" \
988 "MAKEINFO=$(MAKEINFO)" \
995 if
[ -d
$(unsubdir
)/diff
] ; then \
996 (cd
$(unsubdir
)/diff
/$(subdir
); \
998 "against=$(against)" \
1000 "AR_FLAGS=$(AR_FLAGS)" \
1002 "RANLIB=$(RANLIB)" \
1003 "LOADLIBES=$(LOADLIBES)" \
1004 "LDFLAGS=$(LDFLAGS)" \
1006 "MAKEINFO=$(MAKEINFO)" \
1013 .PHONY
: all-grep just-grep
1016 if
[ -d
$(unsubdir
)/grep
] ; then \
1017 (cd
$(unsubdir
)/grep
$(subdir
); \
1019 "against=$(against)" \
1021 "AR_FLAGS=$(AR_FLAGS)" \
1023 "RANLIB=$(RANLIB)" \
1024 "LOADLIBES=$(LOADLIBES)" \
1025 "LDFLAGS=$(LDFLAGS)" \
1027 "MAKEINFO=$(MAKEINFO)" \
1034 if
[ -d
$(unsubdir
)/grep
] ; then \
1035 (cd
$(unsubdir
)/grep
$(subdir
); \
1037 "against=$(against)" \
1039 "AR_FLAGS=$(AR_FLAGS)" \
1041 "RANLIB=$(RANLIB)" \
1042 "LOADLIBES=$(LOADLIBES)" \
1043 "LDFLAGS=$(LDFLAGS)" \
1045 "MAKEINFO=$(MAKEINFO)" \
1052 if
[ -d
$(unsubdir
)/grep
] ; then \
1053 (cd
$(unsubdir
)/grep
$(subdir
); \
1055 "against=$(against)" \
1057 "AR_FLAGS=$(AR_FLAGS)" \
1059 "RANLIB=$(RANLIB)" \
1060 "LOADLIBES=$(LOADLIBES)" \
1061 "LDFLAGS=$(LDFLAGS)" \
1063 "MAKEINFO=$(MAKEINFO)" \
1070 .PHONY
: all-rcs just-rcs
1072 just-rcs
: just-diff just-grep
force
1073 if
[ -d
$(unsubdir
)/rcs
] ; then \
1074 (cd
$(unsubdir
)/rcs
$(subdir
); \
1076 "against=$(against)" \
1078 "AR_FLAGS=$(AR_FLAGS)" \
1080 "RANLIB=$(RANLIB)" \
1081 "LOADLIBES=$(LOADLIBES)" \
1082 "LDFLAGS=$(LDFLAGS)" \
1084 "MAKEINFO=$(MAKEINFO)" \
1091 if
[ -d
$(unsubdir
)/rcs
] ; then \
1092 (cd
$(unsubdir
)/rcs
$(subdir
); \
1094 "against=$(against)" \
1096 "AR_FLAGS=$(AR_FLAGS)" \
1098 "RANLIB=$(RANLIB)" \
1099 "LOADLIBES=$(LOADLIBES)" \
1100 "LDFLAGS=$(LDFLAGS)" \
1102 "MAKEINFO=$(MAKEINFO)" \
1108 install-rcs
: install-grep install-diff
force
1109 if
[ -d
$(unsubdir
)/rcs
] ; then \
1110 (cd
$(unsubdir
)/rcs
$(subdir
); \
1112 "against=$(against)" \
1114 "AR_FLAGS=$(AR_FLAGS)" \
1116 "RANLIB=$(RANLIB)" \
1117 "LOADLIBES=$(LOADLIBES)" \
1118 "LDFLAGS=$(LDFLAGS)" \
1120 "MAKEINFO=$(MAKEINFO)" \
1127 .PHONY
: all-gdbm just-gdbm
1130 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1131 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1133 "against=$(against)" \
1135 "AR_FLAGS=$(AR_FLAGS)" \
1137 "RANLIB=$(RANLIB)" \
1138 "LOADLIBES=$(LOADLIBES)" \
1139 "LDFLAGS=$(LDFLAGS)" \
1141 "MAKEINFO=$(MAKEINFO)" \
1148 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1149 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1151 "against=$(against)" \
1153 "AR_FLAGS=$(AR_FLAGS)" \
1155 "RANLIB=$(RANLIB)" \
1156 "LOADLIBES=$(LOADLIBES)" \
1157 "LDFLAGS=$(LDFLAGS)" \
1159 "MAKEINFO=$(MAKEINFO)" \
1166 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1167 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1169 "against=$(against)" \
1171 "AR_FLAGS=$(AR_FLAGS)" \
1173 "RANLIB=$(RANLIB)" \
1174 "LOADLIBES=$(LOADLIBES)" \
1175 "LDFLAGS=$(LDFLAGS)" \
1177 "MAKEINFO=$(MAKEINFO)" \
1184 .PHONY
: all-cvs just-cvs
1185 all-cvs
: just-cvs just-rcs just-grep just-diff
1186 just-cvs
: just-gdbm
force
1187 if
[ -d
$(unsubdir
)/cvs
] ; then \
1188 (cd
$(unsubdir
)/cvs
$(subdir
); \
1190 "against=$(against)" \
1192 "AR_FLAGS=$(AR_FLAGS)" \
1194 "RANLIB=$(RANLIB)" \
1195 "LOADLIBES=$(LOADLIBES)" \
1196 "LDFLAGS=$(LDFLAGS)" \
1198 "MAKEINFO=$(MAKEINFO)" \
1205 if
[ -d
$(unsubdir
)/cvs
] ; then \
1206 (cd
$(unsubdir
)/cvs
$(subdir
); \
1208 "against=$(against)" \
1210 "AR_FLAGS=$(AR_FLAGS)" \
1212 "RANLIB=$(RANLIB)" \
1213 "LOADLIBES=$(LOADLIBES)" \
1214 "LDFLAGS=$(LDFLAGS)" \
1216 "MAKEINFO=$(MAKEINFO)" \
1222 install-cvs
: install-rcs install-gdbm
force
1223 if
[ -d
$(unsubdir
)/cvs
] ; then \
1224 (cd
$(unsubdir
)/cvs
$(subdir
); \
1226 "against=$(against)" \
1228 "AR_FLAGS=$(AR_FLAGS)" \
1230 "RANLIB=$(RANLIB)" \
1231 "LOADLIBES=$(LOADLIBES)" \
1232 "LDFLAGS=$(LDFLAGS)" \
1234 "MAKEINFO=$(MAKEINFO)" \
1241 .PHONY
: all-emacs just-emacs
1242 all-emacs
: just-emacs
1244 if
[ -d
$(unsubdir
)/emacs
] ; then \
1245 (cd
$(unsubdir
)/emacs
$(subdir
); \
1247 "against=$(against)" \
1249 "AR_FLAGS=$(AR_FLAGS)" \
1251 "RANLIB=$(RANLIB)" \
1252 "LOADLIBES=$(LOADLIBES)" \
1253 "LDFLAGS=$(LDFLAGS)" \
1255 "MAKEINFO=$(MAKEINFO)" \
1262 if
[ -d
$(unsubdir
)/emacs
] ; then \
1263 (cd
$(unsubdir
)/emacs
$(subdir
); \
1265 "against=$(against)" \
1267 "AR_FLAGS=$(AR_FLAGS)" \
1269 "RANLIB=$(RANLIB)" \
1270 "LOADLIBES=$(LOADLIBES)" \
1271 "LDFLAGS=$(LDFLAGS)" \
1273 "MAKEINFO=$(MAKEINFO)" \
1279 install-emacs
: install-rcs install-gdbm
force
1280 if
[ -d
$(unsubdir
)/emacs
] ; then \
1281 (cd
$(unsubdir
)/emacs
$(subdir
); \
1283 "against=$(against)" \
1285 "AR_FLAGS=$(AR_FLAGS)" \
1287 "RANLIB=$(RANLIB)" \
1288 "LOADLIBES=$(LOADLIBES)" \
1289 "LDFLAGS=$(LDFLAGS)" \
1291 "MAKEINFO=$(MAKEINFO)" \
1298 .PHONY
: all-ispell just-ispell
1299 all-ispell
: just-ispell
1300 just-ispell
: all-emacs
force
1301 if
[ -d
$(unsubdir
)/ispell
] ; then \
1302 (cd
$(unsubdir
)/ispell
$(subdir
); \
1304 "against=$(against)" \
1306 "AR_FLAGS=$(AR_FLAGS)" \
1308 "RANLIB=$(RANLIB)" \
1309 "LOADLIBES=$(LOADLIBES)" \
1310 "LDFLAGS=$(LDFLAGS)" \
1312 "MAKEINFO=$(MAKEINFO)" \
1319 if
[ -d
$(unsubdir
)/ispell
] ; then \
1320 (cd
$(unsubdir
)/ispell
$(subdir
); \
1322 "against=$(against)" \
1324 "AR_FLAGS=$(AR_FLAGS)" \
1326 "RANLIB=$(RANLIB)" \
1327 "LOADLIBES=$(LOADLIBES)" \
1328 "LDFLAGS=$(LDFLAGS)" \
1330 "MAKEINFO=$(MAKEINFO)" \
1336 install-ispell
: install-rcs install-gdbm
force
1337 if
[ -d
$(unsubdir
)/ispell
] ; then \
1338 (cd
$(unsubdir
)/ispell
$(subdir
); \
1340 "against=$(against)" \
1342 "AR_FLAGS=$(AR_FLAGS)" \
1344 "RANLIB=$(RANLIB)" \
1345 "LOADLIBES=$(LOADLIBES)" \
1346 "LDFLAGS=$(LDFLAGS)" \
1348 "MAKEINFO=$(MAKEINFO)" \
1354 ### other supporting targets
1355 # this is a bad hack.
1356 all.xclib
: all.normal
1357 if
[ -d clib
] ; then \
1358 (cd clib
; $(MAKE
)) ; \
1362 for i in
$(DODIRS
); do \
1363 if
[ -f
$(unsubdir
)/$$i/localenv
] ; then \
1364 if
(cd
$(unsubdir
)/$$i$(subdir
); \
1366 "against=$(against)" \
1368 "MAKEINFO=$(MAKEINFO)" \
1369 $(DO
)) ; then true
; \
1370 else exit
1 ; fi
; \
1371 else if
[ -d
$(unsubdir
)/$$i ] ; then \
1372 if
(cd
$(unsubdir
)/$$i$(subdir
); \
1374 "against=$(against)" \
1376 "AR_FLAGS=$(AR_FLAGS)" \
1378 "RANLIB=$(RANLIB)" \
1379 "LOADLIBES=$(LOADLIBES)" \
1380 "LDFLAGS=$(LDFLAGS)" \
1382 "MAKEINFO=$(MAKEINFO)" \
1383 $(DO
)) ; then true
; \
1384 else exit
1 ; fi
; \
1392 $(MAKE
) pass
"stagepass=stage1"
1394 $(MAKE
) pass
"stagepass=stage2"
1398 $(MAKE
) pass
"stagepass=stage1"
1400 $(MAKE
) pass
"stagepass=stage2"
1404 $(MAKE
) pass
"stagepass=stage2"
1408 cp
$(srcdir)/gcc
/gstdarg.h
$(unsubdir
)/gas
$(subdir
)/stdarg.h
1409 $(MAKE
) subdir_do
"DO=all info" "DODIRS=$(SUBDIRS)" \
1410 "CC=`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/gcc \
1411 -O $(GCCVERBOSE) -I`pwd`/$(unsubdir)/gcc$(subdir)/include \
1412 -B`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/ \
1413 -B`pwd`/$(unsubdir)/gas$(subdir)/$(stagepass)/ \
1414 -B`pwd`/$(unsubdir)/ld$(subdir)/$(stagepass)/" \
1415 "AR=`pwd`/$(unsubdir)/binutils$(subdir)/$(stagepass)/ar" \
1416 "LD=`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/gcc $(GCCVERBOSE)" \
1417 "RANLIB=`pwd`/$(unsubdir)/binutils$(subdir)/$(stagepass)/ranlib" \
1418 "LOADLIBES=`pwd`/$(unsubdir)/gnulib$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \
1419 "LDFLAGS=-nostdlib /lib/crt0.o \
1420 -L`pwd`/$(unsubdir)/gnulib$(subdir)/$(stagepass)/ \
1421 -B`pwd`/$(unsubdir)/ld$(subdir)/$(stagepass)/"
1425 $(MAKE
) subdir_do DO
=stage1
"DODIRS=$(SUBDIRS)"
1428 $(MAKE
) subdir_do DO
=stage2
"DODIRS=$(SUBDIRS)"
1431 $(MAKE
) subdir_do DO
=stage3
"DODIRS=$(SUBDIRS)"
1434 $(MAKE
) subdir_do DO
=stage4
"DODIRS=$(SUBDIRS)"
1438 comparison
:; $(MAKE
) subdir_do DO
=comparison against
=$(against
) "DODIRS=$(SUBDIRS)"
1440 de-stage1
:; $(MAKE
) subdir_do DO
=de-stage1
"DODIRS=$(SUBDIRS)"
1441 de-stage2
:; $(MAKE
) subdir_do DO
=de-stage2
"DODIRS=$(SUBDIRS)"
1442 de-stage3
:; $(MAKE
) subdir_do DO
=de-stage3
"DODIRS=$(SUBDIRS)"
1443 de-stage4
:; $(MAKE
) subdir_do DO
=de-stage4
"DODIRS=$(SUBDIRS)"
1445 # The "else true" stuff is for Ultrix; the shell returns the exit code
1446 # of the "if" command, if no commands are run in the "then" or "else" part,
1447 # causing Make to quit.
1468 for i in
$(MAKEDIRS
) ; do \
1469 echo Making
$$i...
; \
1470 if
[ -d
$$i ] ; then true
; else mkdir
$$i || exit
1 ; fi
; \
1477 install-info-dirs
: force
1478 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1479 if
[ -d
$(datadir) ] ; then true
; else mkdir
$(datadir) ; fi
1480 if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1483 $(srcdir)/texinfo
/gen-info-dir
$(infodir) > dir.
info.new
1484 mv
-f
dir.
info.new
dir.
info
1493 @for i in
$(SUBDIRS
); \
1497 wd
=`basename $$pwd`; \
1498 for j in
`$(MAKE) ls`; \
1506 # with the gnu make, this is done automatically.
1508 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1509 $(SHELL
) .
/config.status
1512 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1514 DEVO_SUPPORT
= README DOC.configure Makefile.in configure configure.in \
1516 GDB_SUPPORT_DIRS
= bfd
include libiberty readline glob
1517 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
) texinfo
/fsf
/texinfo.
tex
1519 setup-dirs
: force_update
1522 .
/configure
-rm sun4
1523 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1525 bfd.ilrt.
tar.Z
: setup-dirs
1526 rm -f bfd.ilrt.
tar.Z
1527 tar cf
- $(DEVO_SUPPORT
) $(GDB_SUPPORT_FILES
) \
1528 | compress
-v
>bfd.ilrt.
tar.Z
1530 gdb.
tar.Z
: setup-dirs
1531 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1532 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1534 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/fsf
/texinfo.
tex
1535 rm -rf proto-toplev
; mkdir proto-toplev
1536 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1537 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1540 # Take out texinfo from configurable dirs
1541 rm proto-toplev
/configure.in
1542 sed
'/^configdirs=/s/texinfo //' <configure.in
>proto-toplev
/configure.in
1543 # Take out glob from buildable dirs
1544 rm proto-toplev
/Makefile.in
1545 sed
'/^SUBDIRS =/s/glob //' <Makefile.in
>proto-toplev
/Makefile.in
1546 mkdir proto-toplev
/texinfo
1547 mkdir proto-toplev
/texinfo
/fsf
1548 ln
-s ..
/..
/..
/texinfo
/fsf
/texinfo.
tex proto-toplev
/texinfo
/fsf
/
1549 chmod og
=u
`find proto-toplev -print`
1550 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1551 echo
"==> Making gdb-$$VER.tar.Z"; \
1552 ln
-s proto-toplev gdb-
$$VER; \
1553 tar cfh
- gdb-
$$VER \
1554 | compress
-v
>gdb-
$$VER.
tar.Z
)
1560 # end of Makefile.in