2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992, 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: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
68 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
69 then echo $${rootme}/byacc/byacc ; \
73 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
74 then echo $${rootme}/flex/flex ; \
77 MAKEINFO
= `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
78 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
79 else echo makeinfo ; fi`
82 # libraries that may need to be augmented on a system-by-system basis
85 # compilers to use to create programs which must be run in the build
88 CXX_FOR_BUILD
= $(CXX
)
90 SUBDIRS
= "this is set via configure, don't edit this"
94 INSTALL_TARGET
= install.
all
97 if [ -f $${rootme}/gcc/Makefile ] ; then \
98 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
100 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
103 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
107 # start-sanitize-chill
108 CHILL_FOR_TARGET
= ` \
109 if [ -f $${rootme}/gcc/Makefile ] ; then \
110 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
112 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
115 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
122 if [ -f $${rootme}/gcc/Makefile ] ; then \
123 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
125 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
128 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
133 if [ -f $${rootme}/gas/Makefile ] ; then \
134 echo $${rootme}/gas/as.new ; \
136 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
139 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
144 if [ -f $${rootme}/binutils/Makefile ] ; then \
145 echo $${rootme}/binutils/ar ; \
147 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
150 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
154 RANLIB_FOR_TARGET
= ` \
155 if [ -f $${rootme}/binutils/Makefile ] ; then \
156 echo $${rootme}/binutils/ranlib ; \
158 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
161 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
166 if [ -f $${rootme}/binutils/Makefile ] ; then \
167 echo $${rootme}/binutils/nm ; \
169 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
172 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
176 # FIXME: This is badly named.
178 if [ -f $${rootme}/gcc/Makefile ] ; then \
179 if [ -f $${rootme}/newlib/Makefile ] ; then \
180 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
182 echo -I$${rootme}/gcc/include ; \
190 #### host and target specific makefile fragments come in here.
193 # Flags to pass down to all sub-makes.
194 # Please keep these in alphabetical order.
195 BASE_FLAGS_TO_PASS
= \
196 "AR_FLAGS=$(AR_FLAGS)" \
197 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
198 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
200 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
201 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
203 $(start-sanitize-chill
)\
204 "CHILLFLAGS=$(CHILLFLAGS)" \
205 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
206 "CHILL_LIB=$(CHILL_LIB)" \
207 $(end-sanitize-chill
)\
208 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
209 "CXXFLAGS=$(CXXFLAGS)" \
210 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
211 'GCC_FOR_TARGET=$$(CC_FOR_TARGET)' \
212 "INSTALL=$(INSTALL)" \
213 "INSTALL_DATA=$(INSTALL_DATA)" \
214 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
215 "LDFLAGS=$(LDFLAGS)" \
217 "LOADLIBES=$(LOADLIBES)" \
218 "MAKEINFO=$(MAKEINFO)" \
219 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
221 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
222 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
223 "exec_prefix=$(exec_prefix)" \
227 # Flags to pass down to most sub-makes, in which we're building with
228 # the host environment.
229 # If any variables are added here, they must be added to do-*, below.
239 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
241 # Flags that are concerned with the location of the X11 include files
243 X11_FLAGS_TO_PASS
= \
244 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
245 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
248 # Flags to pass down to makes which are built with the target environment.
249 # The double $ decreases the length of the command line; the variables
250 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
251 # If any variables are added here, they must be added to do-*, below.
252 EXTRA_TARGET_FLAGS
= \
253 'AR=$$(AR_FOR_TARGET)' \
254 'AS=$$(AS_FOR_TARGET)' \
255 'CC=$$(CC_FOR_TARGET)' \
256 'CXX=$$(CXX_FOR_TARGET)' \
257 'NM=$$(NM_FOR_TARGET)' \
258 'RANLIB=$$(RANLIB_FOR_TARGET)' \
259 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
261 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
263 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
264 # unfortunately needs the native compiler and the target ar and
266 # If any variables are added here, they must be added to do-*, below.
268 'AR=$$(AR_FOR_TARGET)' \
273 'RANLIB=$$(RANLIB_FOR_TARGET)' \
276 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
278 # This is a list of the targets for all the modules which are compiled
279 # using $(FLAGS_TO_PASS).
325 # This is a list of the install targets for all the modules which are
326 # compiled using $(FLAGS_TO_PASS).
373 # This is a list of the targets for all the modules which are compiled
374 # using $(X11_FLAGS_TO_PASS).
381 # This is a list of the install targets for all the modules which are
382 # compiled using $(X11_FLAGS_TO_PASS).
383 INSTALL_X11_MODULES
= \
389 # This is a list of the targets for all the modules which are compiled
390 # using $(TARGET_FLAGS_TO_PASS).
391 ALL_TARGET_MODULES
= \
392 $(start-sanitize-chill
) \
394 $(end-sanitize-chill
) \
399 # This is a list of the install targets for all the modules which are
400 # compiled using $(TARGET_FLAGS_TO_PASS).
401 INSTALL_TARGET_MODULES
= \
402 $(start-sanitize-chill
) \
404 $(end-sanitize-chill
) \
409 # This is a shell case of all modules which are compiled using
410 # $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
411 TARGET_LIBS
= libg
++ | newlib | xiberty
412 # start-sanitize-chill
413 TARGET_LIBS
= chillrt | libg
++ | newlib | xiberty
416 # The first rule in the file had better be this one. Don't put any above it.
420 # The target built for a native build.
424 $(ALL_TARGET_MODULES
) \
428 # The target built for a cross build.
445 $(ALL_TARGET_MODULES
)
447 # Do a target for all the subdirectories. A ``make do-X'' will do a
448 # ``make X'' in all subdirectories (because, in general, there is a
449 # dependency (below) of X upon do-X, a ``make X'' will also do this,
450 # but it may do additional work as well).
451 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
452 # because it is so large that it can easily overflow the command line
453 # length limit on some systems.
466 @target
=`echo $@ | sed -e 's/^do-//'`; \
467 rootme
=`pwd`; export rootme
; \
468 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
469 for i in
$(SUBDIRS
); do \
470 if
[ -f .
/$$i/Makefile
]; then \
473 for flag in
$(EXTRA_TARGET_FLAGS
); do \
474 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
478 for flag in
$(EXTRA_GCC_FLAGS
); do \
479 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
483 for flag in
$(EXTRA_HOST_FLAGS
); do \
484 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
488 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
490 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
491 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
492 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
494 then true
; else exit
1; fi
; \
498 # Here are the targets which correspond to the do-X targets.
500 .PHONY
: info check installcheck dvi install-info
501 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
504 installcheck: do-installcheck
507 install-info
: install-info-dirs do-install-info
dir.
info
508 if
[ -f
dir.
info ] ; then \
509 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
512 do-install-info
: install-info-dirs
515 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
518 -rm -f Makefile config.status
520 clean: do-clean local-clean
521 mostlyclean: do-mostlyclean local-clean
522 distclean: do-distclean local-clean local-distclean
523 realclean: do-realclean local-clean local-distclean
525 # Installation targets.
527 .PHONY
: install uninstall
528 install: $(INSTALL_TARGET
)
531 @echo
"the uninstall target is not supported in this tree"
534 install.
all: install-no-fixedincludes
535 @if
[ -f .
/gcc
/Makefile
] ; then \
536 rootme
=`pwd` ; export rootme
; \
538 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
543 # install-no-fixedincludes is used because Cygnus can not distributed
544 # the fixed header files.
545 .PHONY
: install-no-fixedincludes
546 install-no-fixedincludes
: \
548 gcc-no-fixedincludes \
550 $(INSTALL_TARGET_MODULES
) \
551 $(INSTALL_X11_MODULES
)
553 # Install the gcc headers files, but not the fixed include files,
554 # which Cygnus is not allowed to distribute. This rule is very
555 # dependent on the workings of the gcc Makefile.in.
556 .PHONY
: gcc-no-fixedincludes
557 gcc-no-fixedincludes
:
558 @if
[ -f .
/gcc
/Makefile
]; then \
559 rm -rf gcc
/tmp-include
; \
560 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
562 touch gcc
/stmp-fixincludes
; \
563 rm -f gcc
/stmp-headers
; \
564 rootme
=`pwd`; export rootme
; \
565 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
567 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
568 rm -rf gcc
/include; \
569 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
572 .PHONY
: install.cross
589 $(INSTALL_TARGET_MODULES
)
591 # This rule is used to build the modules which use FLAGS_TO_PASS. To
592 # build a target all-X means to cd to X and make all.
593 # all-glob is handled specially because it doesn't actually build.
594 .PHONY
: $(ALL_MODULES
) all-glob
595 $(ALL_MODULES
) all-glob
:
596 @
dir=`echo $@ | sed -e 's/all-//'`; \
597 if
[ -f .
/$${dir}/Makefile
] ; then \
598 rootme
=`pwd`; export rootme
; \
599 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
600 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
605 # This rule is used to install the modules which use FLAGS_TO_PASS.
606 # To build a target install-X means to cd to X and make install.
607 .PHONY
: $(INSTALL_MODULES
)
608 $(INSTALL_MODULES
): install-dirs
609 @
dir=`echo $@ | sed -e 's/install-//'`; \
610 if
[ -f .
/$${dir}/Makefile
] ; then \
611 rootme
=`pwd`; export rootme
; \
612 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
613 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
618 # This rule is used the build the modules which use
619 # TARGET_FLAGS_TO_PASS. To build a target all-X means to cd to X and
621 .PHONY
: $(ALL_TARGET_MODULES
)
622 $(ALL_TARGET_MODULES
):
623 @
dir=`echo $@ | sed -e 's/all-//'`; \
624 if
[ -f .
/$${dir}/Makefile
] ; then \
625 rootme
=`pwd`; export rootme
; \
626 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
627 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
632 # This rule is used to install the modules which use
633 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
635 .PHONY
: $(INSTALL_TARGET_MODULES
)
636 $(INSTALL_TARGET_MODULES
): install-dirs
637 @
dir=`echo $@ | sed -e 's/install-//'`; \
638 if
[ -f .
/$${dir}/Makefile
] ; then \
639 rootme
=`pwd`; export rootme
; \
640 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
641 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
646 # This rule is used the build the modules which use X11_FLAGS_TO_PASS.
647 # To build a target all-X means to cd to X and make all.
648 .PHONY
: $(ALL_X11_MODULES
)
650 @
dir=`echo $@ | sed -e 's/all-//'`; \
651 if
[ -f .
/$${dir}/Makefile
] ; then \
652 rootme
=`pwd`; export rootme
; \
653 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
655 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
660 # This rule is used the install the modules which use X11_FLAGS_TO_PASS.
661 # To build a target install-X means to cd to X and make install.
662 .PHONY
: $(INSTALL_X11_MODULES
)
663 $(INSTALL_X11_MODULES
):
664 @
dir=`echo $@ | sed -e 's/all-//'`; \
665 if
[ -f .
/$${dir}/Makefile
] ; then \
666 rootme
=`pwd`; export rootme
; \
667 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
669 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
674 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
677 @if
[ -f .
/gcc
/Makefile
] ; then \
678 rootme
=`pwd`; export rootme
; \
679 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
680 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
687 @if
[ -f .
/gcc
/Makefile
] ; then \
688 rootme
=`pwd`; export rootme
; \
689 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
690 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
695 # This is a list of inter-dependencies among modules.
698 all-binutils
: all-libiberty all-opcodes all-bfd all-flex
700 # start-sanitize-chill
701 all-chillrt
: all-binutils all-gas all-gcc all-newlib
705 all-diff
: all-libiberty
711 all-flex
: all-libiberty
712 all-gas
: all-libiberty all-opcodes all-bfd
714 all-gcc
: all-libiberty all-byacc all-binutils all-gas
715 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc
717 all-gprof
: all-libiberty all-bfd
719 all-gzip
: all-libiberty
720 all-hello
: all-libiberty
722 all-ispell
: all-emacs
723 all-ld
: all-libiberty all-bfd all-byacc all-flex
724 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
726 all-m4
: all-libiberty
727 all-make
: all-libiberty
729 all-newlib
: all-binutils all-gas all-gcc
735 all-recode
: all-libiberty
739 all-sim
: all-libiberty all-bfd
740 all-tar
: all-libiberty
742 all-tclX
: all-tcl all-tk
744 all-texinfo
: all-libiberty
746 all-tgas
: all-libiberty all-bfd
749 all-uudecode
: all-libiberty
750 all-xiberty
: all-gcc all-newlib
752 ### other supporting targets
761 @for i in
$(MAKEDIRS
) ; do \
762 echo Making
$$i...
; \
763 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
764 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
765 if
[ ! -d
$$i ] ; then \
766 if mkdir
$$i ; then \
776 .PHONY
: install-info-dirs
778 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
779 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
780 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
781 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
783 dir.
info: do-install-info
784 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
785 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
786 mv
-f
dir.
info.new
dir.
info ; \
791 @echo
"Building a full distribution of this tree isn't done"
792 @echo
"via 'make dist'. Check out the etc/ subdirectory"
801 @for i in
$(SUBDIRS
); \
805 wd
=`basename $$pwd`; \
806 for j in
`$(MAKE) ls`; \
812 # with the gnu make, this is done automatically.
814 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
815 $(SHELL
) .
/config.status
818 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
820 DEVO_SUPPORT
= README Makefile.in configure configure.in \
821 config.guess config.sub config move-if-change
822 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
824 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
825 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
827 .PHONY
: setup-dirs-gdb gdb.
tar.Z make-gdb.
tar.Z
832 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
834 gdb.
tar.Z
: setup-dirs-gdb
835 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
836 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
838 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
839 rm -rf proto-toplev
; mkdir proto-toplev
840 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
841 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
844 mkdir proto-toplev
/etc
845 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
846 ln
-s ..
/..
/etc
/$$i .
; \
848 # Put only one copy (four hard links) of COPYING in the tar file.
849 rm proto-toplev
/bfd
/COPYING
850 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
851 rm proto-toplev
/include/COPYING
852 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
853 rm proto-toplev
/readline
/COPYING
854 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
856 # Take out texinfo and glob from configurable dirs
857 rm proto-toplev
/configure.in
858 sed
-e
'/^host_tools=/s/texinfo //' \
859 -e
'/^host_libs=/s/glob //' \
860 <configure.in
>proto-toplev
/configure.in
862 # Take out texinfo from a few places; make simple BISON=bison line.
863 rm proto-toplev
/Makefile.in
864 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
865 -e
'/^ install-texinfo /d' \
866 -e
'/^BISON = /,/^$$/d' \
867 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
868 <Makefile.in
>proto-toplev
/Makefile.in
870 mkdir proto-toplev
/texinfo
871 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
872 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
873 chmod og
=u
`find proto-toplev -print`
874 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
875 echo
"==> Making gdb-$$VER.tar.Z"; \
876 ln
-s proto-toplev gdb-
$$VER; \
877 tar cfh
- gdb-
$$VER \
878 | compress
-v
>gdb-
$$VER.
tar.Z
)
879 $(GZIP
) -d
<gdb-
$$VER.
tar.Z |
$(GZIP
) -9 -v
>gdb-
$$VER.
tar.z
881 # When you use `make setup-dirs' or `make taz' you should always redefine
883 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
884 # Directories that might want `make proto-dir' run.
887 .PHONY
: setup-dirs taz
892 chmod og
=u
`find etc $(DEVO_SUPPORT) $(SUPPORT_FILES) -print`
893 for d in ..
$(PROTODIRS
) ; do \
894 if
[ $$d != ".." ] && [ -d
$$d ]; then \
895 (cd
$$d ; $(MAKE
) -f Makefile.in proto-dir
) ; \
899 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex
900 rm -rf proto-toplev
; mkdir proto-toplev
901 for d in ..
$(PROTODIRS
) ; do \
902 if
[ $$d != ..
]; then \
903 if
[ -d
$$d ]; then \
904 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
908 (cd proto-toplev
; for i in
$(TOOL
) $(DEVO_SUPPORT
) $(SUPPORT_FILES
); do \
909 if
[ ! -d
$$i ]; then ln
-s ..
/$$i .
; else true
; fi
; \
911 mkdir proto-toplev
/etc
912 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
913 ln
-s ..
/..
/etc
/$$i .
; \
915 # Put only one copy (four hard links) of COPYING in the tar file.
918 # Take out texinfo and glob from configurable dirs
919 rm proto-toplev
/configure.in
920 sed
-e
'/^host_tools=/s/texinfo //' \
921 -e
'/^host_libs=/s/glob //' \
922 <configure.in
>proto-toplev
/configure.in
924 # Take out texinfo from a few places; make simple BISON=bison line.
925 rm proto-toplev
/Makefile.in
926 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
927 -e
'/^ install-texinfo /d' \
928 -e
'/^BISON = /,/^$$/d' \
929 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
930 <Makefile.in
>proto-toplev
/Makefile.in
932 mkdir proto-toplev
/texinfo
933 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
934 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
935 chmod og
=u
`find proto-toplev -print`
936 (VER
=`sed <$(TOOL)/Makefile.in -n 's/VERSION *= *//p'`; \
937 echo
"==> Making $(TOOL)-$$VER.tar.z"; \
938 ln
-s proto-toplev
$(TOOL
)-$$VER; \
939 tar cfh
- $(TOOL
)-$$VER \
940 |
$(GZIP
) -v
>$(TOOL
)-$$VER.
tar.z
)
942 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes
945 gas.
tar.z
: $(DEVO_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas texinfo
/texinfo.
tex
946 $(MAKE
) -f Makefile.in setup-dirs SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
947 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)" TOOL
=gas
953 # start-sanitize-chill
954 ## This is ugly, but I don't want GNU make to put these variables in
955 ## the environment. Older makes will see this as a set of targets
956 ## with no dependencies and no actions.
957 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
: