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)"
82 $(MAKEINFO
) -o doc.
info $(srcdir)/doc.texi
84 install-info
: install-info-dirs
force
85 $(MAKE
) subdir_do DO
=install-info
"DODIRS=$(SUBDIRS)"
86 $(MAKE
) dir.
info install-dir.
info
89 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
92 all.normal
: all-texinfo all-bison all-byacc all-ld all-gnulib all-gdb all-make \
93 all-cvs all-emacs all-ispell
94 all.cross
: all-bison all-ld all-gnulib all-gdb
95 # $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
97 clean: clean-libiberty clean-texinfo clean-bfd clean-binutils clean-bison \
98 clean-byacc clean-ld clean-gas clean-gcc clean-gnulib clean-readline \
99 clean-glob clean-gdb clean-make clean-diff clean-grep clean-rcs \
100 clean-gdbm clean-cvs clean-emacs clean-ispell
101 rm -rf
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
103 install: $(INSTALL_TARGET
)
105 install.
all: install-dirs install-libiberty install-texinfo install-binutils install-bison \
106 install-byacc install-ld install-gas install-gcc install-gnulib \
107 install-readline install-glob install-gdb install-make install-cvs \
108 install-emacs install-ispell
109 install.cross
: install-dirs install-libiberty install-binutils install-bison \
110 install-byacc install-ld install-gas install-gnulib \
111 install-readline install-glob install-gdb
114 .PHONY
: all-libiberty just-libiberty
115 all-libiberty
: just-libiberty
116 just-libiberty
: force
117 if
[ -d
$(unsubdir
)/libiberty
] ; then \
118 (cd
$(unsubdir
)/libiberty
$(subdir
); \
120 "against=$(against)" \
122 "AR_FLAGS=$(AR_FLAGS)" \
125 "LOADLIBES=$(LOADLIBES)" \
126 "LDFLAGS=$(LDFLAGS)" \
128 "MAKEINFO=$(MAKEINFO)" \
134 clean-libiberty
: force
135 if
[ -d
$(unsubdir
)/libiberty
] ; then \
136 (cd
$(unsubdir
)/libiberty
$(subdir
); \
138 "against=$(against)" \
140 "AR_FLAGS=$(AR_FLAGS)" \
143 "LOADLIBES=$(LOADLIBES)" \
144 "LDFLAGS=$(LDFLAGS)" \
146 "MAKEINFO=$(MAKEINFO)" \
152 install-libiberty
: force
153 if
[ -d
$(unsubdir
)/libiberty
] ; then \
154 (cd
$(unsubdir
)/libiberty
$(subdir
); \
156 "against=$(against)" \
158 "AR_FLAGS=$(AR_FLAGS)" \
161 "LOADLIBES=$(LOADLIBES)" \
162 "LDFLAGS=$(LDFLAGS)" \
164 "MAKEINFO=$(MAKEINFO)" \
171 .PHONY
: all-texinfo just-texinfo
172 all-texinfo
: just-texinfo
173 just-texinfo
: just-libiberty
force
174 if
[ -d
$(unsubdir
)/texinfo
] ; then \
175 (cd
$(unsubdir
)/texinfo
$(subdir
); \
177 "against=$(against)" \
179 "AR_FLAGS=$(AR_FLAGS)" \
182 "LOADLIBES=$(LOADLIBES)" \
183 "LDFLAGS=$(LDFLAGS)" \
185 "MAKEINFO=$(MAKEINFO)" \
192 if
[ -d
$(unsubdir
)/texinfo
] ; then \
193 (cd
$(unsubdir
)/texinfo
$(subdir
); \
195 "against=$(against)" \
197 "AR_FLAGS=$(AR_FLAGS)" \
200 "LOADLIBES=$(LOADLIBES)" \
201 "LDFLAGS=$(LDFLAGS)" \
203 "MAKEINFO=$(MAKEINFO)" \
209 install-texinfo
: force
210 if
[ -d
$(unsubdir
)/texinfo
] ; then \
211 (cd
$(unsubdir
)/texinfo
$(subdir
); \
213 "against=$(against)" \
215 "AR_FLAGS=$(AR_FLAGS)" \
218 "LOADLIBES=$(LOADLIBES)" \
219 "LDFLAGS=$(LDFLAGS)" \
221 "MAKEINFO=$(MAKEINFO)" \
228 .PHONY
: all-bfd just-bfd
231 if
[ -d
$(unsubdir
)/bfd
] ; then \
232 (cd
$(unsubdir
)/bfd
$(subdir
); \
234 "against=$(against)" \
236 "AR_FLAGS=$(AR_FLAGS)" \
239 "LOADLIBES=$(LOADLIBES)" \
240 "LDFLAGS=$(LDFLAGS)" \
242 "MAKEINFO=$(MAKEINFO)" \
249 if
[ -d
$(unsubdir
)/bfd
] ; then \
250 (cd
$(unsubdir
)/bfd
$(subdir
); \
252 "against=$(against)" \
254 "AR_FLAGS=$(AR_FLAGS)" \
257 "LOADLIBES=$(LOADLIBES)" \
258 "LDFLAGS=$(LDFLAGS)" \
260 "MAKEINFO=$(MAKEINFO)" \
267 if
[ -d
$(unsubdir
)/bfd
] ; then \
268 (cd
$(unsubdir
)/bfd
$(subdir
); \
270 "against=$(against)" \
272 "AR_FLAGS=$(AR_FLAGS)" \
275 "LOADLIBES=$(LOADLIBES)" \
276 "LDFLAGS=$(LDFLAGS)" \
278 "MAKEINFO=$(MAKEINFO)" \
285 .PHONY
: all-binutils just-binutils
286 all-binutils
: just-binutils
287 just-binutils
: just-libiberty just-bfd
force
288 if
[ -d
$(unsubdir
)/binutils
] ; then \
289 (cd
$(unsubdir
)/binutils
$(subdir
); \
291 "against=$(against)" \
293 "AR_FLAGS=$(AR_FLAGS)" \
296 "LOADLIBES=$(LOADLIBES)" \
297 "LDFLAGS=$(LDFLAGS)" \
299 "MAKEINFO=$(MAKEINFO)" \
305 clean-binutils
: force
306 if
[ -d
$(unsubdir
)/binutils
] ; then \
307 (cd
$(unsubdir
)/binutils
$(subdir
); \
309 "against=$(against)" \
311 "AR_FLAGS=$(AR_FLAGS)" \
314 "LOADLIBES=$(LOADLIBES)" \
315 "LDFLAGS=$(LDFLAGS)" \
317 "MAKEINFO=$(MAKEINFO)" \
323 install-binutils
: force
324 if
[ -d
$(unsubdir
)/binutils
] ; then \
325 (cd
$(unsubdir
)/binutils
$(subdir
); \
327 "against=$(against)" \
329 "AR_FLAGS=$(AR_FLAGS)" \
332 "LOADLIBES=$(LOADLIBES)" \
333 "LDFLAGS=$(LDFLAGS)" \
335 "MAKEINFO=$(MAKEINFO)" \
342 .PHONY
: all-byacc just-byacc
343 all-byacc
: just-byacc
345 if
[ -d
$(unsubdir
)/byacc
] ; then \
346 (cd
$(unsubdir
)/byacc
$(subdir
); \
348 "against=$(against)" \
350 "AR_FLAGS=$(AR_FLAGS)" \
353 "LOADLIBES=$(LOADLIBES)" \
354 "LDFLAGS=$(LDFLAGS)" \
356 "MAKEINFO=$(MAKEINFO)" \
363 if
[ -d
$(unsubdir
)/byacc
] ; then \
364 (cd
$(unsubdir
)/byacc
$(subdir
); \
366 "against=$(against)" \
368 "AR_FLAGS=$(AR_FLAGS)" \
371 "LOADLIBES=$(LOADLIBES)" \
372 "LDFLAGS=$(LDFLAGS)" \
374 "MAKEINFO=$(MAKEINFO)" \
381 if
[ -d
$(unsubdir
)/byacc
] ; then \
382 (cd
$(unsubdir
)/byacc
$(subdir
); \
384 "against=$(against)" \
386 "AR_FLAGS=$(AR_FLAGS)" \
389 "LOADLIBES=$(LOADLIBES)" \
390 "LDFLAGS=$(LDFLAGS)" \
392 "MAKEINFO=$(MAKEINFO)" \
399 .PHONY
: all-bison just-bison
400 all-bison
: just-bison
401 just-bison
: just-libiberty
force
402 if
[ -d
$(unsubdir
)/bison
] ; then \
403 (cd
$(unsubdir
)/bison
$(subdir
); \
405 "against=$(against)" \
407 "AR_FLAGS=$(AR_FLAGS)" \
410 "LOADLIBES=$(LOADLIBES)" \
411 "LDFLAGS=$(LDFLAGS)" \
413 "MAKEINFO=$(MAKEINFO)" \
420 if
[ -d
$(unsubdir
)/bison
] ; then \
421 (cd
$(unsubdir
)/bison
$(subdir
); \
423 "against=$(against)" \
425 "AR_FLAGS=$(AR_FLAGS)" \
428 "LOADLIBES=$(LOADLIBES)" \
429 "LDFLAGS=$(LDFLAGS)" \
431 "MAKEINFO=$(MAKEINFO)" \
438 if
[ -d
$(unsubdir
)/bison
] ; then \
439 (cd
$(unsubdir
)/bison
$(subdir
); \
441 "against=$(against)" \
443 "AR_FLAGS=$(AR_FLAGS)" \
446 "LOADLIBES=$(LOADLIBES)" \
447 "LDFLAGS=$(LDFLAGS)" \
449 "MAKEINFO=$(MAKEINFO)" \
456 .PHONY
: all-gcc just-gcc
458 just-gcc
: just-libiberty just-bison
force
459 if
[ -d
$(unsubdir
)/gcc
] ; then \
460 (cd
$(unsubdir
)/gcc
$(subdir
); \
462 "against=$(against)" \
464 "AR_FLAGS=$(AR_FLAGS)" \
467 "LOADLIBES=$(LOADLIBES)" \
468 "LDFLAGS=$(LDFLAGS)" \
470 "MAKEINFO=$(MAKEINFO)" \
477 if
[ -d
$(unsubdir
)/gcc
] ; then \
478 (cd
$(unsubdir
)/gcc
$(subdir
); \
480 "against=$(against)" \
482 "AR_FLAGS=$(AR_FLAGS)" \
485 "LOADLIBES=$(LOADLIBES)" \
486 "LDFLAGS=$(LDFLAGS)" \
488 "MAKEINFO=$(MAKEINFO)" \
495 if
[ -d
$(unsubdir
)/gcc
] ; then \
496 (cd
$(unsubdir
)/gcc
$(subdir
); \
498 "against=$(against)" \
500 "AR_FLAGS=$(AR_FLAGS)" \
503 "LOADLIBES=$(LOADLIBES)" \
504 "LDFLAGS=$(LDFLAGS)" \
506 "MAKEINFO=$(MAKEINFO)" \
513 .PHONY
: all-readline just-readline
514 all-readline
: just-readline
516 if
[ -d
$(unsubdir
)/readline
] ; then \
517 (cd
$(unsubdir
)/readline
$(subdir
); \
519 "against=$(against)" \
521 "AR_FLAGS=$(AR_FLAGS)" \
524 "LOADLIBES=$(LOADLIBES)" \
525 "LDFLAGS=$(LDFLAGS)" \
527 "MAKEINFO=$(MAKEINFO)" \
533 clean-readline
: force
534 if
[ -d
$(unsubdir
)/readline
] ; then \
535 (cd
$(unsubdir
)/readline
$(subdir
); \
537 "against=$(against)" \
539 "AR_FLAGS=$(AR_FLAGS)" \
542 "LOADLIBES=$(LOADLIBES)" \
543 "LDFLAGS=$(LDFLAGS)" \
545 "MAKEINFO=$(MAKEINFO)" \
551 install-readline
: force
552 if
[ -d
$(unsubdir
)/readline
] ; then \
553 (cd
$(unsubdir
)/readline
$(subdir
); \
555 "against=$(against)" \
557 "AR_FLAGS=$(AR_FLAGS)" \
560 "LOADLIBES=$(LOADLIBES)" \
561 "LDFLAGS=$(LDFLAGS)" \
563 "MAKEINFO=$(MAKEINFO)" \
570 .PHONY
: all-glob just-glob
573 if
[ -d
$(unsubdir
)/glob
] ; then \
574 (cd
$(unsubdir
)/glob
$(subdir
); \
576 "against=$(against)" \
578 "AR_FLAGS=$(AR_FLAGS)" \
581 "LOADLIBES=$(LOADLIBES)" \
582 "LDFLAGS=$(LDFLAGS)" \
584 "MAKEINFO=$(MAKEINFO)" \
591 if
[ -d
$(unsubdir
)/glob
] ; then \
592 (cd
$(unsubdir
)/glob
$(subdir
); \
594 "against=$(against)" \
596 "AR_FLAGS=$(AR_FLAGS)" \
599 "LOADLIBES=$(LOADLIBES)" \
600 "LDFLAGS=$(LDFLAGS)" \
602 "MAKEINFO=$(MAKEINFO)" \
609 if
[ -d
$(unsubdir
)/glob
] ; then \
610 (cd
$(unsubdir
)/glob
$(subdir
); \
612 "against=$(against)" \
614 "AR_FLAGS=$(AR_FLAGS)" \
617 "LOADLIBES=$(LOADLIBES)" \
618 "LDFLAGS=$(LDFLAGS)" \
620 "MAKEINFO=$(MAKEINFO)" \
627 .PHONY
: all-gas just-gas
629 just-gas
: just-libiberty just-bfd
force
630 if
[ -d
$(unsubdir
)/gas
] ; then \
631 (cd
$(unsubdir
)/gas
$(subdir
); \
633 "against=$(against)" \
635 "AR_FLAGS=$(AR_FLAGS)" \
638 "LOADLIBES=$(LOADLIBES)" \
639 "LDFLAGS=$(LDFLAGS)" \
641 "MAKEINFO=$(MAKEINFO)" \
648 if
[ -d
$(unsubdir
)/gas
] ; then \
649 (cd
$(unsubdir
)/gas
$(subdir
); \
651 "against=$(against)" \
653 "AR_FLAGS=$(AR_FLAGS)" \
656 "LOADLIBES=$(LOADLIBES)" \
657 "LDFLAGS=$(LDFLAGS)" \
659 "MAKEINFO=$(MAKEINFO)" \
666 if
[ -d
$(unsubdir
)/gas
] ; then \
667 (cd
$(unsubdir
)/gas
$(subdir
); \
669 "against=$(against)" \
671 "AR_FLAGS=$(AR_FLAGS)" \
674 "LOADLIBES=$(LOADLIBES)" \
675 "LDFLAGS=$(LDFLAGS)" \
677 "MAKEINFO=$(MAKEINFO)" \
684 .PHONY
: all-ld just-ld
686 just-ld
: just-libiberty just-bfd just-bison
force
687 if
[ -d
$(unsubdir
)/ld ] ; then \
688 (cd
$(unsubdir
)/ld$(subdir
); \
690 "against=$(against)" \
692 "AR_FLAGS=$(AR_FLAGS)" \
695 "LOADLIBES=$(LOADLIBES)" \
696 "LDFLAGS=$(LDFLAGS)" \
698 "MAKEINFO=$(MAKEINFO)" \
705 if
[ -d
$(unsubdir
)/ld ] ; then \
706 (cd
$(unsubdir
)/ld$(subdir
); \
708 "against=$(against)" \
710 "AR_FLAGS=$(AR_FLAGS)" \
713 "LOADLIBES=$(LOADLIBES)" \
714 "LDFLAGS=$(LDFLAGS)" \
716 "MAKEINFO=$(MAKEINFO)" \
723 if
[ -d
$(unsubdir
)/ld ] ; then \
724 (cd
$(unsubdir
)/ld$(subdir
); \
726 "against=$(against)" \
728 "AR_FLAGS=$(AR_FLAGS)" \
731 "LOADLIBES=$(LOADLIBES)" \
732 "LDFLAGS=$(LDFLAGS)" \
734 "MAKEINFO=$(MAKEINFO)" \
741 .PHONY
: all-gnulib just-gnulib
742 all-gnulib
: just-gnulib
743 just-gnulib
: all-gcc all-gas all-binutils
force
744 if
[ -d
$(unsubdir
)/gnulib
] ; then \
745 (cd
$(unsubdir
)/gnulib
$(subdir
); \
747 "against=$(against)" \
749 "AR_FLAGS=$(AR_FLAGS)" \
752 "LOADLIBES=$(LOADLIBES)" \
753 "LDFLAGS=$(LDFLAGS)" \
755 "MAKEINFO=$(MAKEINFO)" \
762 if
[ -d
$(unsubdir
)/gnulib
] ; then \
763 (cd
$(unsubdir
)/gnulib
$(subdir
); \
765 "against=$(against)" \
767 "AR_FLAGS=$(AR_FLAGS)" \
770 "LOADLIBES=$(LOADLIBES)" \
771 "LDFLAGS=$(LDFLAGS)" \
773 "MAKEINFO=$(MAKEINFO)" \
779 install-gnulib
: force
780 if
[ -d
$(unsubdir
)/gnulib
] ; then \
781 (cd
$(unsubdir
)/gnulib
$(subdir
); \
783 "against=$(against)" \
785 "AR_FLAGS=$(AR_FLAGS)" \
788 "LOADLIBES=$(LOADLIBES)" \
789 "LDFLAGS=$(LDFLAGS)" \
791 "MAKEINFO=$(MAKEINFO)" \
798 .PHONY
: all-gdb just-gdb
800 just-gdb
: just-bfd just-libiberty just-readline just-glob just-bison
force
801 if
[ -d
$(unsubdir
)/gdb
] ; then \
802 (cd
$(unsubdir
)/gdb
$(subdir
); \
804 "against=$(against)" \
806 "AR_FLAGS=$(AR_FLAGS)" \
809 "LOADLIBES=$(LOADLIBES)" \
810 "LDFLAGS=$(LDFLAGS)" \
812 "MAKEINFO=$(MAKEINFO)" \
819 if
[ -d
$(unsubdir
)/gdb
] ; then \
820 (cd
$(unsubdir
)/gdb
$(subdir
); \
822 "against=$(against)" \
824 "AR_FLAGS=$(AR_FLAGS)" \
827 "LOADLIBES=$(LOADLIBES)" \
828 "LDFLAGS=$(LDFLAGS)" \
830 "MAKEINFO=$(MAKEINFO)" \
837 if
[ -d
$(unsubdir
)/gdb
] ; then \
838 (cd
$(unsubdir
)/gdb
$(subdir
); \
840 "against=$(against)" \
842 "AR_FLAGS=$(AR_FLAGS)" \
845 "LOADLIBES=$(LOADLIBES)" \
846 "LDFLAGS=$(LDFLAGS)" \
848 "MAKEINFO=$(MAKEINFO)" \
855 .PHONY
: all-make just-make
857 just-make
: all-libiberty
force
858 if
[ -d
$(unsubdir
)/make
] ; then \
859 (cd
$(unsubdir
)/make
$(subdir
); \
861 "against=$(against)" \
863 "AR_FLAGS=$(AR_FLAGS)" \
866 "LOADLIBES=$(LOADLIBES)" \
867 "LDFLAGS=$(LDFLAGS)" \
869 "MAKEINFO=$(MAKEINFO)" \
876 if
[ -d
$(unsubdir
)/make
] ; then \
877 (cd
$(unsubdir
)/make
$(subdir
); \
879 "against=$(against)" \
881 "AR_FLAGS=$(AR_FLAGS)" \
884 "LOADLIBES=$(LOADLIBES)" \
885 "LDFLAGS=$(LDFLAGS)" \
887 "MAKEINFO=$(MAKEINFO)" \
894 if
[ -d
$(unsubdir
)/make
] ; then \
895 (cd
$(unsubdir
)/make
$(subdir
); \
897 "against=$(against)" \
899 "AR_FLAGS=$(AR_FLAGS)" \
902 "LOADLIBES=$(LOADLIBES)" \
903 "LDFLAGS=$(LDFLAGS)" \
905 "MAKEINFO=$(MAKEINFO)" \
912 .PHONY
: all-diff just-diff
915 if
[ -d
$(unsubdir
)/diff
] ; then \
916 (cd
$(unsubdir
)/diff
$(subdir
); \
918 "against=$(against)" \
920 "AR_FLAGS=$(AR_FLAGS)" \
923 "LOADLIBES=$(LOADLIBES)" \
924 "LDFLAGS=$(LDFLAGS)" \
926 "MAKEINFO=$(MAKEINFO)" \
933 if
[ -d
$(unsubdir
)/diff
] ; then \
934 (cd
$(unsubdir
)/diff
$(subdir
); \
936 "against=$(against)" \
938 "AR_FLAGS=$(AR_FLAGS)" \
941 "LOADLIBES=$(LOADLIBES)" \
942 "LDFLAGS=$(LDFLAGS)" \
944 "MAKEINFO=$(MAKEINFO)" \
951 if
[ -d
$(unsubdir
)/diff
] ; then \
952 (cd
$(unsubdir
)/diff
/$(subdir
); \
954 "against=$(against)" \
956 "AR_FLAGS=$(AR_FLAGS)" \
959 "LOADLIBES=$(LOADLIBES)" \
960 "LDFLAGS=$(LDFLAGS)" \
962 "MAKEINFO=$(MAKEINFO)" \
969 .PHONY
: all-grep just-grep
972 if
[ -d
$(unsubdir
)/grep
] ; then \
973 (cd
$(unsubdir
)/grep
$(subdir
); \
975 "against=$(against)" \
977 "AR_FLAGS=$(AR_FLAGS)" \
980 "LOADLIBES=$(LOADLIBES)" \
981 "LDFLAGS=$(LDFLAGS)" \
983 "MAKEINFO=$(MAKEINFO)" \
990 if
[ -d
$(unsubdir
)/grep
] ; then \
991 (cd
$(unsubdir
)/grep
$(subdir
); \
993 "against=$(against)" \
995 "AR_FLAGS=$(AR_FLAGS)" \
998 "LOADLIBES=$(LOADLIBES)" \
999 "LDFLAGS=$(LDFLAGS)" \
1001 "MAKEINFO=$(MAKEINFO)" \
1008 if
[ -d
$(unsubdir
)/grep
] ; then \
1009 (cd
$(unsubdir
)/grep
$(subdir
); \
1011 "against=$(against)" \
1013 "AR_FLAGS=$(AR_FLAGS)" \
1015 "RANLIB=$(RANLIB)" \
1016 "LOADLIBES=$(LOADLIBES)" \
1017 "LDFLAGS=$(LDFLAGS)" \
1019 "MAKEINFO=$(MAKEINFO)" \
1026 .PHONY
: all-rcs just-rcs
1028 just-rcs
: just-diff just-grep
force
1029 if
[ -d
$(unsubdir
)/rcs
] ; then \
1030 (cd
$(unsubdir
)/rcs
$(subdir
); \
1032 "against=$(against)" \
1034 "AR_FLAGS=$(AR_FLAGS)" \
1036 "RANLIB=$(RANLIB)" \
1037 "LOADLIBES=$(LOADLIBES)" \
1038 "LDFLAGS=$(LDFLAGS)" \
1040 "MAKEINFO=$(MAKEINFO)" \
1047 if
[ -d
$(unsubdir
)/rcs
] ; then \
1048 (cd
$(unsubdir
)/rcs
$(subdir
); \
1050 "against=$(against)" \
1052 "AR_FLAGS=$(AR_FLAGS)" \
1054 "RANLIB=$(RANLIB)" \
1055 "LOADLIBES=$(LOADLIBES)" \
1056 "LDFLAGS=$(LDFLAGS)" \
1058 "MAKEINFO=$(MAKEINFO)" \
1064 install-rcs
: install-grep install-diff
force
1065 if
[ -d
$(unsubdir
)/rcs
] ; then \
1066 (cd
$(unsubdir
)/rcs
$(subdir
); \
1068 "against=$(against)" \
1070 "AR_FLAGS=$(AR_FLAGS)" \
1072 "RANLIB=$(RANLIB)" \
1073 "LOADLIBES=$(LOADLIBES)" \
1074 "LDFLAGS=$(LDFLAGS)" \
1076 "MAKEINFO=$(MAKEINFO)" \
1083 .PHONY
: all-gdbm just-gdbm
1086 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1087 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1089 "against=$(against)" \
1091 "AR_FLAGS=$(AR_FLAGS)" \
1093 "RANLIB=$(RANLIB)" \
1094 "LOADLIBES=$(LOADLIBES)" \
1095 "LDFLAGS=$(LDFLAGS)" \
1097 "MAKEINFO=$(MAKEINFO)" \
1104 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1105 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1107 "against=$(against)" \
1109 "AR_FLAGS=$(AR_FLAGS)" \
1111 "RANLIB=$(RANLIB)" \
1112 "LOADLIBES=$(LOADLIBES)" \
1113 "LDFLAGS=$(LDFLAGS)" \
1115 "MAKEINFO=$(MAKEINFO)" \
1122 if
[ -d
$(unsubdir
)/gdbm
] ; then \
1123 (cd
$(unsubdir
)/gdbm
$(subdir
); \
1125 "against=$(against)" \
1127 "AR_FLAGS=$(AR_FLAGS)" \
1129 "RANLIB=$(RANLIB)" \
1130 "LOADLIBES=$(LOADLIBES)" \
1131 "LDFLAGS=$(LDFLAGS)" \
1133 "MAKEINFO=$(MAKEINFO)" \
1140 .PHONY
: all-cvs just-cvs
1141 all-cvs
: just-cvs just-rcs just-grep just-diff
1142 just-cvs
: just-gdbm
force
1143 if
[ -d
$(unsubdir
)/cvs
] ; then \
1144 (cd
$(unsubdir
)/cvs
$(subdir
); \
1146 "against=$(against)" \
1148 "AR_FLAGS=$(AR_FLAGS)" \
1150 "RANLIB=$(RANLIB)" \
1151 "LOADLIBES=$(LOADLIBES)" \
1152 "LDFLAGS=$(LDFLAGS)" \
1154 "MAKEINFO=$(MAKEINFO)" \
1161 if
[ -d
$(unsubdir
)/cvs
] ; then \
1162 (cd
$(unsubdir
)/cvs
$(subdir
); \
1164 "against=$(against)" \
1166 "AR_FLAGS=$(AR_FLAGS)" \
1168 "RANLIB=$(RANLIB)" \
1169 "LOADLIBES=$(LOADLIBES)" \
1170 "LDFLAGS=$(LDFLAGS)" \
1172 "MAKEINFO=$(MAKEINFO)" \
1178 install-cvs
: install-rcs install-gdbm
force
1179 if
[ -d
$(unsubdir
)/cvs
] ; then \
1180 (cd
$(unsubdir
)/cvs
$(subdir
); \
1182 "against=$(against)" \
1184 "AR_FLAGS=$(AR_FLAGS)" \
1186 "RANLIB=$(RANLIB)" \
1187 "LOADLIBES=$(LOADLIBES)" \
1188 "LDFLAGS=$(LDFLAGS)" \
1190 "MAKEINFO=$(MAKEINFO)" \
1197 .PHONY
: all-emacs just-emacs
1198 all-emacs
: just-emacs
1200 if
[ -d
$(unsubdir
)/emacs
] ; then \
1201 (cd
$(unsubdir
)/emacs
$(subdir
); \
1203 "against=$(against)" \
1205 "AR_FLAGS=$(AR_FLAGS)" \
1207 "RANLIB=$(RANLIB)" \
1208 "LOADLIBES=$(LOADLIBES)" \
1209 "LDFLAGS=$(LDFLAGS)" \
1211 "MAKEINFO=$(MAKEINFO)" \
1218 if
[ -d
$(unsubdir
)/emacs
] ; then \
1219 (cd
$(unsubdir
)/emacs
$(subdir
); \
1221 "against=$(against)" \
1223 "AR_FLAGS=$(AR_FLAGS)" \
1225 "RANLIB=$(RANLIB)" \
1226 "LOADLIBES=$(LOADLIBES)" \
1227 "LDFLAGS=$(LDFLAGS)" \
1229 "MAKEINFO=$(MAKEINFO)" \
1235 install-emacs
: install-rcs install-gdbm
force
1236 if
[ -d
$(unsubdir
)/emacs
] ; then \
1237 (cd
$(unsubdir
)/emacs
$(subdir
); \
1239 "against=$(against)" \
1241 "AR_FLAGS=$(AR_FLAGS)" \
1243 "RANLIB=$(RANLIB)" \
1244 "LOADLIBES=$(LOADLIBES)" \
1245 "LDFLAGS=$(LDFLAGS)" \
1247 "MAKEINFO=$(MAKEINFO)" \
1254 .PHONY
: all-ispell just-ispell
1255 all-ispell
: just-ispell
1256 just-ispell
: all-emacs
force
1257 if
[ -d
$(unsubdir
)/ispell
] ; then \
1258 (cd
$(unsubdir
)/ispell
$(subdir
); \
1260 "against=$(against)" \
1262 "AR_FLAGS=$(AR_FLAGS)" \
1264 "RANLIB=$(RANLIB)" \
1265 "LOADLIBES=$(LOADLIBES)" \
1266 "LDFLAGS=$(LDFLAGS)" \
1268 "MAKEINFO=$(MAKEINFO)" \
1275 if
[ -d
$(unsubdir
)/ispell
] ; then \
1276 (cd
$(unsubdir
)/ispell
$(subdir
); \
1278 "against=$(against)" \
1280 "AR_FLAGS=$(AR_FLAGS)" \
1282 "RANLIB=$(RANLIB)" \
1283 "LOADLIBES=$(LOADLIBES)" \
1284 "LDFLAGS=$(LDFLAGS)" \
1286 "MAKEINFO=$(MAKEINFO)" \
1292 install-ispell
: install-rcs install-gdbm
force
1293 if
[ -d
$(unsubdir
)/ispell
] ; then \
1294 (cd
$(unsubdir
)/ispell
$(subdir
); \
1296 "against=$(against)" \
1298 "AR_FLAGS=$(AR_FLAGS)" \
1300 "RANLIB=$(RANLIB)" \
1301 "LOADLIBES=$(LOADLIBES)" \
1302 "LDFLAGS=$(LDFLAGS)" \
1304 "MAKEINFO=$(MAKEINFO)" \
1310 ### other supporting targets
1311 # this is a bad hack.
1312 all.xclib
: all.normal
1313 if
[ -d clib
] ; then \
1314 (cd clib
; $(MAKE
)) ; \
1318 for i in
$(DODIRS
); do \
1319 if
[ -f
$(unsubdir
)/$$i/localenv
] ; then \
1320 if
(cd
$(unsubdir
)/$$i$(subdir
); \
1322 "against=$(against)" \
1324 "MAKEINFO=$(MAKEINFO)" \
1325 $(DO
)) ; then true
; \
1326 else exit
1 ; fi
; \
1327 else if
[ -d
$(unsubdir
)/$$i ] ; then \
1328 if
(cd
$(unsubdir
)/$$i$(subdir
); \
1330 "against=$(against)" \
1332 "AR_FLAGS=$(AR_FLAGS)" \
1334 "RANLIB=$(RANLIB)" \
1335 "LOADLIBES=$(LOADLIBES)" \
1336 "LDFLAGS=$(LDFLAGS)" \
1338 "MAKEINFO=$(MAKEINFO)" \
1339 $(DO
)) ; then true
; \
1340 else exit
1 ; fi
; \
1348 $(MAKE
) pass
"stagepass=stage1"
1350 $(MAKE
) pass
"stagepass=stage2"
1354 $(MAKE
) pass
"stagepass=stage1"
1356 $(MAKE
) pass
"stagepass=stage2"
1360 $(MAKE
) pass
"stagepass=stage2"
1364 cp
$(srcdir)/gcc
/gstdarg.h
$(unsubdir
)/gas
$(subdir
)/stdarg.h
1365 $(MAKE
) subdir_do
"DO=all info" "DODIRS=$(SUBDIRS)" \
1366 "CC=`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/gcc \
1367 -O $(GCCVERBOSE) -I`pwd`/$(unsubdir)/gcc$(subdir)/include \
1368 -B`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/ \
1369 -B`pwd`/$(unsubdir)/gas$(subdir)/$(stagepass)/ \
1370 -B`pwd`/$(unsubdir)/ld$(subdir)/$(stagepass)/" \
1371 "AR=`pwd`/$(unsubdir)/binutils$(subdir)/$(stagepass)/ar" \
1372 "LD=`pwd`/$(unsubdir)/gcc$(subdir)/$(stagepass)/gcc $(GCCVERBOSE)" \
1373 "RANLIB=`pwd`/$(unsubdir)/binutils$(subdir)/$(stagepass)/ranlib" \
1374 "LOADLIBES=`pwd`/$(unsubdir)/gnulib$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \
1375 "LDFLAGS=-nostdlib /lib/crt0.o \
1376 -L`pwd`/$(unsubdir)/gnulib$(subdir)/$(stagepass)/ \
1377 -B`pwd`/$(unsubdir)/ld$(subdir)/$(stagepass)/"
1381 $(MAKE
) subdir_do DO
=stage1
"DODIRS=$(SUBDIRS)"
1384 $(MAKE
) subdir_do DO
=stage2
"DODIRS=$(SUBDIRS)"
1387 $(MAKE
) subdir_do DO
=stage3
"DODIRS=$(SUBDIRS)"
1390 $(MAKE
) subdir_do DO
=stage4
"DODIRS=$(SUBDIRS)"
1394 comparison
:; $(MAKE
) subdir_do DO
=comparison against
=$(against
) "DODIRS=$(SUBDIRS)"
1396 de-stage1
:; $(MAKE
) subdir_do DO
=de-stage1
"DODIRS=$(SUBDIRS)"
1397 de-stage2
:; $(MAKE
) subdir_do DO
=de-stage2
"DODIRS=$(SUBDIRS)"
1398 de-stage3
:; $(MAKE
) subdir_do DO
=de-stage3
"DODIRS=$(SUBDIRS)"
1399 de-stage4
:; $(MAKE
) subdir_do DO
=de-stage4
"DODIRS=$(SUBDIRS)"
1401 # The "else true" stuff is for Ultrix; the shell returns the exit code
1402 # of the "if" command, if no commands are run in the "then" or "else" part,
1403 # causing Make to quit.
1424 for i in
$(MAKEDIRS
) ; do \
1425 echo Making
$$i...
; \
1426 if
[ -d
$$i ] ; then true
; else mkdir
$$i || exit
1 ; fi
; \
1433 install-info-dirs
: force
1434 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1435 if
[ -d
$(datadir) ] ; then true
; else mkdir
$(datadir) ; fi
1436 if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1439 $(srcdir)/texinfo
/gen-info-dir
$(infodir) > dir.
info.new
1440 mv
-f
dir.
info.new
dir.
info
1449 @for i in
$(SUBDIRS
); \
1453 wd
=`basename $$pwd`; \
1454 for j in
`$(MAKE) ls`; \
1462 # with the gnu make, this is done automatically.
1464 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1465 $(SHELL
) .
/config.status
1468 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1470 DEVO_SUPPORT
= README DOC.configure Makefile.in configure configure.in \
1472 GDB_SUPPORT_DIRS
= bfd
include libiberty readline glob
1473 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
) texinfo
/fsf
/texinfo.
tex
1475 setup-dirs
: force_update
1478 .
/configure
-rm sun4
1479 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1481 bfd.ilrt.
tar.Z
: setup-dirs
1482 rm -f bfd.ilrt.
tar.Z
1483 tar cf
- $(DEVO_SUPPORT
) $(GDB_SUPPORT_FILES
) \
1484 | compress
-v
>bfd.ilrt.
tar.Z
1486 gdb.
tar.Z
: setup-dirs
1487 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1488 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1490 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/fsf
/texinfo.
tex
1491 rm -rf proto-toplev
; mkdir proto-toplev
1492 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1493 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1496 # Take out texinfo from configurable dirs
1497 rm proto-toplev
/configure.in
1498 sed
'/^configdirs=/s/texinfo //' <configure.in
>proto-toplev
/configure.in
1499 # Take out glob from buildable dirs
1500 rm proto-toplev
/Makefile.in
1501 sed
'/^SUBDIRS =/s/glob //' <Makefile.in
>proto-toplev
/Makefile.in
1502 mkdir proto-toplev
/texinfo
1503 mkdir proto-toplev
/texinfo
/fsf
1504 ln
-s ..
/..
/..
/texinfo
/fsf
/texinfo.
tex proto-toplev
/texinfo
/fsf
/
1505 chmod og
=u
`find proto-toplev -print`
1506 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1507 echo
"==> Making gdb-$$VER.tar.Z"; \
1508 ln
-s proto-toplev gdb-
$$VER; \
1509 tar cfh
- gdb-
$$VER \
1510 | compress
-v
>gdb-
$$VER.
tar.Z
)
1516 # end of Makefile.in