2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998 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
44 # Directory in which the compiler finds executables, libraries, etc.
45 libsubdir
= $(libdir)/gcc-lib
/$(target_alias
)/$(gcc_version
)
50 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
52 INSTALL_PROGRAM_ARGS
=
54 INSTALL
= $(SHELL
) $$s/install-sh
-c
55 INSTALL_PROGRAM
= $(INSTALL
) $(INSTALL_PROGRAM_ARGS
)
56 INSTALL_SCRIPT
= $(INSTALL
)
57 INSTALL_DATA
= $(INSTALL
) -m
644
59 INSTALL_DOSREL
= install-dosrel-fake
66 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
67 # here so that they can be overridden by Makefile fragments.
68 HOST_CC
= $(CC_FOR_BUILD
)
70 HOST_PREFIX_1
= loser-
72 # These flag values are normally overridden by the configure script.
77 CFLAGS_FOR_TARGET
= $(CFLAGS
)
79 LIBCFLAGS_FOR_TARGET
= $(CFLAGS_FOR_TARGET
)
85 # Use -O2 to stress test the compiler.
86 LIBCXXFLAGS
= $(CXXFLAGS
) -fno-implicit-templates
87 CXXFLAGS_FOR_TARGET
= $(CXXFLAGS
)
88 LIBCXXFLAGS_FOR_TARGET
= $(CXXFLAGS_FOR_TARGET
) -fno-implicit-templates
99 # Not plain GZIP, since gzip looks there for extra command-line options.
102 # These values are substituted by configure.
107 BISON
= `if [ -f $$r/bison/bison ] ; then \
108 echo $$r/bison/bison -L $$s/bison/ ; \
113 YACC
= `if [ -f $$r/bison/bison ] ; then \
114 echo $$r/bison/bison -y -L $$s/bison/ ; \
115 elif [ -f $$r/byacc/byacc ] ; then \
116 echo $$r/byacc/byacc ; \
118 echo ${DEFAULT_YACC} ; \
121 LEX
= `if [ -f $$r/flex/flex ] ; \
122 then echo $$r/flex/flex ; \
123 else echo ${DEFAULT_LEX} ; fi`
125 M4
= `if [ -f $$r/m4/m4 ] ; \
126 then echo $$r/m4/m4 ; \
127 else echo ${DEFAULT_M4} ; fi`
129 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
130 then echo $$r/texinfo/makeinfo/makeinfo ; \
131 else echo makeinfo ; fi`
133 # This just becomes part of the MAKEINFO definition passed down to
134 # sub-makes. It lets flags be given on the command line while still
135 # using the makeinfo from the object tree.
138 EXPECT
= `if [ -f $$r/expect/expect ] ; \
139 then echo $$r/expect/expect ; \
140 else echo expect ; fi`
142 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
143 then echo $$s/dejagnu/runtest ; \
144 else echo runtest ; fi`
147 # compilers to use to create programs which must be run in the build
150 CXX_FOR_BUILD
= $(CXX
)
152 SUBDIRS
= "this is set via configure, don't edit this"
155 # This is set by the configure script to the list of directories which
156 # should be built using the target tools.
157 TARGET_CONFIGDIRS
= libiberty libgloss newlib libio librx libstdc
++ libg
++ libf2c winsup
159 # Target libraries are put under this directory:
160 # Changed by configure to $(target_alias) if cross.
163 # This is set by the configure script to the arguments passed to configure.
166 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
170 # This is the name of the environment variable used for the path to
171 # the libraries. This may be changed by configure.in.
172 RPATH_ENVVAR
= LD_LIBRARY_PATH
174 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
175 REALLY_SET_LIB_PATH
= \
176 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
177 export $(RPATH_ENVVAR
);
180 INSTALL_TARGET
= installdirs \
183 $(INSTALL_TARGET_MODULES
) \
184 $(INSTALL_X11_MODULES
) \
187 INSTALL_TARGET_CROSS
= installdirs \
190 $(INSTALL_TARGET_MODULES
) \
191 $(INSTALL_X11_MODULES
) \
195 if [ -f $$r/gcc/xgcc ] ; then \
196 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
197 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
198 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
200 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
203 echo $$r/gcc/xgcc -B$$r/gcc/; \
206 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
209 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
213 # If CC_FOR_TARGET is not overriden on the command line, then this
214 # variable is passed down to the gcc Makefile, where it is used to
215 # build libgcc2.a. We define it here so that it can itself be
216 # overridden on the command line.
217 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/
221 if [ -f $$r/gcc/xgcc ] ; then \
222 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
223 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
224 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
226 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
229 echo $$r/gcc/xgcc -B$$r/gcc/; \
232 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
235 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
240 if [ -f $$r/gas/as-new ] ; then \
241 echo $$r/gas/as-new ; \
243 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
246 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
251 if [ -f $$r/ld/ld-new ] ; then \
252 echo $$r/ld/ld-new ; \
254 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
257 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
261 DLLTOOL_FOR_TARGET
= ` \
262 if [ -f $$r/binutils/dlltool ] ; then \
263 echo $$r/binutils/dlltool ; \
265 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
268 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
272 WINDRES_FOR_TARGET
= ` \
273 if [ -f $$r/binutils/windres ] ; then \
274 echo $$r/binutils/windres ; \
276 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
279 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
284 if [ -f $$r/binutils/ar ] ; then \
285 echo $$r/binutils/ar ; \
287 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
290 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
294 RANLIB_FOR_TARGET
= ` \
295 if [ -f $$r/binutils/ranlib ] ; then \
296 echo $$r/binutils/ranlib ; \
298 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
301 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
306 if [ -f $$r/binutils/nm-new ] ; then \
307 echo $$r/binutils/nm-new ; \
309 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
312 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
316 #### host and target specific makefile fragments come in here.
319 # Flags to pass down to all sub-makes.
320 # Please keep these in alphabetical order.
321 BASE_FLAGS_TO_PASS
= \
322 "AR_FLAGS=$(AR_FLAGS)" \
323 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
324 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
326 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
327 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
329 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
330 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
331 "CXXFLAGS=$(CXXFLAGS)" \
332 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
333 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
334 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
335 "INSTALL=$(INSTALL)" \
336 "INSTALL_DATA=$(INSTALL_DATA)" \
337 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
338 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
339 "LDFLAGS=$(LDFLAGS)" \
341 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
342 "LIBCFLAGS=$(LIBCFLAGS)" \
343 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
344 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
345 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
348 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
349 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
350 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
353 "RUNTEST=$(RUNTEST)" \
354 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
355 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
357 "exec_prefix=$(exec_prefix)" \
359 "tooldir=$(tooldir)" \
360 "gxx_include_dir=$(gxx_include_dir)" \
361 "gcc_version=$(gcc_version)" \
362 "target_alias=$(target_alias)" \
363 "libsubdir=$(libsubdir)"
365 # Flags to pass down to most sub-makes, in which we're building with
366 # the host environment.
367 # If any variables are added here, they must be added to do-*, below.
373 'DLLTOOL=$(DLLTOOL)' \
379 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
381 # Flags that are concerned with the location of the X11 include files
384 # NOTE: until the top-level is getting the values via autoconf, it only
385 # causes problems to have this top-level Makefile overriding the autoconf-set
386 # values in child directories. Only variables that don't conflict with
387 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
389 X11_FLAGS_TO_PASS
= \
390 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
391 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
393 # Flags to pass down to makes which are built with the target environment.
394 # The double $ decreases the length of the command line; the variables
395 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
396 # If any variables are added here, they must be added to do-*, below.
397 EXTRA_TARGET_FLAGS
= \
398 'AR=$$(AR_FOR_TARGET)' \
399 'AS=$$(AS_FOR_TARGET)' \
400 'CC=$$(CC_FOR_TARGET)' \
401 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
402 'CXX=$$(CXX_FOR_TARGET)' \
403 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
404 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
405 'LD=$$(LD_FOR_TARGET)' \
406 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
407 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
408 'NM=$$(NM_FOR_TARGET)' \
409 'RANLIB=$$(RANLIB_FOR_TARGET)' \
410 'WINDRES=$$(WINDRES_FOR_TARGET)'
412 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
414 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
415 # unfortunately needs the native compiler and the target ar and
417 # If any variables are added here, they must be added to do-*, below.
418 # The HOST_* variables are a special case, which are used for the gcc
419 # cross-building scheme.
421 'AR=$$(AR_FOR_TARGET)' \
425 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
426 'HOST_CC=$(CC_FOR_BUILD)' \
427 'HOST_PREFIX=$(HOST_PREFIX)' \
428 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
430 'RANLIB=$$(RANLIB_FOR_TARGET)' \
431 'WINDRES=$$(WINDRES_FOR_TARGET)' \
432 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
433 "`if test x'$(LANGUAGES)' != x; then echo 'LANGUAGES=$(LANGUAGES)'; else echo 'XFOO=bar'; fi`" \
434 "`if test x'$(STMP_FIXPROTO)' != x; then echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)'; else echo 'XFOO=bar'; fi`" \
435 "`if test x'$(LIMITS_H_TEST)' != x; then echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)'; else echo 'XFOO=bar'; fi`" \
436 "`if test x'$(LIBGCC1_TEST)' != x; then echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)'; else echo 'XFOO=bar'; fi`" \
437 "`if test x'$(LIBGCC2_CFLAGS)' != x; then echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
438 "`if test x'$(LIBGCC2_DEBUG_CFLAGS)' != x; then echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
439 "`if test x'$(LIBGCC2_INCLUDES)' != x; then echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)'; else echo 'XFOO=bar'; fi`" \
440 "`if test x'$(ENQUIRE)' != x; then echo 'ENQUIRE=$(ENQUIRE)'; else echo 'XFOO=bar'; fi`" \
441 "`if test x'$(BOOT_CFLAGS)' != x; then echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)'; else echo 'XFOO=bar'; fi`"
443 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
445 # This is a list of the targets for all of the modules which are compiled
446 # using $(FLAGS_TO_PASS).
505 # This is a list of the check targets for all of the modules which are
506 # compiled using $(FLAGS_TO_PASS).
508 # The list is in two parts. The first lists those tools which
509 # are tested as part of the host's native tool-chain, and not
510 # tested in a cross configuration.
511 NATIVE_CHECK_MODULES
= \
516 CROSS_CHECK_MODULES
= \
568 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
570 # This is a list of the install targets for all of the modules which are
571 # compiled using $(FLAGS_TO_PASS).
572 # We put install-opcodes before install-binutils because the installed
573 # binutils might be on PATH, and they might need the shared opcodes
631 # This is a list of the targets for all of the modules which are compiled
632 # using $(X11_FLAGS_TO_PASS).
644 # This is a list of the check targets for all of the modules which are
645 # compiled using $(X11_FLAGS_TO_PASS).
646 CHECK_X11_MODULES
= \
656 # This is a list of the install targets for all the modules which are
657 # compiled using $(X11_FLAGS_TO_PASS).
658 INSTALL_X11_MODULES
= \
669 # This is a list of the targets for all of the modules which are compiled
670 # using $(TARGET_FLAGS_TO_PASS).
671 ALL_TARGET_MODULES
= \
673 all-target-libstdc
++ \
679 all-target-libgloss \
680 all-target-libiberty \
684 # This is a list of the configure targets for all of the modules which
685 # are compiled using the target tools.
686 CONFIGURE_TARGET_MODULES
= \
687 configure-target-libio \
688 configure-target-libstdc
++ \
689 configure-target-librx \
690 configure-target-libg
++ \
691 configure-target-newlib \
692 configure-target-libf2c \
693 configure-target-winsup \
694 configure-target-libgloss \
695 configure-target-libiberty \
696 configure-target-gperf \
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-libf2c \
707 check-target-winsup \
708 check-target-libiberty \
711 # This is a list of the install targets for all of the modules which are
712 # compiled using $(TARGET_FLAGS_TO_PASS).
713 INSTALL_TARGET_MODULES
= \
714 install-target-libio \
715 install-target-libstdc
++ \
716 install-target-libg
++ \
717 install-target-newlib \
718 install-target-libf2c \
719 install-target-winsup \
720 install-target-libgloss \
721 install-target-libiberty \
724 # This is a list of the targets for which we can do a clean-{target}.
783 # All of the target modules that can be cleaned
784 CLEAN_TARGET_MODULES
= \
786 clean-target-libstdc
++ \
788 clean-target-libg
++ \
789 clean-target-newlib \
790 clean-target-libf2c \
791 clean-target-winsup \
792 clean-target-libgloss \
793 clean-target-libiberty \
795 clean-target-examples
797 # All of the x11 modules that can be cleaned
798 CLEAN_X11_MODULES
= \
809 # The first rule in the file had better be this one. Don't put any above it.
813 # The target built for a native build.
818 $(ALL_TARGET_MODULES
) \
821 # Do a target for all the subdirectories. A ``make do-X'' will do a
822 # ``make X'' in all subdirectories (because, in general, there is a
823 # dependency (below) of X upon do-X, a ``make X'' will also do this,
824 # but it may do additional work as well).
825 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
826 # because it is so large that it can easily overflow the command line
827 # length limit on some systems.
836 do-maintainer-clean \
840 @target
=`echo $@ | sed -e 's/^do-//'`; \
842 s
=`cd $(srcdir); pwd`; export s
; \
844 for i in
$(SUBDIRS
) -dummy-
; do \
845 if
[ -f .
/$$i/Makefile
]; then \
848 for flag in
$(EXTRA_GCC_FLAGS
); do \
849 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
853 for flag in
$(EXTRA_HOST_FLAGS
); do \
854 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
858 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
860 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
861 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
862 "RANLIB=$${RANLIB}" \
863 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
865 then true
; else exit
1; fi
; \
868 @target
=`echo $@ | sed -e 's/^do-//'`; \
870 s
=`cd $(srcdir); pwd`; export s
; \
872 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
873 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
874 for flag in
$(EXTRA_TARGET_FLAGS
); do \
875 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
877 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
878 if
(cd
$(TARGET_SUBDIR
)/$$i; \
879 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
880 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
881 "RANLIB=$${RANLIB}" \
882 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
884 then true
; else exit
1; fi
; \
888 # Here are the targets which correspond to the do-X targets.
890 .PHONY
: info installcheck dvi install-info
891 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
892 .PHONY
: local-clean local-distclean local-maintainer-clean
894 installcheck: do-installcheck
897 # Make sure makeinfo is built before we do a `make info'.
900 install-info
: do-install-info
dir.
info
901 s
=`cd $(srcdir); pwd`; export s
; \
902 if
[ -f
dir.
info ] ; then \
903 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
907 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E *.log
910 -rm -f Makefile config.status config.cache mh-frag mt-frag
911 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
912 rm -rf
$(TARGET_SUBDIR
); \
915 local-maintainer-clean
:
916 @echo
"This command is intended for maintainers to use;"
917 @echo
"it deletes files that may require special tools to rebuild."
919 clean: do-clean local-clean
920 mostlyclean: do-mostlyclean local-clean
921 distclean: do-distclean local-clean local-distclean
922 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
923 maintainer-clean
: local-distclean
924 realclean: maintainer-clean
926 # This rule is used to clean specific modules.
927 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
928 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
929 @
dir=`echo $@ | sed -e 's/clean-//'`; \
930 if
[ -f .
/$${dir}/Makefile
] ; then \
932 s
=`cd $(srcdir); pwd`; export s
; \
934 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
939 .PHONY
: $(CLEAN_TARGET_MODULES
)
940 $(CLEAN_TARGET_MODULES
):
941 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
942 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
943 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
945 s
=`cd $(srcdir); pwd`; export s
; \
947 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
952 clean-target
: $(CLEAN_TARGET_MODULES
)
957 check: $(CHECK_MODULES
) \
958 $(CHECK_TARGET_MODULES
) \
959 $(CHECK_X11_MODULES
) \
962 # Automated reporting of test results.
964 warning.log
: build.log
965 $(srcdir)/contrib
/warn_summary build.log
> $@
968 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
969 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
971 $(srcdir)/contrib
/test_summary
-t
>$@
973 echo If you really want to send e-mail
, run .
/$@ now
975 mail-report-with-warnings.log
: warning.log
976 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
977 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
979 $(srcdir)/contrib
/test_summary
-t
-i warning.log
>$@
981 echo If you really want to send e-mail
, run .
/$@ now
983 # Installation targets.
985 .PHONY
: install install-cross
uninstall source-vault binary-vault vault-install
986 install: $(INSTALL_TARGET
)
987 install-cross
: $(INSTALL_TARGET_CROSS
)
990 @echo
"the uninstall target is not supported in this tree"
993 $(MAKE
) -f .
/release
/Build-A-Release \
994 host
=$(host_alias
) source-vault
997 $(MAKE
) -f .
/release
/Build-A-Release \
998 host
=$(host_alias
) target
=$(target_alias
)
1001 @if
[ -f .
/release
/vault-install
] ; then \
1002 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1008 install.
all: install-no-fixedincludes
1009 @if
[ -f .
/gcc
/Makefile
] ; then \
1010 r
=`pwd` ; export r
; \
1013 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1018 # inet-install is used because the I*Net wants DejaGNU installed but
1019 # not built. Similarly, gzip is built but not installed.
1021 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1023 # install-no-fixedincludes is used because Cygnus can not distribute
1024 # the fixed header files.
1025 .PHONY
: install-no-fixedincludes
1026 install-no-fixedincludes
: \
1028 $(INSTALL_MODULES
) \
1029 $(INSTALL_TARGET_MODULES
) \
1030 $(INSTALL_X11_MODULES
) \
1031 gcc-no-fixedincludes
1033 # Install the gcc headers files, but not the fixed include files,
1034 # which Cygnus is not allowed to distribute. This rule is very
1035 # dependent on the workings of the gcc Makefile.in.
1036 .PHONY
: gcc-no-fixedincludes
1037 gcc-no-fixedincludes
:
1038 @if
[ -f .
/gcc
/Makefile
]; then \
1039 rm -rf gcc
/tmp-include
; \
1040 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1041 mkdir gcc
/include; \
1042 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1043 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1044 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1045 r
=`pwd`; export r
; \
1046 s
=`cd $(srcdir); pwd` ; export s
; \
1049 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1050 rm -rf gcc
/include; \
1051 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1054 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1055 # build a target all-X means to cd to X and make all.
1057 # all-gui, and all-libproc are handled specially because
1058 # they are still experimental, and if they fail to build, that
1059 # shouldn't stop "make all".
1060 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1061 $(ALL_MODULES
) all-gui all-libproc
:
1062 @
dir=`echo $@ | sed -e 's/all-//'`; \
1063 if
[ -f .
/$${dir}/Makefile
] ; then \
1064 r
=`pwd`; export r
; \
1065 s
=`cd $(srcdir); pwd`; export s
; \
1067 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1072 # These rules are used to check the modules which use FLAGS_TO_PASS.
1073 # To build a target check-X means to cd to X and make check. Some
1074 # modules are only tested in a native toolchain.
1076 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1077 $(NATIVE_CHECK_MODULES
):
1078 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1079 dir=`echo $@ | sed -e 's/check-//'`; \
1080 if
[ -f .
/$${dir}/Makefile
] ; then \
1081 r
=`pwd`; export r
; \
1082 s
=`cd $(srcdir); pwd`; export s
; \
1084 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1090 $(CROSS_CHECK_MODULES
):
1091 @
dir=`echo $@ | sed -e 's/check-//'`; \
1092 if
[ -f .
/$${dir}/Makefile
] ; then \
1093 r
=`pwd`; export r
; \
1094 s
=`cd $(srcdir); pwd`; export s
; \
1096 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1101 # This rule is used to install the modules which use FLAGS_TO_PASS.
1102 # To build a target install-X means to cd to X and make install.
1103 .PHONY
: $(INSTALL_MODULES
)
1104 $(INSTALL_MODULES
): installdirs
1105 @
dir=`echo $@ | sed -e 's/install-//'`; \
1106 if
[ -f .
/$${dir}/Makefile
] ; then \
1107 r
=`pwd`; export r
; \
1108 s
=`cd $(srcdir); pwd`; export s
; \
1110 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1115 # This rule is used to configure the modules which are built with the
1117 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1118 $(CONFIGURE_TARGET_MODULES
):
1119 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1120 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1121 r
=`pwd`; export r
; \
1122 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1123 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1124 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1125 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1126 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1128 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1129 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1130 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1133 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1136 fi
; exit
0 # break command into two pieces
1137 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1138 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1140 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1142 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1143 if
[ -d
$(srcdir)/$${dir} ]; then \
1144 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1145 r
=`pwd`; export r
; \
1146 s
=`cd $(srcdir); pwd`; export s
; \
1148 AR
="$(AR_FOR_TARGET)"; export AR
; \
1149 AS
="$(AS_FOR_TARGET)"; export AS
; \
1150 CC
="$(CC_FOR_TARGET)"; export CC
; \
1151 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1152 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1153 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1154 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1155 LD
="$(LD_FOR_TARGET)"; export LD
; \
1156 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1157 NM
="$(NM_FOR_TARGET)"; export NM
; \
1158 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1159 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1160 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1161 cd
$(TARGET_SUBDIR
)/$${dir}; \
1164 topdir
=$(srcdir) ;; \
1166 case
"$(TARGET_SUBDIR)" in \
1167 .
) topdir
="../$(srcdir)" ;; \
1168 *) topdir
="../../$(srcdir)" ;; \
1171 if
[ "$(srcdir)" = "." ] ; then \
1172 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1173 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1174 if
[ -f Makefile
]; then \
1175 if
$(MAKE
) distclean; then \
1189 srcdiroption
="--srcdir=."; \
1192 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1193 libsrcdir
="$$s/$${dir}"; \
1195 if
[ -f
$${libsrcdir}/configure
] ; then \
1196 rm -f no-such-file
; \
1197 CONFIG_SITE
=no-such-file
$(SHELL
) $${libsrcdir}/configure \
1198 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1199 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1201 rm -f no-such-file
; \
1202 CONFIG_SITE
=no-such-file
$(SHELL
) $$s/configure \
1203 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1204 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1213 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1214 # To build a target all-X means to cd to X and make all.
1215 .PHONY
: $(ALL_TARGET_MODULES
)
1216 $(ALL_TARGET_MODULES
):
1217 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1218 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1219 r
=`pwd`; export r
; \
1220 s
=`cd $(srcdir); pwd`; export s
; \
1222 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1227 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1228 # To build a target install-X means to cd to X and make install.
1229 .PHONY
: $(CHECK_TARGET_MODULES
)
1230 $(CHECK_TARGET_MODULES
):
1231 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1232 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1233 r
=`pwd`; export r
; \
1234 s
=`cd $(srcdir); pwd`; export s
; \
1236 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1241 # This rule is used to install the modules which use
1242 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1244 .PHONY
: $(INSTALL_TARGET_MODULES
)
1245 $(INSTALL_TARGET_MODULES
): installdirs
1246 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1247 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1248 r
=`pwd`; export r
; \
1249 s
=`cd $(srcdir); pwd`; export s
; \
1251 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1252 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1257 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1258 # To build a target all-X means to cd to X and make all.
1259 .PHONY
: $(ALL_X11_MODULES
)
1261 @
dir=`echo $@ | sed -e 's/all-//'`; \
1262 if
[ -f .
/$${dir}/Makefile
] ; then \
1263 r
=`pwd`; export r
; \
1264 s
=`cd $(srcdir); pwd`; export s
; \
1267 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1272 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1273 # To build a target check-X means to cd to X and make all.
1274 .PHONY
: $(CHECK_X11_MODULES
)
1275 $(CHECK_X11_MODULES
):
1276 @
dir=`echo $@ | sed -e 's/check-//'`; \
1277 if
[ -f .
/$${dir}/Makefile
] ; then \
1278 r
=`pwd`; export r
; \
1279 s
=`cd $(srcdir); pwd`; export s
; \
1282 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1287 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1288 # To build a target install-X means to cd to X and make install.
1289 .PHONY
: $(INSTALL_X11_MODULES
)
1290 $(INSTALL_X11_MODULES
): installdirs
1291 @
dir=`echo $@ | sed -e 's/install-//'`; \
1292 if
[ -f .
/$${dir}/Makefile
] ; then \
1293 r
=`pwd`; export r
; \
1294 s
=`cd $(srcdir); pwd`; export s
; \
1297 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1302 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1305 @if
[ -f .
/gcc
/Makefile
] ; then \
1306 r
=`pwd`; export r
; \
1307 s
=`cd $(srcdir); pwd`; export s
; \
1309 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1314 # Building GCC uses some tools for rebuilding "source" files
1315 # like texinfo, bison/byacc, etc. So we must depend on those.
1317 # While building GCC, it may be necessary to run various target
1318 # programs like the assembler, linker, etc. So we depend on
1321 # In theory, on an SMP all those dependencies can be resolved
1324 .PHONY
: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1325 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1326 @r
=`pwd`; export r
; \
1327 s
=`cd $(srcdir); pwd`; export s
; \
1329 echo
"Bootstrapping the compiler"; \
1330 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) $@
1331 @r
=`pwd`; export r
; \
1332 s
=`cd $(srcdir); pwd`; export s
; \
1334 *bootstrap4-lean
) \
1335 msg
="Comparing stage3 and stage4 of the compiler"; \
1336 compare
=compare3-lean
;; \
1337 *bootstrap4
) msg
="Comparing stage3 and stage4 of the compiler"; \
1338 compare
=compare3
;; \
1339 *-lean
) msg
="Comparing stage2 and stage3 of the compiler"; \
1340 compare
=compare-lean
;; \
1341 * ) msg
="Comparing stage2 and stage3 of the compiler"; \
1342 compare
=compare
;; \
1346 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) $$compare
1347 @echo
"Building runtime libraries"; \
1351 cross
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1352 @r
=`pwd`; export r
; \
1353 s
=`cd $(srcdir); pwd`; export s
; \
1355 echo
"Building the C and C++ compiler"; \
1356 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++"
1357 @echo
"Building runtime libraries"; \
1358 $(MAKE
) all LANGUAGES
="c c++"
1362 @if
[ -f .
/gcc
/Makefile
] ; then \
1363 r
=`pwd`; export r
; \
1364 s
=`cd $(srcdir); pwd`; export s
; \
1366 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1373 @if
[ -f .
/gcc
/Makefile
] ; then \
1374 r
=`pwd`; export r
; \
1375 s
=`cd $(srcdir); pwd`; export s
; \
1377 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1382 .PHONY
: install-gcc-cross
1384 @if
[ -f .
/gcc
/Makefile
] ; then \
1385 r
=`pwd`; export r
; \
1386 s
=`cd $(srcdir); pwd`; export s
; \
1388 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++" install); \
1392 # EXPERIMENTAL STUFF
1393 # This rule is used to install the modules which use FLAGS_TO_PASS.
1394 # To build a target install-X means to cd to X and make install.
1395 .PHONY
: install-dosrel
1396 install-dosrel
: installdirs info
1397 @
dir=`echo $@ | sed -e 's/install-//'`; \
1398 if
[ -f .
/$${dir}/Makefile
] ; then \
1399 r
=`pwd`; export r
; \
1400 s
=`cd $(srcdir); pwd`; export s
; \
1402 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1407 install-dosrel-fake
:
1410 # This is a list of inter-dependencies among modules.
1412 all-autoconf
: all-m4 all-texinfo
1416 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc
1417 all-bison
: all-texinfo
1421 all-dejagnu
: all-tcl all-expect all-tk
1422 all-diff
: all-libiberty
1424 all-emacs19
: all-bison all-byacc
1426 configure-target-examples
: $(ALL_GCC
)
1427 all-target-examples
: configure-target-examples
1428 all-expect
: all-tcl all-tk
1429 all-fileutils
: all-libiberty
1432 all-flex
: all-libiberty all-bison all-byacc
1433 all-gas
: all-libiberty all-opcodes all-bfd
1437 all-gcc
: all-bison all-byacc all-binutils all-gas all-ld
1438 GDB_TK
= all-tk all-tcl all-itcl all-tix
1439 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1441 configure-target-gperf
: $(ALL_GCC
)
1442 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libg
++
1443 all-gprof
: all-libiberty all-bfd all-opcodes
1444 all-grep
: all-libiberty
1445 all-grez
: all-libiberty all-bfd all-opcodes
1446 all-gui
: all-gdb all-libproc all-target-librx
1448 all-gzip
: all-libiberty
1449 all-hello
: all-libiberty
1451 all-inet
: all-tcl all-send-pr all-perl
1452 all-ispell
: all-emacs19
1453 all-itcl
: all-tcl all-tk
1454 all-ld
: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex
1455 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1456 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
++
1457 configure-target-libgloss
: $(ALL_GCC
)
1458 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1459 configure-target-libio
: $(ALL_GCC
)
1460 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1461 check-target-libio
: all-target-libstdc
++
1463 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1464 all-target-librx
: configure-target-librx
1465 configure-target-libstdc
++: $(ALL_GCC
)
1466 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1467 all-target-libf2c
: configure-target-libf2c all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1468 all-m4
: all-libiberty
1469 all-make
: all-libiberty
1471 configure-target-newlib
: $(ALL_GCC
)
1472 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1473 all-opcodes
: all-bfd all-libiberty
1474 all-patch
: all-libiberty
1476 all-prms
: all-libiberty
1479 all-recode
: all-libiberty
1480 all-sed
: all-libiberty
1481 all-send-pr
: all-prms
1483 all-sim
: all-libiberty all-bfd all-opcodes
1484 all-sn
: all-tcl all-tk all-itcl all-db all-grep
1485 all-tar
: all-libiberty
1487 all-tclX
: all-tcl all-tk
1489 all-texinfo
: all-libiberty
1491 all-tgas
: all-libiberty all-bfd all-opcodes
1493 all-tix
: all-tcl all-tk
1495 all-target-winsup
: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1496 configure-target-winsup
: configure-target-newlib
1497 all-uudecode
: all-libiberty
1498 configure-target-libiberty
: $(ALL_GCC
)
1499 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1500 all-target
: $(ALL_TARGET_MODULES
)
1501 install-target
: $(INSTALL_TARGET_MODULES
)
1503 ### other supporting targets
1509 installdirs: mkinstalldirs
1510 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1512 dir.
info: do-install-info
1513 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1514 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1515 mv
-f
dir.
info.new
dir.
info ; \
1520 @echo
"Building a full distribution of this tree isn't done"
1521 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1525 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1526 # ability to use several tags files at once, so there is probably no need
1527 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1528 # (if we felt like it) have this Makefile write a piece of elisp which
1529 # the user could load to tell emacs19 where all the TAGS files we just
1533 # with the gnu make, this is done automatically.
1535 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
1536 $(SHELL
) .
/config.status
1539 # Support for building net releases
1541 # Files in devo used in any net release.
1542 # ChangeLog omitted because it may refer to files which are not in this
1543 # distribution (perhaps it would be better to include it anyway).
1544 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1545 config.guess config.sub config move-if-change \
1546 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1547 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1548 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1550 # Files in devo/etc used in any net release.
1551 # ChangeLog omitted because it may refer to files which are not in this
1552 # distribution (perhaps it would be better to include it anyway).
1553 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1554 make-stds.texi standards.
info*
1556 # When you use `make setup-dirs' or `make taz' you should always redefine
1558 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1562 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1563 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1564 # Take out texinfo from a few places; make simple BISON=bison line.
1565 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1566 -e
'/^ install-texinfo /d' \
1568 mv
-f tmp Makefile.in
1571 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1572 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1573 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1574 # Make links, and run "make diststuff" or "make info" when needed.
1575 rm -rf proto-toplev
; mkdir proto-toplev
1576 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1577 for d in
$$dirs ; do \
1578 if
[ -d
$$d ]; then \
1579 if
[ ! -f
$$d/Makefile
] ; then true
; \
1580 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1581 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1582 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1583 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1585 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1586 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1588 ln
-s ..
/$$d proto-toplev
/$$d ; \
1590 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1592 cd etc
; $(MAKE
) info
1595 mkdir proto-toplev
/etc
1596 (cd proto-toplev
/etc
; \
1597 for i in
$(ETC_SUPPORT
); do \
1598 ln
-s ..
/..
/etc
/$$i .
; \
1601 # Take out texinfo from configurable dirs
1602 rm proto-toplev
/configure.in
1603 sed
-e
'/^host_tools=/s/texinfo //' \
1604 <configure.in
>proto-toplev
/configure.in
1606 mkdir proto-toplev
/texinfo
1607 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1608 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1609 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1610 if
test -r texinfo
/util
/tex3patch
; then \
1611 mkdir proto-toplev
/texinfo
/util
&& \
1612 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1614 chmod og
=u
`find . -print`
1615 if grep AM_INIT_AUTOMAKE
$(TOOL
)/configure.in
>/dev
/null
2>&1; then \
1616 ver
=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1618 ver
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1620 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) VER
=$$ver
1623 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1624 -rm -f
$(TOOL
)-$(VER
)
1625 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1626 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1627 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1629 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1630 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1633 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes setup.com makefile.vms
1634 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1635 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1636 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1638 # The FSF "binutils" release includes gprof and ld.
1639 .PHONY
: binutils.
tar.gz
1640 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof setup.com makefile.vms
1641 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1642 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1643 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1645 .PHONY
: gas
+binutils.
tar.gz
1646 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1647 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1648 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1649 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1651 .PHONY
: libg
++.
tar.gz
1652 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1653 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1654 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1655 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1657 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1658 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1659 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1660 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1663 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils
1664 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1665 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1666 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1667 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1669 .PHONY
: newlib.
tar.gz
1670 NEWLIB_SUPPORT_DIRS
=libgloss
1671 # taz configures for the sun4 target which won't configure newlib.
1672 # We need newlib configured so that the .info files are made.
1673 # Unfortunately, it is not enough to just configure newlib separately:
1674 # taz will build the .info files but since SUBDIRS won't contain newlib,
1675 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1676 # used in building the .info files, eg: *.def, *.ref).
1677 # The problem isn't solvable however without a lot of extra work because
1678 # target libraries are built in subdir $(target_alias) which gets nuked during
1679 # the make distclean. For now punt on the issue of shipping newlib info files
1680 # with newlib net releases and wait for a day when some native target (sun4?)
1681 # supports newlib (if only minimally).
1682 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1683 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1684 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1685 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1691 # end of Makefile.in