2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990-1993 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
)
67 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
68 then echo $${rootme}/byacc/byacc ; \
72 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
73 then echo $${rootme}/flex/flex ; \
76 MAKEINFO
= `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
77 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
78 else echo makeinfo ; fi`
81 # libraries that may need to be augmented on a system-by-system basis
84 # compilers to use to create programs which must be run in the build
87 CXX_FOR_BUILD
= $(CXX
)
89 SUBDIRS
= "this is set via configure, don't edit this"
93 INSTALL_TARGET
= install.
all
99 if [ -f $${rootme}/gcc/Makefile ] ; then \
100 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
102 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
105 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
109 $(start-sanitize-chill
)
110 CHILL_FOR_TARGET
= ` \
111 if [ -f $${rootme}/gcc/Makefile ] ; then \
112 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
114 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
117 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
120 $(end-sanitize-chill
)
123 if [ -f $${rootme}/gcc/Makefile ] ; then \
124 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
126 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
129 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
134 if [ -f $${rootme}/gas/Makefile ] ; then \
135 echo $${rootme}/gas/as.new ; \
137 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
140 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
145 if [ -f $${rootme}/binutils/Makefile ] ; then \
146 echo $${rootme}/binutils/ar ; \
148 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
151 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
155 RANLIB_FOR_TARGET
= ` \
156 if [ -f $${rootme}/binutils/Makefile ] ; then \
157 echo $${rootme}/binutils/ranlib ; \
159 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
162 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
167 if [ -f $${rootme}/binutils/Makefile ] ; then \
168 echo $${rootme}/binutils/nm ; \
170 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
173 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
177 # FIXME: This is badly named.
179 if [ -f $${rootme}/gcc/Makefile ] ; then \
180 if [ -f $${rootme}/newlib/Makefile ] ; then \
181 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
183 echo -I$${rootme}/gcc/include ; \
191 #### host and target specific makefile fragments come in here.
194 # Flags to pass down to all sub-makes.
195 # Please keep these in alphabetical order.
196 BASE_FLAGS_TO_PASS
= \
197 "AR_FLAGS=$(AR_FLAGS)" \
198 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
199 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
201 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
202 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
204 $(start-sanitize-chill
)\
205 "CHILLFLAGS=$(CHILLFLAGS)" \
206 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
207 "CHILL_LIB=$(CHILL_LIB)" \
208 $(end-sanitize-chill
)\
209 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
210 "CXXFLAGS=$(CXXFLAGS)" \
211 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
212 'GCC_FOR_TARGET=$$(CC_FOR_TARGET)' \
213 "INSTALL=$(INSTALL)" \
214 "INSTALL_DATA=$(INSTALL_DATA)" \
215 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
216 "LDFLAGS=$(LDFLAGS)" \
218 "LOADLIBES=$(LOADLIBES)" \
219 "MAKEINFO=$(MAKEINFO)" \
220 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
222 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
223 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
224 "exec_prefix=$(exec_prefix)" \
228 # Flags to pass down to most sub-makes, in which we're building with
229 # the host environment.
230 # If any variables are added here, they must be added to do-*, below.
240 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
242 # Flags that are concerned with the location of the X11 include files
244 X11_FLAGS_TO_PASS
= \
245 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
246 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
249 # Shell case of subdirectories which are built with the target environment.
250 TARGET_LIBS
=libg
++ | xiberty | newlib
251 $(start-sanitize-chill
)
252 TARGET_LIBS
=libg
++ | xiberty | newlib | chillrt
253 $(end-sanitize-chill
)
255 # Flags to pass down to makes which are built with the target environment.
256 # The double $ decreases the length of the command line; the variables
257 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
258 # If any variables are added here, they must be added to do-*, below.
259 EXTRA_TARGET_FLAGS
= \
260 'AR=$$(AR_FOR_TARGET)' \
261 'AS=$$(AS_FOR_TARGET)' \
262 'CC=$$(CC_FOR_TARGET)' \
263 'CXX=$$(CXX_FOR_TARGET)' \
264 'NM=$$(NM_FOR_TARGET)' \
265 'RANLIB=$$(RANLIB_FOR_TARGET)' \
266 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
268 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
270 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
271 # unfortunately needs the native compiler and the target ar and
273 # If any variables are added here, they must be added to do-*, below.
275 'AR=$$(AR_FOR_TARGET)' \
280 'RANLIB=$$(RANLIB_FOR_TARGET)' \
283 # On SCO 3.2v4, the gcc build can fill the environment. Resetting
284 # some variables solves the problem.
285 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) \
287 $(start-sanitize-chill
)\
289 "CHILL_FOR_TARGET=" \
291 $(end-sanitize-chill
)\
293 "XTRAFLAGS_FOR_TARGET="
295 # The first rule in the file had better be this one. Don't put any above it.
298 .PHONY
: all check dvi info install-info install-info-dirs
299 .PHONY
: do-info do-check do-dvi do-install-info
300 .PHONY
: do-clean do-mostlyclean do-distclean do-realclean
304 # Do a target for all the subdirectories. A ``make do-X'' will do a
305 # ``make X'' in all subdirectories (because, in general, there is a
306 # dependency (below) of X upon do-X, a ``make X'' will also do this,
307 # but it may do additional work as well).
308 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
309 # because it is so large that it can easily overflow the command line
310 # length limit on some systems.
311 do-info do-check do-dvi do-install-info do-clean do-mostlyclean do-distclean do-realclean
:
312 @target
=`echo $@ | sed -e 's/^do-//'`; \
313 rootme
=`pwd`; export rootme
; \
314 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
315 for i in
$(SUBDIRS
); do \
316 if
[ -f .
/$$i/Makefile
]; then \
319 for flag in
$(EXTRA_TARGET_FLAGS
); do \
320 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
324 for flag in
$(EXTRA_GCC_FLAGS
); do \
325 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
329 for flag in
$(EXTRA_HOST_FLAGS
); do \
330 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
334 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
336 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
337 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
338 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
340 then true
; else exit
1; fi
; \
348 install-info
: install-info-dirs do-install-info
dir.
info
349 if
[ -f
dir.
info ] ; then \
350 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
353 do-install-info
: install-info-dirs
355 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
356 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
357 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
358 all-make all-rcs all-cvs all-diff all-grep \
359 all-patch all-emacs all-ispell all-etc \
360 all-tcl all-tk all-expect \
362 $(start-sanitize-chill
) \
364 $(end-sanitize-chill
) \
365 all-gprof all-prms all-send-pr all-libm all-deja-gnu \
366 all-fileutils all-find all-gawk all-sed all-shellutils \
367 all-textutils all-time all-wdiff all-uudecode \
368 all-hello all-tar all-gzip all-indent all-recode
371 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
372 all-opcodes all-bfd all-readline all-sim \
373 all-gdb all-binutils all-gcc all-newlib \
374 $(start-sanitize-chill
) \
376 $(end-sanitize-chill
) \
379 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
382 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
385 -rm -f Makefile config.status
387 clean: do-clean local-clean
388 mostlyclean: do-mostlyclean local-clean
389 distclean: do-distclean local-clean local-distclean
390 realclean: do-realclean local-clean local-distclean
393 @echo
"the uninstall target is not supported in this tree"
395 install: $(INSTALL_TARGET
)
396 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
397 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
398 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
400 install.
all: install-no-fixedincludes
401 @if
[ -f .
/gcc
/Makefile
] ; then \
402 rootme
=`pwd` ; export rootme
; \
404 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
409 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
414 $(start-sanitize-chill
) \
416 $(end-sanitize-chill
) \
464 # Install the gcc headers files, but not the fixed include files,
465 # which we are not allowed to distribute. This rule is very dependent
466 # on the workings of the gcc Makefile.in.
468 gcc-no-fixedincludes
:
469 @if
[ -f .
/gcc
/Makefile
]; then \
470 rm -rf gcc
/tmp-include
; \
471 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
473 touch gcc
/stmp-fixincludes
; \
474 rm -f gcc
/stmp-headers
; \
475 rootme
=`pwd`; export rootme
; \
476 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
478 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
479 rm -rf gcc
/include; \
480 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
483 install.cross
: install-dirs install-libiberty install-mmalloc \
484 install-binutils install-opcodes install-byacc install-flex \
485 install-ld install-gas install-readline \
486 install-glob install-gdb install-mmalloc \
488 $(start-sanitize-chill
) \
490 $(end-sanitize-chill
) \
491 install-gcc install-etc install-deja-gnu
494 all-gzip
: all-libiberty
495 @if
[ -f .
/gzip
/Makefile
] ; then \
496 rootme
=`pwd` ; export rootme
; \
497 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
503 @if
[ -f .
/gzip
/Makefile
] ; then \
504 rootme
=`pwd` ; export rootme
; \
505 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
511 all-hello
: all-libiberty
512 @if
[ -f .
/hello
/Makefile
] ; then \
513 rootme
=`pwd` ; export rootme
; \
514 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
520 @if
[ -f .
/hello
/Makefile
] ; then \
521 rootme
=`pwd` ; export rootme
; \
522 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
528 all-recode
: all-libiberty
529 @if
[ -f .
/recode
/Makefile
] ; then \
530 rootme
=`pwd` ; export rootme
; \
531 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
536 install-recode
: force
537 @if
[ -f .
/recode
/Makefile
] ; then \
538 rootme
=`pwd` ; export rootme
; \
539 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
546 @if
[ -f .
/indent
/Makefile
] ; then \
547 rootme
=`pwd` ; export rootme
; \
548 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
553 install-indent
: force
554 @if
[ -f .
/indent
/Makefile
] ; then \
555 rootme
=`pwd` ; export rootme
; \
556 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
562 all-tar
: all-libiberty
563 @if
[ -f .
/tar/Makefile
] ; then \
564 rootme
=`pwd` ; export rootme
; \
565 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
571 @if
[ -f .
/tar/Makefile
] ; then \
572 rootme
=`pwd` ; export rootme
; \
573 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
581 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
582 rootme
=`pwd` ; export rootme
; \
583 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
588 install-deja-gnu
: force
589 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
590 rootme
=`pwd` ; export rootme
; \
591 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
598 @if
[ -f .
/autoconf
/Makefile
] ; then \
599 rootme
=`pwd` ; export rootme
; \
600 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
605 install-autoconf
: force
606 @if
[ -f .
/autoconf
/Makefile
] ; then \
607 rootme
=`pwd` ; export rootme
; \
608 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
615 @if
[ -f .
/etc
/Makefile
] ; then \
616 rootme
=`pwd` ; export rootme
; \
617 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
623 @if
[ -f .
/etc
/Makefile
] ; then \
624 rootme
=`pwd` ; export rootme
; \
625 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
632 @if
[ -f .
/libiberty
/Makefile
] ; then \
633 rootme
=`pwd` ; export rootme
; \
635 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
640 install-libiberty
: force
641 @if
[ -f .
/libiberty
/Makefile
] ; then \
642 rootme
=`pwd` ; export rootme
; \
644 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
650 all-xiberty
: all-gcc all-newlib
651 @if
[ -f .
/xiberty
/Makefile
] ; then \
652 rootme
=`pwd` ; export rootme
; \
653 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
655 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
660 install-xiberty
: force
661 @if
[ -f .
/xiberty
/Makefile
] ; then \
662 rootme
=`pwd` ; export rootme
; \
663 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
665 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
672 @if
[ -f .
/mmalloc
/Makefile
] ; then \
673 rootme
=`pwd` ; export rootme
; \
675 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
680 install-mmalloc
: force
681 @if
[ -f .
/mmalloc
/Makefile
] ; then \
682 rootme
=`pwd` ; export rootme
; \
684 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
690 all-texinfo
: all-libiberty
691 @if
[ -f .
/texinfo
/Makefile
] ; then \
692 rootme
=`pwd` ; export rootme
; \
694 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
699 install-texinfo
: force
700 @if
[ -f .
/texinfo
/Makefile
] ; then \
701 rootme
=`pwd` ; export rootme
; \
703 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
710 @if
[ -f .
/bfd
/Makefile
] ; then \
711 rootme
=`pwd` ; export rootme
; \
713 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
719 @if
[ -f .
/bfd
/Makefile
] ; then \
720 rootme
=`pwd` ; export rootme
; \
722 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
730 @if
[ -f .
/opcodes
/Makefile
] ; then \
731 rootme
=`pwd` ; export rootme
; \
733 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
738 install-opcodes
: force
739 @if
[ -f .
/opcodes
/Makefile
] ; then \
740 rootme
=`pwd` ; export rootme
; \
742 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
748 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
749 @if
[ -f .
/binutils
/Makefile
] ; then \
750 rootme
=`pwd` ; export rootme
; \
752 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
757 install-binutils
: force
758 @if
[ -f .
/binutils
/Makefile
] ; then \
759 rootme
=`pwd` ; export rootme
; \
761 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
767 all-newlib
: all-binutils all-ld all-gas all-gcc
768 @if
[ -f .
/newlib
/Makefile
] ; then \
769 rootme
=`pwd` ; export rootme
; \
770 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
772 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
777 install-newlib
: force
778 @if
[ -f .
/newlib
/Makefile
] ; then \
779 rootme
=`pwd` ; export rootme
; \
780 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
782 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
787 ### start-sanitize-chill
789 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
790 @if
[ -f .
/chillrt
/Makefile
] ; then \
791 rootme
=`pwd` ; export rootme
; \
792 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
794 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
799 install-chillrt
: force
800 @if
[ -f .
/chillrt
/Makefile
] ; then \
801 rootme
=`pwd` ; export rootme
; \
802 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
804 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
810 ### end-sanitize-chill
813 all-gprof
: all-libiberty all-bfd
814 @if
[ -f .
/gprof
/Makefile
] ; then \
815 rootme
=`pwd` ; export rootme
; \
817 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
823 @if
[ -f .
/gprof
/Makefile
] ; then \
824 rootme
=`pwd` ; export rootme
; \
826 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
833 @if
[ -f .
/byacc
/Makefile
] ; then \
834 rootme
=`pwd` ; export rootme
; \
836 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
842 @if
[ -f .
/byacc
/Makefile
] ; then \
843 rootme
=`pwd` ; export rootme
; \
845 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
851 all-flex
: all-libiberty
852 @if
[ -f .
/flex
/Makefile
] ; then \
853 rootme
=`pwd` ; export rootme
; \
855 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
861 @if
[ -f .
/flex
/Makefile
] ; then \
862 rootme
=`pwd` ; export rootme
; \
864 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
869 all-gcc
: all-libiberty all-byacc all-binutils all-gas
870 @if
[ -f .
/gcc
/Makefile
] ; then \
871 rootme
=`pwd` ; export rootme
; \
872 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
874 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
880 @if
[ -f .
/gcc
/Makefile
] ; then \
881 rootme
=`pwd` ; export rootme
; \
882 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
884 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
891 @if
[ -f .
/readline
/Makefile
] ; then \
892 rootme
=`pwd` ; export rootme
; \
894 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
899 install-readline
: force
900 @if
[ -f .
/readline
/Makefile
] ; then \
901 rootme
=`pwd` ; export rootme
; \
903 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
910 @if
[ -f .
/glob
/Makefile
] ; then \
911 rootme
=`pwd` ; export rootme
; \
913 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
919 @if
[ -f .
/glob
/Makefile
] ; then \
920 rootme
=`pwd` ; export rootme
; \
922 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
928 all-gas
: all-libiberty all-opcodes all-bfd
929 @if
[ -f .
/gas
/Makefile
] ; then \
930 rootme
=`pwd` ; export rootme
; \
932 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
938 @if
[ -f .
/gas
/Makefile
] ; then \
939 rootme
=`pwd` ; export rootme
; \
941 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
947 all-tgas
: all-libiberty all-bfd
948 @if
[ -f .
/tgas
/Makefile
] ; then \
949 rootme
=`pwd` ; export rootme
; \
951 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
958 all-ld
: all-libiberty all-bfd all-byacc all-flex
959 @if
[ -f .
/ld/Makefile
] ; then \
960 rootme
=`pwd` ; export rootme
; \
962 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
968 @if
[ -f .
/ld/Makefile
] ; then \
969 rootme
=`pwd` ; export rootme
; \
971 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
977 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
978 @if
[ -f .
/gdb
/Makefile
] ; then \
979 rootme
=`pwd` ; export rootme
; \
981 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
987 @if
[ -f .
/gdb
/Makefile
] ; then \
988 rootme
=`pwd` ; export rootme
; \
990 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
996 all-make
: all-libiberty
997 @if
[ -f .
/make
/Makefile
] ; then \
998 rootme
=`pwd` ; export rootme
; \
1000 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1006 @if
[ -f .
/make
/Makefile
] ; then \
1007 rootme
=`pwd` ; export rootme
; \
1009 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1015 all-diff
: all-libiberty
1016 @if
[ -f .
/diff
/Makefile
] ; then \
1017 rootme
=`pwd` ; export rootme
; \
1019 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1025 @if
[ -f .
/diff
/Makefile
] ; then \
1026 rootme
=`pwd` ; export rootme
; \
1028 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1035 @if
[ -f .
/grep
/Makefile
] ; then \
1036 rootme
=`pwd` ; export rootme
; \
1038 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1044 @if
[ -f .
/grep
/Makefile
] ; then \
1045 rootme
=`pwd` ; export rootme
; \
1047 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1054 @if
[ -f .
/rcs
/Makefile
] ; then \
1055 rootme
=`pwd` ; export rootme
; \
1057 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1063 @if
[ -f .
/rcs
/Makefile
] ; then \
1064 rootme
=`pwd` ; export rootme
; \
1066 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1073 @if
[ -f .
/cvs
/Makefile
] ; then \
1074 rootme
=`pwd` ; export rootme
; \
1076 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1082 @if
[ -f .
/cvs
/Makefile
] ; then \
1083 rootme
=`pwd` ; export rootme
; \
1085 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1092 @if
[ -f .
/patch
/Makefile
] ; then \
1093 rootme
=`pwd` ; export rootme
; \
1095 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1100 install-patch
: force
1101 @if
[ -f .
/patch
/Makefile
] ; then \
1102 rootme
=`pwd` ; export rootme
; \
1104 $(MAKE
) $(FLAGS_TO_PASS
) \
1106 man1dir=$(man1dir) install) ; \
1113 @if
[ -f .
/emacs
/Makefile
] ; then \
1114 rootme
=`pwd` ; export rootme
; \
1116 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1121 install-emacs
: force
1122 @if
[ -f .
/emacs
/Makefile
] ; then \
1123 rootme
=`pwd` ; export rootme
; \
1125 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1131 all-ispell
: all-emacs
1132 @if
[ -f .
/ispell
/Makefile
] ; then \
1133 rootme
=`pwd` ; export rootme
; \
1135 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1140 install-ispell
: force
1141 @if
[ -f .
/ispell
/Makefile
] ; then \
1142 rootme
=`pwd` ; export rootme
; \
1144 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1151 @if
[ -f .
/prms
/Makefile
] ; then \
1152 rootme
=`pwd` ; export rootme
; \
1154 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1160 @if
[ -f .
/prms
/Makefile
] ; then \
1161 rootme
=`pwd` ; export rootme
; \
1163 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1170 @if
[ -f .
/send-pr
/Makefile
] ; then \
1171 rootme
=`pwd` ; export rootme
; \
1173 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1178 install-send-pr
: force
1179 @if
[ -f .
/send-pr
/Makefile
] ; then \
1180 rootme
=`pwd` ; export rootme
; \
1182 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1189 @if
[ -f .
/libm
/Makefile
] ; then \
1190 rootme
=`pwd` ; export rootme
; \
1192 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1198 @if
[ -f .
/libm
/Makefile
] ; then \
1199 rootme
=`pwd` ; export rootme
; \
1201 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1208 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1209 @if
[ -f .
/libg
++/Makefile
] ; then \
1210 rootme
=`pwd` ; export rootme
; \
1211 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1213 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1218 install-libg
++: force
1219 @if
[ -f .
/libg
++/Makefile
] ; then \
1220 rootme
=`pwd` ; export rootme
; \
1221 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1223 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1229 @if
[ -f .
/tcl
/Makefile
] ; then \
1230 rootme
=`pwd` ; export rootme
; \
1231 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1233 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1239 @if
[ -f .
/tcl
/Makefile
] ; then \
1240 rootme
=`pwd` ; export rootme
; \
1241 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1243 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1251 @if
[ -f .
/tk
/Makefile
] ; then \
1252 rootme
=`pwd` ; export rootme
; \
1253 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1255 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1261 @if
[ -f .
/tk
/Makefile
] ; then \
1262 rootme
=`pwd` ; export rootme
; \
1263 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1265 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1271 all-tclX
: all-tcl all-tk
1272 @if
[ -f .
/tclX
/Makefile
] ; then \
1273 rootme
=`pwd` ; export rootme
; \
1274 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1276 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1282 @if
[ -f .
/tclX
/Makefile
] ; then \
1283 rootme
=`pwd` ; export rootme
; \
1284 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1286 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1294 @if
[ -f .
/expect
/Makefile
] ; then \
1295 rootme
=`pwd` ; export rootme
; \
1296 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1298 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1303 install-expect
: force
1304 @if
[ -f .
/expect
/Makefile
] ; then \
1305 rootme
=`pwd` ; export rootme
; \
1306 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1308 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1315 @if
[ -f .
/sim
/Makefile
] ; then \
1316 rootme
=`pwd` ; export rootme
; \
1318 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1324 @if
[ -f .
/sim
/Makefile
] ; then \
1325 rootme
=`pwd` ; export rootme
; \
1327 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1333 all-fileutils
: force
1334 @if
[ -f .
/fileutils
/Makefile
] ; then \
1335 rootme
=`pwd` ; export rootme
; \
1336 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1341 install-fileutils
: force
1342 @if
[ -f .
/fileutils
/Makefile
] ; then \
1343 rootme
=`pwd` ; export rootme
; \
1344 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1351 @if
[ -f .
/find
/Makefile
] ; then \
1352 rootme
=`pwd` ; export rootme
; \
1353 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1359 @if
[ -f .
/find
/Makefile
] ; then \
1360 rootme
=`pwd` ; export rootme
; \
1361 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1368 @if
[ -f .
/gawk
/Makefile
] ; then \
1369 rootme
=`pwd` ; export rootme
; \
1370 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1376 @if
[ -f .
/gawk
/Makefile
] ; then \
1377 rootme
=`pwd` ; export rootme
; \
1378 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1384 all-m4
: all-libiberty
1385 @if
[ -f .
/m4
/Makefile
] ; then \
1386 rootme
=`pwd` ; export rootme
; \
1387 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1393 @if
[ -f .
/m4
/Makefile
] ; then \
1394 rootme
=`pwd` ; export rootme
; \
1395 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1402 @if
[ -f .
/sed
/Makefile
] ; then \
1403 rootme
=`pwd` ; export rootme
; \
1404 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1410 @if
[ -f .
/sed
/Makefile
] ; then \
1411 rootme
=`pwd` ; export rootme
; \
1412 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1419 @if
[ -f .
/time
/Makefile
] ; then \
1420 rootme
=`pwd` ; export rootme
; \
1421 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1427 @if
[ -f .
/time
/Makefile
] ; then \
1428 rootme
=`pwd` ; export rootme
; \
1429 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1436 @if
[ -f .
/wdiff
/Makefile
] ; then \
1437 rootme
=`pwd` ; export rootme
; \
1438 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1443 install-wdiff
: force
1444 @if
[ -f .
/wdiff
/Makefile
] ; then \
1445 rootme
=`pwd` ; export rootme
; \
1446 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1452 all-uudecode
: all-libiberty
1453 @if
[ -f .
/uudecode
/Makefile
] ; then \
1454 rootme
=`pwd` ; export rootme
; \
1455 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1460 install-uudecode
: force
1461 @if
[ -f .
/uudecode
/Makefile
] ; then \
1462 rootme
=`pwd` ; export rootme
; \
1463 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1469 all-shellutils
: force
1470 @if
[ -f .
/shellutils
/Makefile
] ; then \
1471 rootme
=`pwd` ; export rootme
; \
1472 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1477 install-shellutils
: force
1478 @if
[ -f .
/shellutils
/Makefile
] ; then \
1479 rootme
=`pwd` ; export rootme
; \
1480 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1486 all-textutils
: force
1487 @if
[ -f .
/textutils
/Makefile
] ; then \
1488 rootme
=`pwd` ; export rootme
; \
1489 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1494 install-textutils
: force
1495 @if
[ -f .
/textutils
/Makefile
] ; then \
1496 rootme
=`pwd` ; export rootme
; \
1497 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1504 ### other supporting targets
1528 for i in
$(MAKEDIRS
) ; do \
1529 echo Making
$$i...
; \
1530 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1531 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1532 if
[ ! -d
$$i ] ; then \
1533 if mkdir
$$i ; then \
1544 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1545 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1546 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1547 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1549 dir.
info: do-install-info
1550 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1551 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1552 mv
-f
dir.
info.new
dir.
info ; \
1557 @echo
"Building a full distribution of this tree isn't done"
1558 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1567 @for i in
$(SUBDIRS
); \
1571 wd
=`basename $$pwd`; \
1572 for j in
`$(MAKE) ls`; \
1580 # with the gnu make, this is done automatically.
1582 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1583 $(SHELL
) .
/config.status
1586 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1588 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1589 config.guess config.sub config move-if-change
1590 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
1592 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
1593 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1598 .
/configure
-rm sun4
1599 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1601 gdb.
tar.Z
: setup-dirs
1602 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
1603 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1605 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1606 rm -rf proto-toplev
; mkdir proto-toplev
1607 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1608 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1611 mkdir proto-toplev
/etc
1612 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1613 ln
-s ..
/..
/etc
/$$i .
; \
1615 # Put only one copy (four hard links) of COPYING in the tar file.
1616 rm proto-toplev
/bfd
/COPYING
1617 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1618 rm proto-toplev
/include/COPYING
1619 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1620 rm proto-toplev
/readline
/COPYING
1621 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1623 # Take out texinfo and glob from configurable dirs
1624 rm proto-toplev
/configure.in
1625 sed
-e
'/^host_tools=/s/texinfo //' \
1626 -e
'/^host_libs=/s/glob //' \
1627 <configure.in
>proto-toplev
/configure.in
1629 # Take out texinfo from a few places; make simple BISON=bison line.
1630 rm proto-toplev
/Makefile.in
1631 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1632 -e
'/^ install-texinfo /d' \
1633 -e
'\/^BISON =/,\/^$$/c\
1635 <Makefile.in
>proto-toplev
/Makefile.in
1637 mkdir proto-toplev
/texinfo
1638 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1639 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1640 chmod og
=u
`find proto-toplev -print`
1641 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1642 echo
"==> Making gdb-$$VER.tar.Z"; \
1643 ln
-s proto-toplev gdb-
$$VER; \
1644 tar cfh
- gdb-
$$VER \
1645 | compress
-v
>gdb-
$$VER.
tar.Z
)
1646 $(GZIP
) -d
<gdb-
$$VER.
tar.Z |
$(GZIP
) -9 -v
>gdb-
$$VER.
tar.z
1648 # end of Makefile.in