2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992 Free Software Foundation
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 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
29 program_transform_name
=
31 datadir = $(prefix)/lib
32 mandir = $(prefix)/man
33 man1dir = $(mandir)/man1
34 man2dir = $(mandir)/man2
35 man3dir = $(mandir)/man3
36 man4dir = $(mandir)/man4
37 man5dir = $(mandir)/man5
38 man6dir = $(mandir)/man6
39 man7dir = $(mandir)/man7
40 man8dir = $(mandir)/man8
41 man9dir = $(mandir)/man9
42 infodir = $(prefix)/info
43 includedir = $(prefix)/include
44 docdir
= $(datadir)/doc
49 INSTALL_PROGRAM
= $(INSTALL
)
50 INSTALL_DATA
= $(INSTALL
)
57 $(start-sanitize-chill
)
58 CHILLFLAGS
= $(CFLAGS
)
66 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
67 then echo $${rootme}/byacc/byacc ; \
71 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
72 then echo $${rootme}/flex/flex ; \
75 MAKEINFO
= `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
76 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
77 else echo makeinfo ; fi`
80 # libraries that may need to be augmented on a system-by-system basis
83 # compilers to use to create programs which must be run in the build
86 CXX_FOR_BUILD
= $(CXX
)
88 SUBDIRS
= "this is set via configure, don't edit this"
92 INSTALL_TARGET
= install.
all
98 if [ -f $${rootme}/gcc/Makefile ] ; then \
99 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
101 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
104 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
109 if [ -f $${rootme}/gcc/Makefile ] ; then \
110 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
112 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
115 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
119 $(start-sanitize-chill
)
120 CHILL_FOR_TARGET
= ` \
121 if [ -f $${rootme}/gcc/Makefile ] ; then \
122 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
124 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
127 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
130 $(end-sanitize-chill
)
133 if [ -f $${rootme}/gcc/Makefile ] ; then \
134 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
136 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
139 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
144 if [ -f $${rootme}/gas/Makefile ] ; then \
145 echo $${rootme}/gas/as.new ; \
147 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
150 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
155 if [ -f $${rootme}/binutils/Makefile ] ; then \
156 echo $${rootme}/binutils/ar ; \
158 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
161 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
165 RANLIB_FOR_TARGET
= ` \
166 if [ -f $${rootme}/binutils/Makefile ] ; then \
167 echo $${rootme}/binutils/ranlib ; \
169 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
172 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
177 if [ -f $${rootme}/binutils/Makefile ] ; then \
178 echo $${rootme}/binutils/nm ; \
180 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
183 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
187 # FIXME: This is badly named.
189 if [ -f $${rootme}/gcc/Makefile ] ; then \
190 if [ -f $${rootme}/newlib/Makefile ] ; then \
191 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
193 echo -I$${rootme}/gcc/include ; \
200 #### host and target specific makefile fragments come in here.
203 # Flags to pass down to all sub-makes.
204 # Please keep these in alphabetical order.
205 BASE_FLAGS_TO_PASS
= \
206 "AR_FLAGS=$(AR_FLAGS)" \
207 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
208 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
210 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
211 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
213 $(start-sanitize-chill
)\
214 "CHILLFLAGS=$(CHILLFLAGS)" \
215 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
216 "CHILL_LIB=$(CHILL_LIB)" \
217 $(end-sanitize-chill
)\
218 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
219 "CXXFLAGS=$(CXXFLAGS)" \
220 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
221 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
222 "INSTALL=$(INSTALL)" \
223 "INSTALL_DATA=$(INSTALL_DATA)" \
224 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
225 "LDFLAGS=$(LDFLAGS)" \
227 "LOADLIBES=$(LOADLIBES)" \
228 "MAKEINFO=$(MAKEINFO)" \
229 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
230 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
231 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
232 "exec_prefix=$(exec_prefix)" \
236 # Flags to pass down to most sub-makes, in which we're building with
237 # the host environment.
238 # If any variables are added here, they must be added to do-*, below.
248 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
250 # Flags that are concerned with the location of the X11 include files
252 X11_FLAGS_TO_PASS
= \
253 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
254 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
257 # Shell case of subdirectories which are built with the target environment.
258 TARGET_LIBS
=libg
++ | xiberty | newlib
259 $(start-sanitize-chill
)
260 TARGET_LIBS
=libg
++ | xiberty | newlib | chillrt
261 $(end-sanitize-chill
)
263 # Flags to pass down to makes which are built with the target environment.
264 # The double $ decreases the length of the command line; the variables
265 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
266 # If any variables are added here, they must be added to do-*, below.
267 EXTRA_TARGET_FLAGS
= \
268 'AR=$$(AR_FOR_TARGET)' \
269 'AS=$$(AS_FOR_TARGET)' \
270 'CC=$$(CC_FOR_TARGET)' \
271 'CXX=$$(CXX_FOR_TARGET)' \
272 'NM=$$(NM_FOR_TARGET)' \
273 'RANLIB=$$(RANLIB_FOR_TARGET)' \
274 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
276 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
278 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
279 # unfortunately needs the native compiler and the target ar and
281 # If any variables are added here, they must be added to do-*, below.
283 'AR=$$(AR_FOR_TARGET)' \
288 'RANLIB=$$(RANLIB_FOR_TARGET)' \
291 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
293 # The first rule in the file had better be this one. Don't put any above it.
296 .PHONY
: all check dvi info install-info install-info-dirs
297 .PHONY
: do-info do-check do-dvi do-install-info
298 .PHONY
: do-clean do-mostlyclean do-distclean do-realclean
301 # Do a target for all the subdirectories. A ``make do-X'' will do a
302 # ``make X'' in all subdirectories (because, in general, X depends on
303 # fdo-X, a ``make X'' will also do this, but it may do additional work
305 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
306 # because it is so large that it can easily overflow the command line
307 # length limit on some systems.
308 do-info do-check do-dvi do-install-info do-clean do-mostlyclean do-distclean do-realclean
:
309 @target
=`echo $@ | sed -e 's/^do-//'`; \
310 rootme
=`pwd`; export rootme
; \
311 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
312 for i in
$(SUBDIRS
); do \
313 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
]; then \
316 for flag in
$(EXTRA_TARGET_FLAGS
); do \
317 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
321 for flag in
$(EXTRA_GCC_FLAGS
); do \
322 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
326 for flag in
$(EXTRA_HOST_FLAGS
); do \
327 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
331 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
333 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
334 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
335 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
337 then true
; else exit
1; fi
; \
345 install-info
: install-info-dirs do-install-info
dir.
info
346 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
348 do-install-info
: install-info-dirs
350 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
351 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
352 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
353 all-make all-rcs all-cvs all-diff all-grep \
354 all-patch all-emacs all-ispell all-etc \
355 all-tcl all-tk all-expect \
357 $(start-sanitize-chill
) \
359 $(end-sanitize-chill
) \
360 all-gprof all-send_pr all-libm all-deja-gnu \
361 all-fileutils all-find all-gawk all-sed all-shellutils \
362 all-textutils all-time all-wdiff all-uudecode
365 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
366 all-opcodes all-bfd all-readline all-sim \
367 all-gdb all-binutils all-gcc all-newlib \
368 $(start-sanitize-chill
) \
370 $(end-sanitize-chill
) \
373 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
376 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
379 -rm -f Makefile config.status
381 clean: do-clean local-clean
382 mostlyclean: do-mostlyclean local-clean
383 distclean: do-distclean local-clean local-distclean
384 realclean: do-realclean local-clean local-distclean
387 @echo
"the uninstall target is not supported in this tree"
389 install: $(INSTALL_TARGET
)
390 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
391 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
392 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
394 install.
all: install-no-fixedincludes
395 @if
[ -f .
/gcc
/Makefile
] ; then \
396 rootme
=`pwd` ; export rootme
; \
398 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
403 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
429 $(start-sanitize-chill
) \
431 $(end-sanitize-chill
) \
440 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
441 install-textutils install-time install-wdiff install-uudecode
444 # Install the gcc headers files, but not the fixed include files,
445 # which we are not allowed to distribute. This rule is very dependent
446 # on the workings of the gcc Makefile.in.
448 gcc-no-fixedincludes
:
449 @if
[ -f .
/gcc
/Makefile
]; then \
450 rm -rf gcc
/tmp-include
; \
451 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
453 touch gcc
/stmp-fixincludes
; \
454 rm -f gcc
/stmp-headers
; \
455 rootme
=`pwd`; export rootme
; \
456 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
458 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
459 rm -rf gcc
/include; \
460 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
463 install.cross
: install-dirs install-libiberty install-mmalloc \
464 install-binutils install-opcodes install-byacc install-flex \
465 install-ld install-gas install-readline \
466 install-glob install-gdb install-mmalloc \
468 $(start-sanitize-chill
) \
470 $(end-sanitize-chill
) \
471 install-gcc install-etc install-deja-gnu
475 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
476 rootme
=`pwd` ; export rootme
; \
477 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
482 install-deja-gnu
: force
483 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
484 rootme
=`pwd` ; export rootme
; \
485 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
492 @if
[ -f .
/autoconf
/Makefile
] ; then \
493 rootme
=`pwd` ; export rootme
; \
494 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
499 install-autoconf
: force
500 @if
[ -f .
/autoconf
/Makefile
] ; then \
501 rootme
=`pwd` ; export rootme
; \
502 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
509 @if
[ -f .
/etc
/Makefile
] ; then \
510 rootme
=`pwd` ; export rootme
; \
511 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
517 @if
[ -f .
/etc
/Makefile
] ; then \
518 rootme
=`pwd` ; export rootme
; \
519 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
526 @if
[ -f .
/libiberty
/Makefile
] ; then \
527 rootme
=`pwd` ; export rootme
; \
529 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
534 install-libiberty
: force
535 @if
[ -f .
/libiberty
/Makefile
] ; then \
536 rootme
=`pwd` ; export rootme
; \
538 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
544 all-xiberty
: all-gcc all-newlib
545 @if
[ -f .
/xiberty
/Makefile
] ; then \
546 rootme
=`pwd` ; export rootme
; \
547 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
549 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
554 install-xiberty
: force
555 @if
[ -f .
/xiberty
/Makefile
] ; then \
556 rootme
=`pwd` ; export rootme
; \
557 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
559 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
566 @if
[ -f .
/mmalloc
/Makefile
] ; then \
567 rootme
=`pwd` ; export rootme
; \
569 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
574 install-mmalloc
: force
575 @if
[ -f .
/mmalloc
/Makefile
] ; then \
576 rootme
=`pwd` ; export rootme
; \
578 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
584 all-texinfo
: all-libiberty
585 @if
[ -f .
/texinfo
/Makefile
] ; then \
586 rootme
=`pwd` ; export rootme
; \
588 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
593 install-texinfo
: force
594 @if
[ -f .
/texinfo
/Makefile
] ; then \
595 rootme
=`pwd` ; export rootme
; \
597 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
604 @if
[ -f .
/bfd
/Makefile
] ; then \
605 rootme
=`pwd` ; export rootme
; \
607 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
613 @if
[ -f .
/bfd
/Makefile
] ; then \
614 rootme
=`pwd` ; export rootme
; \
616 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
624 @if
[ -f .
/opcodes
/Makefile
] ; then \
625 rootme
=`pwd` ; export rootme
; \
627 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
632 install-opcodes
: force
633 @if
[ -f .
/opcodes
/Makefile
] ; then \
634 rootme
=`pwd` ; export rootme
; \
636 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
642 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
643 @if
[ -f .
/binutils
/Makefile
] ; then \
644 rootme
=`pwd` ; export rootme
; \
646 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
651 install-binutils
: force
652 @if
[ -f .
/binutils
/Makefile
] ; then \
653 rootme
=`pwd` ; export rootme
; \
655 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
661 all-newlib
: all-binutils all-ld all-gas all-gcc
662 @if
[ -f .
/newlib
/Makefile
] ; then \
663 rootme
=`pwd` ; export rootme
; \
664 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
666 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
671 install-newlib
: force
672 @if
[ -f .
/newlib
/Makefile
] ; then \
673 rootme
=`pwd` ; export rootme
; \
674 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
676 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
681 ### start-sanitize-chill
683 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
684 @if
[ -f .
/chillrt
/Makefile
] ; then \
685 rootme
=`pwd` ; export rootme
; \
686 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
688 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
693 install-chillrt
: force
694 @if
[ -f .
/chillrt
/Makefile
] ; then \
695 rootme
=`pwd` ; export rootme
; \
696 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
698 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
702 ### end-sanitize-chill
705 all-gprof
: all-libiberty all-bfd
706 @if
[ -f .
/gprof
/Makefile
] ; then \
707 rootme
=`pwd` ; export rootme
; \
709 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
715 @if
[ -f .
/gprof
/Makefile
] ; then \
716 rootme
=`pwd` ; export rootme
; \
718 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
725 @if
[ -f .
/byacc
/Makefile
] ; then \
726 rootme
=`pwd` ; export rootme
; \
728 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
734 @if
[ -f .
/byacc
/Makefile
] ; then \
735 rootme
=`pwd` ; export rootme
; \
737 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
743 all-flex
: all-libiberty
744 @if
[ -f .
/flex
/Makefile
] ; then \
745 rootme
=`pwd` ; export rootme
; \
747 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
753 @if
[ -f .
/flex
/Makefile
] ; then \
754 rootme
=`pwd` ; export rootme
; \
756 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
761 all-gcc
: all-libiberty all-byacc all-binutils all-gas
762 @if
[ -f .
/gcc
/Makefile
] ; then \
763 rootme
=`pwd` ; export rootme
; \
764 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
766 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
772 @if
[ -f .
/gcc
/Makefile
] ; then \
773 rootme
=`pwd` ; export rootme
; \
774 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
776 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
783 @if
[ -f .
/readline
/Makefile
] ; then \
784 rootme
=`pwd` ; export rootme
; \
786 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
791 install-readline
: force
792 @if
[ -f .
/readline
/Makefile
] ; then \
793 rootme
=`pwd` ; export rootme
; \
795 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
802 @if
[ -f .
/glob
/Makefile
] ; then \
803 rootme
=`pwd` ; export rootme
; \
805 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
811 @if
[ -f .
/glob
/Makefile
] ; then \
812 rootme
=`pwd` ; export rootme
; \
814 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
820 all-gas
: all-libiberty all-opcodes all-bfd
821 @if
[ -f .
/gas
/Makefile
] ; then \
822 rootme
=`pwd` ; export rootme
; \
824 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
830 @if
[ -f .
/gas
/Makefile
] ; then \
831 rootme
=`pwd` ; export rootme
; \
833 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
839 all-tgas
: all-libiberty all-bfd
840 @if
[ -f .
/tgas
/Makefile
] ; then \
841 rootme
=`pwd` ; export rootme
; \
843 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
850 all-ld
: all-libiberty all-bfd all-byacc all-flex
851 @if
[ -f .
/ld/Makefile
] ; then \
852 rootme
=`pwd` ; export rootme
; \
854 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
860 @if
[ -f .
/ld/Makefile
] ; then \
861 rootme
=`pwd` ; export rootme
; \
863 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
869 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
870 @if
[ -f .
/gdb
/Makefile
] ; then \
871 rootme
=`pwd` ; export rootme
; \
873 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
879 @if
[ -f .
/gdb
/Makefile
] ; then \
880 rootme
=`pwd` ; export rootme
; \
882 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
888 all-make
: all-libiberty
889 @if
[ -f .
/make
/Makefile
] ; then \
890 rootme
=`pwd` ; export rootme
; \
892 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
898 @if
[ -f .
/make
/Makefile
] ; then \
899 rootme
=`pwd` ; export rootme
; \
901 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
908 @if
[ -f .
/diff
/Makefile
] ; then \
909 rootme
=`pwd` ; export rootme
; \
911 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
917 @if
[ -f .
/diff
/Makefile
] ; then \
918 rootme
=`pwd` ; export rootme
; \
920 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
927 @if
[ -f .
/grep
/Makefile
] ; then \
928 rootme
=`pwd` ; export rootme
; \
930 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
936 @if
[ -f .
/grep
/Makefile
] ; then \
937 rootme
=`pwd` ; export rootme
; \
939 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
946 @if
[ -f .
/rcs
/Makefile
] ; then \
947 rootme
=`pwd` ; export rootme
; \
949 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
955 @if
[ -f .
/rcs
/Makefile
] ; then \
956 rootme
=`pwd` ; export rootme
; \
958 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
965 @if
[ -f .
/cvs
/Makefile
] ; then \
966 rootme
=`pwd` ; export rootme
; \
968 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
974 @if
[ -f .
/cvs
/Makefile
] ; then \
975 rootme
=`pwd` ; export rootme
; \
977 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
984 @if
[ -f .
/patch
/Makefile
] ; then \
985 rootme
=`pwd` ; export rootme
; \
987 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
993 @if
[ -f .
/patch
/Makefile
] ; then \
994 rootme
=`pwd` ; export rootme
; \
996 $(MAKE
) $(FLAGS_TO_PASS
) \
998 man1dir=$(man1dir) install) ; \
1005 @if
[ -f .
/emacs
/Makefile
] ; then \
1006 rootme
=`pwd` ; export rootme
; \
1008 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1013 install-emacs
: force
1014 @if
[ -f .
/emacs
/Makefile
] ; then \
1015 rootme
=`pwd` ; export rootme
; \
1017 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1023 all-ispell
: all-emacs
1024 @if
[ -f .
/ispell
/Makefile
] ; then \
1025 rootme
=`pwd` ; export rootme
; \
1027 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1032 install-ispell
: force
1033 @if
[ -f .
/ispell
/Makefile
] ; then \
1034 rootme
=`pwd` ; export rootme
; \
1036 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1043 @if
[ -f .
/send_pr
/Makefile
] ; then \
1044 rootme
=`pwd` ; export rootme
; \
1046 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1051 install-send_pr
: force
1052 @if
[ -f .
/send_pr
/Makefile
] ; then \
1053 rootme
=`pwd` ; export rootme
; \
1055 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1062 @if
[ -f .
/libm
/Makefile
] ; then \
1063 rootme
=`pwd` ; export rootme
; \
1065 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1071 @if
[ -f .
/libm
/Makefile
] ; then \
1072 rootme
=`pwd` ; export rootme
; \
1074 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1081 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1082 @if
[ -f .
/libg
++/Makefile
] ; then \
1083 rootme
=`pwd` ; export rootme
; \
1084 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1086 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1091 install-libg
++: force
1092 @if
[ -f .
/libg
++/Makefile
] ; then \
1093 rootme
=`pwd` ; export rootme
; \
1094 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1096 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1102 @if
[ -f .
/tcl
/Makefile
] ; then \
1103 rootme
=`pwd` ; export rootme
; \
1104 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1106 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1112 @if
[ -f .
/tcl
/Makefile
] ; then \
1113 rootme
=`pwd` ; export rootme
; \
1114 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1116 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1124 @if
[ -f .
/tk
/Makefile
] ; then \
1125 rootme
=`pwd` ; export rootme
; \
1126 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1128 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1134 @if
[ -f .
/tk
/Makefile
] ; then \
1135 rootme
=`pwd` ; export rootme
; \
1136 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1138 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1145 @if
[ -f .
/expect
/Makefile
] ; then \
1146 rootme
=`pwd` ; export rootme
; \
1147 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1149 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1154 install-expect
: force
1155 @if
[ -f .
/expect
/Makefile
] ; then \
1156 rootme
=`pwd` ; export rootme
; \
1157 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1159 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1166 @if
[ -f .
/sim
/Makefile
] ; then \
1167 rootme
=`pwd` ; export rootme
; \
1169 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1175 @if
[ -f .
/sim
/Makefile
] ; then \
1176 rootme
=`pwd` ; export rootme
; \
1178 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1184 all-fileutils
: force
1185 @if
[ -f .
/fileutils
/Makefile
] ; then \
1186 rootme
=`pwd` ; export rootme
; \
1187 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1192 install-fileutils
: force
1193 @if
[ -f .
/fileutils
/Makefile
] ; then \
1194 rootme
=`pwd` ; export rootme
; \
1195 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1202 @if
[ -f .
/find
/Makefile
] ; then \
1203 rootme
=`pwd` ; export rootme
; \
1204 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1210 @if
[ -f .
/find
/Makefile
] ; then \
1211 rootme
=`pwd` ; export rootme
; \
1212 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1219 @if
[ -f .
/gawk
/Makefile
] ; then \
1220 rootme
=`pwd` ; export rootme
; \
1221 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1227 @if
[ -f .
/gawk
/Makefile
] ; then \
1228 rootme
=`pwd` ; export rootme
; \
1229 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1235 all-m4
: all-libiberty
1236 @if
[ -f .
/m4
/Makefile
] ; then \
1237 rootme
=`pwd` ; export rootme
; \
1238 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1244 @if
[ -f .
/m4
/Makefile
] ; then \
1245 rootme
=`pwd` ; export rootme
; \
1246 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1253 @if
[ -f .
/sed
/Makefile
] ; then \
1254 rootme
=`pwd` ; export rootme
; \
1255 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1261 @if
[ -f .
/sed
/Makefile
] ; then \
1262 rootme
=`pwd` ; export rootme
; \
1263 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1270 @if
[ -f .
/time
/Makefile
] ; then \
1271 rootme
=`pwd` ; export rootme
; \
1272 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1278 @if
[ -f .
/time
/Makefile
] ; then \
1279 rootme
=`pwd` ; export rootme
; \
1280 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1287 @if
[ -f .
/wdiff
/Makefile
] ; then \
1288 rootme
=`pwd` ; export rootme
; \
1289 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1294 install-wdiff
: force
1295 @if
[ -f .
/wdiff
/Makefile
] ; then \
1296 rootme
=`pwd` ; export rootme
; \
1297 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1303 all-uudecode
: all-libiberty
1304 @if
[ -f .
/uudecode
/Makefile
] ; then \
1305 rootme
=`pwd` ; export rootme
; \
1306 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1311 install-uudecode
: force
1312 @if
[ -f .
/uudecode
/Makefile
] ; then \
1313 rootme
=`pwd` ; export rootme
; \
1314 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1320 all-shellutils
: force
1321 @if
[ -f .
/shellutils
/Makefile
] ; then \
1322 rootme
=`pwd` ; export rootme
; \
1323 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1328 install-shellutils
: force
1329 @if
[ -f .
/shellutils
/Makefile
] ; then \
1330 rootme
=`pwd` ; export rootme
; \
1331 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1337 all-textutils
: force
1338 @if
[ -f .
/textutils
/Makefile
] ; then \
1339 rootme
=`pwd` ; export rootme
; \
1340 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1345 install-textutils
: force
1346 @if
[ -f .
/textutils
/Makefile
] ; then \
1347 rootme
=`pwd` ; export rootme
; \
1348 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1355 ### other supporting targets
1379 for i in
$(MAKEDIRS
) ; do \
1380 echo Making
$$i...
; \
1381 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1382 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1383 if
[ ! -d
$$i ] ; then \
1384 if mkdir
$$i ; then \
1395 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1396 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1397 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1398 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1400 dir.
info: do-install-info
1401 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1402 mv
-f
dir.
info.new
dir.
info
1405 @echo
"Building a full distribution of this tree isn't done"
1406 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1415 @for i in
$(SUBDIRS
); \
1419 wd
=`basename $$pwd`; \
1420 for j in
`$(MAKE) ls`; \
1428 # with the gnu make, this is done automatically.
1430 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1431 $(SHELL
) .
/config.status
1434 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1436 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1437 config.guess config.sub config move-if-change
1438 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
1440 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1441 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1446 .
/configure
-rm sun4
1447 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1449 gdb.
tar.Z
: setup-dirs
1450 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1451 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1453 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1454 rm -rf proto-toplev
; mkdir proto-toplev
1455 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1456 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1459 mkdir proto-toplev
/etc
1460 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1461 ln
-s ..
/..
/etc
/$$i .
; \
1463 # Put only one copy (four hard links) of COPYING in the tar file.
1464 rm proto-toplev
/bfd
/COPYING
1465 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1466 rm proto-toplev
/include/COPYING
1467 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1468 rm proto-toplev
/readline
/COPYING
1469 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1471 # Take out texinfo and glob from configurable dirs
1472 rm proto-toplev
/configure.in
1473 sed
-e
'/^host_tools=/s/texinfo //' \
1474 -e
'/^host_libs=/s/glob //' \
1475 <configure.in
>proto-toplev
/configure.in
1477 # Take out texinfo from a few places; make simple BISON=bison line.
1478 rm proto-toplev
/Makefile.in
1479 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1480 -e
'/^ install-texinfo /d' \
1481 -e
'\/^BISON =/,\/^$$/c\
1483 <Makefile.in
>proto-toplev
/Makefile.in
1485 mkdir proto-toplev
/texinfo
1486 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1487 chmod og
=u
`find proto-toplev -print`
1488 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1489 echo
"==> Making gdb-$$VER.tar.Z"; \
1490 ln
-s proto-toplev gdb-
$$VER; \
1491 tar cfh
- gdb-
$$VER \
1492 | compress
-v
>gdb-
$$VER.
tar.Z
)
1495 # end of Makefile.in