2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
27 tooldir
= $(exec_prefix)/$(target
)
29 program_transform_name
=
31 datadir = $(prefix)/share
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
48 INSTALL
= $(SHELL
) $$s/install-sh
-c
49 INSTALL_PROGRAM
= $(INSTALL
)
50 INSTALL_DATA
= $(INSTALL
) -m
644
52 INSTALL_DOSREL
= install-dosrel-fake
59 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
60 # here so that they can be overridden by Makefile fragments.
61 HOST_CC
= $(CC_FOR_BUILD
)
63 HOST_PREFIX_1
= loser-
65 # We don't specify -g -O because many compilers don't support -g -O,
66 # and/or -O is broken in and of itself.
69 CFLAGS_FOR_TARGET
= $(CFLAGS
)
71 LIBCFLAGS_FOR_TARGET
= $(CFLAGS_FOR_TARGET
)
75 # start-sanitize-chill
76 CHILLFLAGS
= $(CFLAGS
)
81 # Use -O2 to stress test the compiler.
83 LIBCXXFLAGS
= $(CXXFLAGS
) -fno-implicit-templates
84 CXXFLAGS_FOR_TARGET
= $(CXXFLAGS
)
85 LIBCXXFLAGS_FOR_TARGET
= $(CXXFLAGS_FOR_TARGET
) -fno-implicit-templates
95 # Not plain GZIP, since gzip looks there for extra command-line options.
98 # These values are substituted by configure.
102 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
103 BISON
= `if [ -f $$r/byacc/byacc ] ; \
104 then echo $$r/byacc/byacc ; \
105 else echo ${DEFAULT_YACC} ; \
108 LEX
= `if [ -f $$r/flex/flex ] ; \
109 then echo $$r/flex/flex ; \
110 else echo ${DEFAULT_LEX} ; fi`
112 M4
= `if [ -f $$r/m4/m4 ] ; \
113 then echo $$r/m4/m4 ; \
116 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
117 then echo $$r/texinfo/makeinfo/makeinfo ; \
118 else echo makeinfo ; fi`
120 # This just becomes part of the MAKEINFO definition passed down to
121 # sub-makes. It lets flags be given on the command line while still
122 # using the makeinfo from the object tree.
125 EXPECT
= `if [ -f $$r/expect/expect ] ; \
126 then echo $$r/expect/expect ; \
127 else echo expect ; fi`
129 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
130 then echo $$s/dejagnu/runtest ; \
131 else echo runtest ; fi`
134 # compilers to use to create programs which must be run in the build
137 CXX_FOR_BUILD
= $(CXX
)
139 SUBDIRS
= "this is set via configure, don't edit this"
142 # This is set by the configure script to the list of directories which
143 # should be built using the target tools.
144 TARGET_CONFIGDIRS
= libiberty libgloss newlib libio librx libstdc
++ libg
++ winsup
146 # Target libraries are put under this directory:
147 # Changed by configure to $(target_alias) if cross.
150 # This is set by the configure script to the arguments passed to configure.
153 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
157 # This is the name of the environment variable used for the path to
158 # the libraries. This may be changed by configure.in.
159 RPATH_ENVVAR
= LD_LIBRARY_PATH
161 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
162 REALLY_SET_LIB_PATH
= \
163 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
164 export $(RPATH_ENVVAR
);
167 INSTALL_TARGET
= installdirs \
169 $(INSTALL_TARGET_MODULES
) \
170 $(INSTALL_X11_MODULES
) \
176 if [ -f $$r/gcc/xgcc ] ; then \
177 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
178 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
179 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
181 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
184 echo $$r/gcc/xgcc -B$$r/gcc/; \
187 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
190 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
194 # If CC_FOR_TARGET is not overriden on the command line, then this
195 # variable is passed down to the gcc Makefile, where it is used to
196 # build libgcc2.a. We define it here so that it can itself be
197 # overridden on the command line.
198 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/
200 # start-sanitize-chill
201 CHILL_FOR_TARGET
= ` \
202 if [ -f $$r/gcc/xgcc ] ; then \
203 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
205 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
208 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
215 if [ -f $$r/gcc/xgcc ] ; then \
216 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
217 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
218 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
220 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
223 echo $$r/gcc/xgcc -B$$r/gcc/; \
226 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
229 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
234 if [ -f $$r/gas/as.new ] ; then \
235 echo $$r/gas/as.new ; \
237 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
240 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
245 if [ -f $$r/ld/ld.new ] ; then \
246 echo $$r/ld/ld.new ; \
248 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
251 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
255 DLLTOOL_FOR_TARGET
= ` \
256 if [ -f $$r/binutils/dlltool ] ; then \
257 echo $$r/binutils/dlltool ; \
259 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
262 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
267 if [ -f $$r/binutils/ar ] ; then \
268 echo $$r/binutils/ar ; \
270 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
273 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
277 RANLIB_FOR_TARGET
= ` \
278 if [ -f $$r/binutils/ranlib ] ; then \
279 echo $$r/binutils/ranlib ; \
281 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
284 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
289 if [ -f $$r/binutils/nm.new ] ; then \
290 echo $$r/binutils/nm.new ; \
292 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
295 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
299 #### host and target specific makefile fragments come in here.
302 # Flags to pass down to all sub-makes.
303 # Please keep these in alphabetical order.
304 BASE_FLAGS_TO_PASS
= \
305 "AR_FLAGS=$(AR_FLAGS)" \
306 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
307 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
309 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
310 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
312 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
313 $(start-sanitize-chill
)\
314 "CHILLFLAGS=$(CHILLFLAGS)" \
315 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
316 "CHILL_LIB=$(CHILL_LIB)" \
317 $(end-sanitize-chill
)\
318 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
319 "CXXFLAGS=$(CXXFLAGS)" \
320 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
321 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
322 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
323 "INSTALL=$(INSTALL)" \
324 "INSTALL_DATA=$(INSTALL_DATA)" \
325 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
326 "LDFLAGS=$(LDFLAGS)" \
328 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
329 "LIBCFLAGS=$(LIBCFLAGS)" \
330 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
331 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
332 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
335 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
336 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
337 "PICFLAG=$(PICFLAG)" \
338 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
339 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
342 "RUNTEST=$(RUNTEST)" \
343 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
345 "exec_prefix=$(exec_prefix)" \
349 # Flags to pass down to most sub-makes, in which we're building with
350 # the host environment.
351 # If any variables are added here, they must be added to do-*, below.
357 'DLLTOOL=$(DLLTOOL)' \
363 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
365 # Flags that are concerned with the location of the X11 include files
368 # NOTE: until the top-level is getting the values via autoconf, it only
369 # causes problems to have this top-level Makefile overriding the autoconf-set
370 # values in child directories. Only variables that don't conflict with
371 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
373 X11_FLAGS_TO_PASS
= \
374 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
375 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
377 # Flags to pass down to makes which are built with the target environment.
378 # The double $ decreases the length of the command line; the variables
379 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
380 # If any variables are added here, they must be added to do-*, below.
381 EXTRA_TARGET_FLAGS
= \
382 'AR=$$(AR_FOR_TARGET)' \
383 'AS=$$(AS_FOR_TARGET)' \
384 'CC=$$(CC_FOR_TARGET)' \
385 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
386 'CXX=$$(CXX_FOR_TARGET)' \
387 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
388 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
389 'LD=$$(LD_FOR_TARGET)' \
390 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
391 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
392 'NM=$$(NM_FOR_TARGET)' \
393 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
394 'RANLIB=$$(RANLIB_FOR_TARGET)'
396 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
398 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
399 # unfortunately needs the native compiler and the target ar and
401 # If any variables are added here, they must be added to do-*, below.
402 # The HOST_* variables are a special case, which are used for the gcc
403 # cross-building scheme.
405 'AR=$$(AR_FOR_TARGET)' \
409 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
410 'HOST_CC=$(CC_FOR_BUILD)' \
411 'HOST_PREFIX=$(HOST_PREFIX)' \
412 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
414 'RANLIB=$$(RANLIB_FOR_TARGET)' \
415 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
416 `if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
417 `if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
418 `if test x"$(LIMITS_H_TEST)" != x; then echo "LIMITS_H_TEST=$(LIMITS_H_TEST)"; fi` \
419 `if test x"$(LIBGCC1_TEST)" != x; then echo "LIBGCC1_TEST=$(LIBGCC1_TEST)"; fi` \
420 `if test x"$(LIBGCC2_CFLAGS)" != x; then echo "LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)"; fi` \
421 `if test x"$(LIBGCC2_DEBUG_CFLAGS)" != x; then echo "LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)"; fi` \
422 `if test x"$(LIBGCC2_INCLUDES)" != x; then echo "LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)"; fi` \
423 `if test x"$(ENQUIRE)" != x; then echo "ENQUIRE=$(ENQUIRE)"; fi` \
424 `if test x"$(BOOT_CFLAGS)" != x; then echo "BOOT_CFLAGS=$(BOOT_CFLAGS)"; fi`
426 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
428 # This is a list of the targets for all of the modules which are compiled
429 # using $(FLAGS_TO_PASS).
456 $(start-sanitize-ide
) \
458 $(end-sanitize-ide
) \
465 $(start-sanitize-ide
) \
467 $(end-sanitize-ide
) \
491 $(start-sanitize-ide
) \
493 $(end-sanitize-ide
) \
496 # This is a list of the check targets for all of the modules which are
497 # compiled using $(FLAGS_TO_PASS).
499 # The list is in two parts. The first lists those tools which
500 # are tested as part of the host's native tool-chain, and not
501 # tested in a cross configuration.
502 NATIVE_CHECK_MODULES
= \
506 CROSS_CHECK_MODULES
= \
528 $(start-sanitize-ide
) \
530 $(end-sanitize-ide
) \
537 $(start-sanitize-ide
) \
539 $(end-sanitize-ide
) \
562 $(start-sanitize-ide
) \
564 $(end-sanitize-ide
) \
567 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
569 # This is a list of the install targets for all of the modules which are
570 # compiled using $(FLAGS_TO_PASS).
571 # We put install-opcodes before install-binutils because the installed
572 # binutils might be on PATH, and they might need the shared opcodes
601 $(start-sanitize-ide
) \
603 $(end-sanitize-ide
) \
610 $(start-sanitize-ide
) \
612 $(end-sanitize-ide
) \
634 $(start-sanitize-ide
) \
636 $(end-sanitize-ide
) \
639 # This is a list of the targets for all of the modules which are compiled
640 # using $(X11_FLAGS_TO_PASS).
651 # This is a list of the check targets for all of the modules which are
652 # compiled using $(X11_FLAGS_TO_PASS).
653 CHECK_X11_MODULES
= \
661 # This is a list of the install targets for all the modules which are
662 # compiled using $(X11_FLAGS_TO_PASS).
663 INSTALL_X11_MODULES
= \
673 # This is a list of the targets for all of the modules which are compiled
674 # using $(TARGET_FLAGS_TO_PASS).
675 ALL_TARGET_MODULES
= \
677 all-target-libstdc
++ \
682 all-target-libgloss \
683 all-target-libiberty \
686 # This is a list of the configure targets for all of the modules which
687 # are compiled using the target tools.
688 CONFIGURE_TARGET_MODULES
= \
689 configure-target-libio \
690 configure-target-libstdc
++ \
691 configure-target-librx \
692 configure-target-libg
++ \
693 configure-target-newlib \
694 configure-target-winsup \
695 configure-target-libgloss \
696 configure-target-libiberty \
697 configure-target-examples
699 # This is a list of the check targets for all of the modules which are
700 # compiled using $(TARGET_FLAGS_TO_PASS).
701 CHECK_TARGET_MODULES
= \
703 check-target-libstdc
++ \
704 check-target-libg
++ \
705 check-target-newlib \
706 check-target-winsup \
707 check-target-libiberty
709 # This is a list of the install targets for all of the modules which are
710 # compiled using $(TARGET_FLAGS_TO_PASS).
711 INSTALL_TARGET_MODULES
= \
712 install-target-libio \
713 install-target-libstdc
++ \
714 install-target-libg
++ \
715 install-target-newlib \
716 install-target-winsup \
717 install-target-libgloss \
718 install-target-libiberty
720 # This is a list of the targets for which we can do a clean-{target}.
747 $(start-sanitize-ide
) \
749 $(end-sanitize-ide
) \
756 $(start-sanitize-ide
) \
758 $(end-sanitize-ide
) \
782 $(start-sanitize-ide
) \
784 $(end-sanitize-ide
) \
787 # All of the target modules that can be cleaned
788 CLEAN_TARGET_MODULES
= \
790 clean-target-libstdc
++ \
792 clean-target-libg
++ \
793 clean-target-newlib \
794 clean-target-winsup \
795 clean-target-libgloss \
796 clean-target-libiberty \
797 clean-target-examples
799 # All of the x11 modules that can be cleaned
800 CLEAN_X11_MODULES
= \
810 # The first rule in the file had better be this one. Don't put any above it.
814 # The target built for a native build.
819 $(ALL_TARGET_MODULES
) \
822 # Do a target for all the subdirectories. A ``make do-X'' will do a
823 # ``make X'' in all subdirectories (because, in general, there is a
824 # dependency (below) of X upon do-X, a ``make X'' will also do this,
825 # but it may do additional work as well).
826 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
827 # because it is so large that it can easily overflow the command line
828 # length limit on some systems.
837 do-maintainer-clean \
841 @target
=`echo $@ | sed -e 's/^do-//'`; \
843 s
=`cd $(srcdir); pwd`; export s
; \
845 for i in
$(SUBDIRS
) -dummy-
; do \
846 if
[ -f .
/$$i/Makefile
]; then \
849 for flag in
$(EXTRA_GCC_FLAGS
); do \
850 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
854 for flag in
$(EXTRA_HOST_FLAGS
); do \
855 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
859 export AR AS CC CXX LD NM RANLIB DLLTOOL
; \
861 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
862 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
863 "RANLIB=$${RANLIB}" \
864 "DLLTOOL=$${DLLTOOL}" \
866 then true
; else exit
1; fi
; \
869 @target
=`echo $@ | sed -e 's/^do-//'`; \
871 s
=`cd $(srcdir); pwd`; export s
; \
873 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
874 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
875 for flag in
$(EXTRA_TARGET_FLAGS
); do \
876 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
878 export AR AS CC CXX LD NM RANLIB DLLTOOL
; \
879 if
(cd
$(TARGET_SUBDIR
)/$$i; \
880 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
881 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
882 "RANLIB=$${RANLIB}" \
883 "DLLTOOL=$${DLLTOOL}" \
885 then true
; else exit
1; fi
; \
889 # Here are the targets which correspond to the do-X targets.
891 .PHONY
: info installcheck dvi install-info
892 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
893 .PHONY
: local-clean local-distclean local-maintainer-clean
895 installcheck: do-installcheck
898 # Make sure makeinfo is built before we do a `make info'.
901 install-info
: do-install-info
dir.
info
902 s
=`cd $(srcdir); pwd`; export s
; \
903 if
[ -f
dir.
info ] ; then \
904 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
908 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
911 -rm -f Makefile config.status config.cache
912 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
913 rm -rf
$(TARGET_SUBDIR
); \
916 local-maintainer-clean
:
917 @echo
"This command is intended for maintainers to use;"
918 @echo
"it deletes files that may require special tools to rebuild."
920 clean: do-clean local-clean
921 mostlyclean: do-mostlyclean local-clean
922 distclean: do-distclean local-clean local-distclean
923 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
924 maintainer-clean
: local-distclean
925 realclean: maintainer-clean
927 # This rule is used to clean specific modules.
928 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
929 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
930 @
dir=`echo $@ | sed -e 's/clean-//'`; \
931 if
[ -f .
/$${dir}/Makefile
] ; then \
933 s
=`cd $(srcdir); pwd`; export s
; \
935 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
940 .PHONY
: $(CLEAN_TARGET_MODULES
)
941 $(CLEAN_TARGET_MODULES
):
942 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
943 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
944 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
946 s
=`cd $(srcdir); pwd`; export s
; \
948 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
953 clean-target
: $(CLEAN_TARGET_MODULES
)
958 check: $(CHECK_MODULES
) \
959 $(CHECK_TARGET_MODULES
) \
960 $(CHECK_X11_MODULES
) \
963 # Installation targets.
965 .PHONY
: install uninstall source-vault binary-vault vault-install
966 install: $(INSTALL_TARGET
)
969 @echo
"the uninstall target is not supported in this tree"
972 $(MAKE
) -f .
/release
/Build-A-Release \
973 host
=$(host_alias
) source-vault
976 $(MAKE
) -f .
/release
/Build-A-Release \
977 host
=$(host_alias
) target
=$(target_alias
)
980 @if
[ -f .
/release
/vault-install
] ; then \
981 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
987 install.
all: install-no-fixedincludes
988 @if
[ -f .
/gcc
/Makefile
] ; then \
989 r
=`pwd` ; export r
; \
992 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
997 # inet-install is used because the I*Net wants DejaGNU installed but
998 # not built. Similarly, gzip is built but not installed.
1000 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1002 # install-no-fixedincludes is used because Cygnus can not distribute
1003 # the fixed header files.
1004 .PHONY
: install-no-fixedincludes
1005 install-no-fixedincludes
: \
1007 $(INSTALL_MODULES
) \
1008 $(INSTALL_TARGET_MODULES
) \
1009 $(INSTALL_X11_MODULES
) \
1010 gcc-no-fixedincludes
1012 # Install the gcc headers files, but not the fixed include files,
1013 # which Cygnus is not allowed to distribute. This rule is very
1014 # dependent on the workings of the gcc Makefile.in.
1015 .PHONY
: gcc-no-fixedincludes
1016 gcc-no-fixedincludes
:
1017 @if
[ -f .
/gcc
/Makefile
]; then \
1018 rm -rf gcc
/tmp-include
; \
1019 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1020 mkdir gcc
/include; \
1021 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1022 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1023 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1024 r
=`pwd`; export r
; \
1025 s
=`cd $(srcdir); pwd` ; export s
; \
1028 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1029 rm -rf gcc
/include; \
1030 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1033 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1034 # build a target all-X means to cd to X and make all.
1036 # all-gui, and all-libproc are handled specially because
1037 # they are still experimental, and if they fail to build, that
1038 # shouldn't stop "make all".
1039 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1040 $(ALL_MODULES
) all-gui all-libproc
:
1041 @
dir=`echo $@ | sed -e 's/all-//'`; \
1042 if
[ -f .
/$${dir}/Makefile
] ; then \
1043 r
=`pwd`; export r
; \
1044 s
=`cd $(srcdir); pwd`; export s
; \
1046 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1051 # These rules are used to check the modules which use FLAGS_TO_PASS.
1052 # To build a target check-X means to cd to X and make check. Some
1053 # modules are only tested in a native toolchain.
1055 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1056 $(NATIVE_CHECK_MODULES
):
1057 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1058 dir=`echo $@ | sed -e 's/check-//'`; \
1059 if
[ -f .
/$${dir}/Makefile
] ; then \
1060 r
=`pwd`; export r
; \
1061 s
=`cd $(srcdir); pwd`; export s
; \
1063 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1069 $(CROSS_CHECK_MODULES
):
1070 @
dir=`echo $@ | sed -e 's/check-//'`; \
1071 if
[ -f .
/$${dir}/Makefile
] ; then \
1072 r
=`pwd`; export r
; \
1073 s
=`cd $(srcdir); pwd`; export s
; \
1075 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1080 # This rule is used to install the modules which use FLAGS_TO_PASS.
1081 # To build a target install-X means to cd to X and make install.
1082 .PHONY
: $(INSTALL_MODULES
)
1083 $(INSTALL_MODULES
): installdirs
1084 @
dir=`echo $@ | sed -e 's/install-//'`; \
1085 if
[ -f .
/$${dir}/Makefile
] ; then \
1086 r
=`pwd`; export r
; \
1087 s
=`cd $(srcdir); pwd`; export s
; \
1089 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1094 # This rule is used to configure the modules which are built with the
1096 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1097 $(CONFIGURE_TARGET_MODULES
):
1098 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1099 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1100 r
=`pwd`; export r
; \
1101 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1102 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1103 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1104 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1105 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1107 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1108 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1109 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1112 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1115 fi
; exit
0 # break command into two pieces
1116 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1117 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1119 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1121 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1122 if
[ -d
$(srcdir)/$${dir} ]; then \
1123 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1124 r
=`pwd`; export r
; \
1125 s
=`cd $(srcdir); pwd`; export s
; \
1127 AR
="$(AR_FOR_TARGET)"; export AR
; \
1128 AS
="$(AS_FOR_TARGET)"; export AS
; \
1129 CC
="$(CC_FOR_TARGET)"; export CC
; \
1130 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1131 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1132 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1133 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1134 LD
="$(LD_FOR_TARGET)"; export LD
; \
1135 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1136 NM
="$(NM_FOR_TARGET)"; export NM
; \
1137 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1138 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1139 cd
$(TARGET_SUBDIR
)/$${dir}; \
1142 topdir
=$(srcdir) ;; \
1144 case
"$(TARGET_SUBDIR)" in \
1145 .
) topdir
="../$(srcdir)" ;; \
1146 *) topdir
="../../$(srcdir)" ;; \
1149 if
[ "$(srcdir)" = "." ] ; then \
1150 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1151 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1152 if
[ -f Makefile
]; then \
1153 if
$(MAKE
) distclean; then \
1167 srcdiroption
="--srcdir=."; \
1170 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1171 libsrcdir
="$$s/$${dir}"; \
1173 if
[ -f
$${libsrcdir}/configure
] ; then \
1174 $(SHELL
) $${libsrcdir}/configure \
1175 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1176 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1178 $(SHELL
) $$s/configure \
1179 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1180 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1189 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1190 # To build a target all-X means to cd to X and make all.
1191 .PHONY
: $(ALL_TARGET_MODULES
)
1192 $(ALL_TARGET_MODULES
):
1193 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1194 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1195 r
=`pwd`; export r
; \
1196 s
=`cd $(srcdir); pwd`; export s
; \
1198 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1203 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1204 # To build a target install-X means to cd to X and make install.
1205 .PHONY
: $(CHECK_TARGET_MODULES
)
1206 $(CHECK_TARGET_MODULES
):
1207 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1208 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1209 r
=`pwd`; export r
; \
1210 s
=`cd $(srcdir); pwd`; export s
; \
1212 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1217 # This rule is used to install the modules which use
1218 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1220 .PHONY
: $(INSTALL_TARGET_MODULES
)
1221 $(INSTALL_TARGET_MODULES
): installdirs
1222 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1223 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1224 r
=`pwd`; export r
; \
1225 s
=`cd $(srcdir); pwd`; export s
; \
1227 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1228 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1233 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1234 # To build a target all-X means to cd to X and make all.
1235 .PHONY
: $(ALL_X11_MODULES
)
1237 @
dir=`echo $@ | sed -e 's/all-//'`; \
1238 if
[ -f .
/$${dir}/Makefile
] ; then \
1239 r
=`pwd`; export r
; \
1240 s
=`cd $(srcdir); pwd`; export s
; \
1243 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1248 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1249 # To build a target check-X means to cd to X and make all.
1250 .PHONY
: $(CHECK_X11_MODULES
)
1251 $(CHECK_X11_MODULES
):
1252 @
dir=`echo $@ | sed -e 's/check-//'`; \
1253 if
[ -f .
/$${dir}/Makefile
] ; then \
1254 r
=`pwd`; export r
; \
1255 s
=`cd $(srcdir); pwd`; export s
; \
1258 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1263 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1264 # To build a target install-X means to cd to X and make install.
1265 .PHONY
: $(INSTALL_X11_MODULES
)
1266 $(INSTALL_X11_MODULES
):
1267 @
dir=`echo $@ | sed -e 's/install-//'`; \
1268 if
[ -f .
/$${dir}/Makefile
] ; then \
1269 r
=`pwd`; export r
; \
1270 s
=`cd $(srcdir); pwd`; export s
; \
1273 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1278 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1281 @if
[ -f .
/gcc
/Makefile
] ; then \
1282 r
=`pwd`; export r
; \
1283 s
=`cd $(srcdir); pwd`; export s
; \
1285 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1290 .PHONY
: all-bootstrap
1292 @if
[ -f .
/gcc
/Makefile
] ; then \
1293 r
=`pwd`; export r
; \
1294 s
=`cd $(srcdir); pwd`; export s
; \
1296 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) bootstrap
); \
1303 @if
[ -f .
/gcc
/Makefile
] ; then \
1304 r
=`pwd`; export r
; \
1305 s
=`cd $(srcdir); pwd`; export s
; \
1307 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1314 @if
[ -f .
/gcc
/Makefile
] ; then \
1315 r
=`pwd`; export r
; \
1316 s
=`cd $(srcdir); pwd`; export s
; \
1318 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1324 # EXPERIMENTAL STUFF
1325 # This rule is used to install the modules which use FLAGS_TO_PASS.
1326 # To build a target install-X means to cd to X and make install.
1327 .PHONY
: install-dosrel
1328 install-dosrel
: installdirs info
1329 @
dir=`echo $@ | sed -e 's/install-//'`; \
1330 if
[ -f .
/$${dir}/Makefile
] ; then \
1331 r
=`pwd`; export r
; \
1332 s
=`cd $(srcdir); pwd`; export s
; \
1334 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1339 install-dosrel-fake
:
1342 # This is a list of inter-dependencies among modules.
1344 all-autoconf
: all-m4
1348 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-byacc
1352 all-dejagnu
: all-tcl all-expect all-tk
1353 all-diff
: all-libiberty
1355 all-emacs19
: all-byacc
1357 configure-target-examples
: $(ALL_GCC
)
1358 all-target-examples
: configure-target-examples
1359 all-expect
: all-tcl all-tk
1360 all-fileutils
: all-libiberty
1363 all-flex
: all-libiberty all-byacc
1364 all-gas
: all-libiberty all-opcodes all-bfd
1368 all-gcc
: all-byacc all-binutils all-gas all-ld
1369 all-bootstrap
: all-libiberty all-byacc all-binutils all-gas all-ld
1370 GDB_TK
= all-tk all-tcl
1371 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1373 all-gprof
: all-libiberty all-bfd all-opcodes
1374 all-grep
: all-libiberty
1375 all-grez
: all-libiberty all-bfd all-opcodes
1376 all-gui
: all-gdb all-libproc all-target-librx
1378 all-gzip
: all-libiberty
1379 all-hello
: all-libiberty
1380 # start-sanitize-ide
1384 all-inet
: all-tcl all-send-pr all-perl
1385 all-ispell
: all-emacs19
1386 all-itcl
: all-tcl all-tk
1387 all-ld
: all-libiberty all-bfd all-opcodes all-byacc all-flex
1388 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1389 all-target-libg
++: configure-target-libg
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc
++
1390 configure-target-libgloss
: $(ALL_GCC
)
1391 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1392 configure-target-libio
: $(ALL_GCC
)
1393 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1395 # start-sanitize-ide
1396 all-libide
: all-tcl all-tk all-itcl all-ilu
1398 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1399 all-target-librx
: configure-target-librx
1400 configure-target-libstdc
++: $(ALL_GCC
)
1401 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1402 all-m4
: all-libiberty
1403 all-make
: all-libiberty
1405 configure-target-newlib
: $(ALL_GCC
)
1406 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1407 all-opcodes
: all-bfd all-libiberty
1408 all-patch
: all-libiberty
1410 all-prms
: all-libiberty
1413 all-recode
: all-libiberty
1414 all-sed
: all-libiberty
1415 all-send-pr
: all-prms
1417 all-sim
: all-libiberty all-bfd all-opcodes
1418 all-sn
: all-tcl all-tk all-itcl all-db
1419 all-tar
: all-libiberty
1421 all-tclX
: all-tcl all-tk
1423 all-texinfo
: all-libiberty
1425 all-tgas
: all-libiberty all-bfd all-opcodes
1427 # start-sanitize-ide
1428 all-vmake
: all-tcl all-tk all-itcl all-libide
1431 all-target-winsup
: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1432 configure-target-winsup
: configure-target-newlib
1433 all-uudecode
: all-libiberty
1434 configure-target-libiberty
: $(ALL_GCC
)
1435 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1436 all-target
: $(ALL_TARGET_MODULES
)
1437 install-target
: $(INSTALL_TARGET_MODULES
)
1439 ### other supporting targets
1445 installdirs: mkinstalldirs
1446 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1448 dir.
info: do-install-info
1449 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1450 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1451 mv
-f
dir.
info.new
dir.
info ; \
1456 @echo
"Building a full distribution of this tree isn't done"
1457 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1461 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1462 # ability to use several tags files at once, so there is probably no need
1463 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1464 # (if we felt like it) have this Makefile write a piece of elisp which
1465 # the user could load to tell emacs19 where all the TAGS files we just
1469 # with the gnu make, this is done automatically.
1471 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
1472 $(SHELL
) .
/config.status
1475 # Support for building net releases
1477 # Files in devo used in any net release.
1478 # ChangeLog omitted because it may refer to files which are not in this
1479 # distribution (perhaps it would be better to include it anyway).
1480 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1481 config.guess config.sub config move-if-change \
1482 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1483 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1486 # Files in devo/etc used in any net release.
1487 # ChangeLog omitted because it may refer to files which are not in this
1488 # distribution (perhaps it would be better to include it anyway).
1489 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1490 make-stds.texi standards.
info*
1492 # When you use `make setup-dirs' or `make taz' you should always redefine
1494 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1498 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1499 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1500 # Take out texinfo from a few places; make simple BISON=bison line.
1501 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1502 -e
'/^ install-texinfo /d' \
1503 -e
'/^BISON = `if/,/^$$/d' \
1504 -e
'/^# BISON:/s/.*/BISON = $(DEFAULT_YACC)/' \
1506 mv
-f tmp Makefile.in
1508 $(start-sanitize-Sanitize
)
1509 @if
[ -f .Sanitize
] ; then echo
"RUN Sanitize FIRST!" ; false
; fi
;
1510 $(end-sanitize-Sanitize
)
1512 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1513 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1514 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1515 # Make links, and run "make diststuff" or "make info" when needed.
1516 rm -rf proto-toplev
; mkdir proto-toplev
1517 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1518 for d in
$$dirs ; do \
1519 if
[ -d
$$d ]; then \
1520 if
[ ! -f
$$d/Makefile
] ; then true
; \
1521 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1522 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1523 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1524 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1526 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1527 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1529 ln
-s ..
/$$d proto-toplev
/$$d ; \
1531 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1533 cd etc
; $(MAKE
) info
1536 mkdir proto-toplev
/etc
1537 (cd proto-toplev
/etc
; \
1538 for i in
$(ETC_SUPPORT
); do \
1539 ln
-s ..
/..
/etc
/$$i .
; \
1542 # Take out texinfo from configurable dirs
1543 rm proto-toplev
/configure.in
1544 sed
-e
'/^host_tools=/s/texinfo //' \
1545 <configure.in
>proto-toplev
/configure.in
1547 mkdir proto-toplev
/texinfo
1548 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1549 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1550 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1551 if
test -r texinfo
/util
/tex3patch
; then \
1552 mkdir proto-toplev
/texinfo
/util
&& \
1553 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1555 chmod og
=u
`find . -print`
1556 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) \
1557 VER
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`
1560 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1561 -rm -f
$(TOOL
)-$(VER
)
1562 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1563 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1564 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1566 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1567 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1570 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes setup.com makefile.vms
1571 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1572 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1573 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1575 # The FSF "binutils" release includes gprof and ld.
1576 .PHONY
: binutils.
tar.gz
1577 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof setup.com makefile.vms
1578 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1579 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1580 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1582 .PHONY
: gas
+binutils.
tar.gz
1583 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1584 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1585 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1586 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1588 .PHONY
: libg
++.
tar.gz
1589 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1590 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1591 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1592 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1594 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1595 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1596 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1597 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1600 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils
1601 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1602 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1603 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1604 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1606 .PHONY
: newlib.
tar.gz
1607 NEWLIB_SUPPORT_DIRS
=libgloss
1608 # taz configures for the sun4 target which won't configure newlib.
1609 # We need newlib configured so that the .info files are made.
1610 # Unfortunately, it is not enough to just configure newlib separately:
1611 # taz will build the .info files but since SUBDIRS won't contain newlib,
1612 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1613 # used in building the .info files, eg: *.def, *.ref).
1614 # The problem isn't solvable however without a lot of extra work because
1615 # target libraries are built in subdir $(target_alias) which gets nuked during
1616 # the make distclean. For now punt on the issue of shipping newlib info files
1617 # with newlib net releases and wait for a day when some native target (sun4?)
1618 # supports newlib (if only minimally).
1619 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1620 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1621 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1622 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1627 # start-sanitize-chill
1628 ## This is ugly, but I don't want GNU make to put these variables in
1629 ## the environment. Older makes will see this as a set of targets
1630 ## with no dependencies and no actions.
1631 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1632 # end-sanitize-chill
1634 # end of Makefile.in