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
= $$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
92 # Not plain GZIP, since gzip looks there for extra command-line options.
95 # These values are substituted by configure.
99 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
100 BISON
= `if [ -f $$r/byacc/byacc ] ; \
101 then echo $$r/byacc/byacc ; \
102 else echo ${DEFAULT_YACC} ; \
105 LEX
= `if [ -f $$r/flex/flex ] ; \
106 then echo $$r/flex/flex ; \
107 else echo ${DEFAULT_LEX} ; fi`
109 M4
= `if [ -f $$r/m4/m4 ] ; \
110 then echo $$r/m4/m4 ; \
113 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
114 then echo $$r/texinfo/makeinfo/makeinfo ; \
115 else echo makeinfo ; fi`
117 # This just becomes part of the MAKEINFO definition passed down to
118 # sub-makes. It lets flags be given on the command line while still
119 # using the makeinfo from the object tree.
122 EXPECT
= `if [ -f $$r/expect/expect ] ; \
123 then echo $$r/expect/expect ; \
124 else echo expect ; fi`
126 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
127 then echo $$s/dejagnu/runtest ; \
128 else echo runtest ; fi`
131 # compilers to use to create programs which must be run in the build
134 CXX_FOR_BUILD
= $(CXX
)
136 SUBDIRS
= "this is set via configure, don't edit this"
139 # This is set by the configure script to the list of directories which
140 # should be built using the target tools.
141 TARGET_CONFIGDIRS
= libiberty libgloss newlib libio librx libstdc
++ libg
++ winsup
143 # Target libraries are put under this directory:
144 # Changed by configure to $(target_alias) if cross.
147 # This is set by the configure script to the arguments passed to configure.
150 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
154 # This is the name of the environment variable used for the path to
155 # the libraries. This may be changed by configure.in.
156 RPATH_ENVVAR
= LD_LIBRARY_PATH
158 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
159 REALLY_SET_LIB_PATH
= \
160 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
161 export $(RPATH_ENVVAR
);
164 INSTALL_TARGET
= installdirs \
166 $(INSTALL_TARGET_MODULES
) \
167 $(INSTALL_X11_MODULES
) \
173 if [ -f $$r/gcc/xgcc ] ; then \
174 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
175 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
176 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; \
178 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
181 echo $$r/gcc/xgcc -B$$r/gcc/; \
184 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
187 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
191 # If CC_FOR_TARGET is not overriden on the command line, then this
192 # variable is passed down to the gcc Makefile, where it is used to
193 # build libgcc2.a. We define it here so that it can itself be
194 # overridden on the command line.
195 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/
197 # start-sanitize-chill
198 CHILL_FOR_TARGET
= ` \
199 if [ -f $$r/gcc/xgcc ] ; then \
200 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
202 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
205 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
212 if [ -f $$r/gcc/xgcc ] ; then \
213 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
214 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
215 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; \
217 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
220 echo $$r/gcc/xgcc -B$$r/gcc/; \
223 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
226 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
231 if [ -f $$r/gas/as.new ] ; then \
232 echo $$r/gas/as.new ; \
234 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
237 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
242 if [ -f $$r/ld/ld.new ] ; then \
243 echo $$r/ld/ld.new ; \
245 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
248 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
252 DLLTOOL_FOR_TARGET
= ` \
253 if [ -f $$r/binutils/dlltool ] ; then \
254 echo $$r/binutils/dlltool ; \
256 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
259 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
264 if [ -f $$r/binutils/ar ] ; then \
265 echo $$r/binutils/ar ; \
267 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
270 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
274 RANLIB_FOR_TARGET
= ` \
275 if [ -f $$r/binutils/ranlib ] ; then \
276 echo $$r/binutils/ranlib ; \
278 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
281 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
286 if [ -f $$r/binutils/nm.new ] ; then \
287 echo $$r/binutils/nm.new ; \
289 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
292 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
296 #### host and target specific makefile fragments come in here.
299 # Flags to pass down to all sub-makes.
300 # Please keep these in alphabetical order.
301 BASE_FLAGS_TO_PASS
= \
302 "AR_FLAGS=$(AR_FLAGS)" \
303 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
304 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
306 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
307 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
309 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
310 $(start-sanitize-chill
)\
311 "CHILLFLAGS=$(CHILLFLAGS)" \
312 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
313 "CHILL_LIB=$(CHILL_LIB)" \
314 $(end-sanitize-chill
)\
315 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
316 "CXXFLAGS=$(CXXFLAGS)" \
317 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
318 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
319 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
320 "INSTALL=$(INSTALL)" \
321 "INSTALL_DATA=$(INSTALL_DATA)" \
322 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
323 "LDFLAGS=$(LDFLAGS)" \
325 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
326 "LIBCFLAGS=$(LIBCFLAGS)" \
327 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
328 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
329 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
332 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
333 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
334 "PICFLAG=$(PICFLAG)" \
335 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
336 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
339 "RUNTEST=$(RUNTEST)" \
340 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
342 "exec_prefix=$(exec_prefix)" \
346 # Flags to pass down to most sub-makes, in which we're building with
347 # the host environment.
348 # If any variables are added here, they must be added to do-*, below.
354 'DLLTOOL=$(DLLTOOL)' \
359 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
361 # Flags that are concerned with the location of the X11 include files
364 # NOTE: until the top-level is getting the values via autoconf, it only
365 # causes problems to have this top-level Makefile overriding the autoconf-set
366 # values in child directories. Only variables that don't conflict with
367 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
369 X11_FLAGS_TO_PASS
= \
370 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
371 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
373 # Flags to pass down to makes which are built with the target environment.
374 # The double $ decreases the length of the command line; the variables
375 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
376 # If any variables are added here, they must be added to do-*, below.
377 EXTRA_TARGET_FLAGS
= \
378 'AR=$$(AR_FOR_TARGET)' \
379 'AS=$$(AS_FOR_TARGET)' \
380 'CC=$$(CC_FOR_TARGET)' \
381 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
382 'CXX=$$(CXX_FOR_TARGET)' \
383 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
384 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
385 'LD=$$(LD_FOR_TARGET)' \
386 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
387 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
388 'NM=$$(NM_FOR_TARGET)' \
389 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
390 'RANLIB=$$(RANLIB_FOR_TARGET)'
392 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
394 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
395 # unfortunately needs the native compiler and the target ar and
397 # If any variables are added here, they must be added to do-*, below.
398 # The HOST_* variables are a special case, which are used for the gcc
399 # cross-building scheme.
401 'AR=$$(AR_FOR_TARGET)' \
405 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
406 'HOST_CC=$(CC_FOR_BUILD)' \
407 'HOST_PREFIX=$(HOST_PREFIX)' \
408 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
410 'RANLIB=$$(RANLIB_FOR_TARGET)' \
411 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
412 `if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
413 `if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
414 `if test x"$(LIMITS_H_TEST)" != x; then echo "LIMITS_H_TEST=$(LIMITS_H_TEST)"; fi` \
415 `if test x"$(LIBGCC1_TEST)" != x; then echo "LIBGCC1_TEST=$(LIBGCC1_TEST)"; fi` \
416 `if test x"$(LIBGCC2_CFLAGS)" != x; then echo "LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)"; fi` \
417 `if test x"$(LIBGCC2_DEBUG_CFLAGS)" != x; then echo "LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)"; fi` \
418 `if test x"$(LIBGCC2_INCLUDES)" != x; then echo "LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)"; fi` \
419 `if test x"$(ENQUIRE)" != x; then echo "ENQUIRE=$(ENQUIRE)"; fi` \
420 `if test x"$(BOOT_CFLAGS)" != x; then echo "BOOT_CFLAGS=$(BOOT_CFLAGS)"; fi`
422 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
424 # This is a list of the targets for all of the modules which are compiled
425 # using $(FLAGS_TO_PASS).
452 $(start-sanitize-ide
) \
454 $(end-sanitize-ide
) \
461 $(start-sanitize-ide
) \
463 $(end-sanitize-ide
) \
487 $(start-sanitize-ide
) \
489 $(end-sanitize-ide
) \
492 # This is a list of the check targets for all of the modules which are
493 # compiled using $(FLAGS_TO_PASS).
495 # The list is in two parts. The first lists those tools which
496 # are tested as part of the host's native tool-chain, and not
497 # tested in a cross configuration.
498 NATIVE_CHECK_MODULES
= \
502 CROSS_CHECK_MODULES
= \
524 $(start-sanitize-ide
) \
526 $(end-sanitize-ide
) \
533 $(start-sanitize-ide
) \
535 $(end-sanitize-ide
) \
558 $(start-sanitize-ide
) \
560 $(end-sanitize-ide
) \
563 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
565 # This is a list of the install targets for all of the modules which are
566 # compiled using $(FLAGS_TO_PASS).
567 # We put install-opcodes before install-binutils because the installed
568 # binutils might be on PATH, and they might need the shared opcodes
597 $(start-sanitize-ide
) \
599 $(end-sanitize-ide
) \
606 $(start-sanitize-ide
) \
608 $(end-sanitize-ide
) \
630 $(start-sanitize-ide
) \
632 $(end-sanitize-ide
) \
635 # This is a list of the targets for all of the modules which are compiled
636 # using $(X11_FLAGS_TO_PASS).
647 # This is a list of the check targets for all of the modules which are
648 # compiled using $(X11_FLAGS_TO_PASS).
649 CHECK_X11_MODULES
= \
657 # This is a list of the install targets for all the modules which are
658 # compiled using $(X11_FLAGS_TO_PASS).
659 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
++ \
678 all-target-libgloss \
679 all-target-libiberty \
682 # This is a list of the configure targets for all of the modules which
683 # are compiled using the target tools.
684 CONFIGURE_TARGET_MODULES
= \
685 configure-target-libio \
686 configure-target-libstdc
++ \
687 configure-target-librx \
688 configure-target-libg
++ \
689 configure-target-newlib \
690 configure-target-winsup \
691 configure-target-libgloss \
692 configure-target-libiberty \
693 configure-target-examples
695 # This is a list of the check targets for all of the modules which are
696 # compiled using $(TARGET_FLAGS_TO_PASS).
697 CHECK_TARGET_MODULES
= \
699 check-target-libstdc
++ \
700 check-target-libg
++ \
701 check-target-newlib \
702 check-target-winsup \
703 check-target-libiberty
705 # This is a list of the install targets for all of the modules which are
706 # compiled using $(TARGET_FLAGS_TO_PASS).
707 INSTALL_TARGET_MODULES
= \
708 install-target-libio \
709 install-target-libstdc
++ \
710 install-target-libg
++ \
711 install-target-newlib \
712 install-target-winsup \
713 install-target-libgloss \
714 install-target-libiberty
716 # This is a list of the targets for which we can do a clean-{target}.
743 $(start-sanitize-ide
) \
745 $(end-sanitize-ide
) \
752 $(start-sanitize-ide
) \
754 $(end-sanitize-ide
) \
778 $(start-sanitize-ide
) \
780 $(end-sanitize-ide
) \
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-winsup \
791 clean-target-libgloss \
792 clean-target-libiberty \
793 clean-target-examples
795 # All of the x11 modules that can be cleaned
796 CLEAN_X11_MODULES
= \
806 # The first rule in the file had better be this one. Don't put any above it.
810 # The target built for a native build.
815 $(ALL_TARGET_MODULES
) \
818 # Do a target for all the subdirectories. A ``make do-X'' will do a
819 # ``make X'' in all subdirectories (because, in general, there is a
820 # dependency (below) of X upon do-X, a ``make X'' will also do this,
821 # but it may do additional work as well).
822 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
823 # because it is so large that it can easily overflow the command line
824 # length limit on some systems.
833 do-maintainer-clean \
837 @target
=`echo $@ | sed -e 's/^do-//'`; \
839 s
=`cd $(srcdir); pwd`; export s
; \
841 for i in
$(SUBDIRS
) -dummy-
; do \
842 if
[ -f .
/$$i/Makefile
]; then \
845 for flag in
$(EXTRA_GCC_FLAGS
); do \
846 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
850 for flag in
$(EXTRA_HOST_FLAGS
); do \
851 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
855 export AR AS CC CXX NM RANLIB DLLTOOL
; \
857 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
858 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
859 "RANLIB=$${RANLIB}" \
860 "DLLTOOL=$${DLLTOOL}" \
862 then true
; else exit
1; fi
; \
865 @target
=`echo $@ | sed -e 's/^do-//'`; \
867 s
=`cd $(srcdir); pwd`; export s
; \
869 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
870 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
871 for flag in
$(EXTRA_TARGET_FLAGS
); do \
872 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
874 export AR AS CC CXX NM RANLIB DLLTOOL
; \
875 if
(cd
$(TARGET_SUBDIR
)/$$i; \
876 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
877 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
878 "RANLIB=$${RANLIB}" \
879 "DLLTOOL=$${DLLTOOL}" \
881 then true
; else exit
1; fi
; \
885 # Here are the targets which correspond to the do-X targets.
887 .PHONY
: info installcheck dvi install-info
888 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
889 .PHONY
: local-clean local-distclean local-maintainer-clean
891 installcheck: do-installcheck
894 # Make sure makeinfo is built before we do a `make info'.
897 install-info
: do-install-info
dir.
info
898 s
=`cd $(srcdir); pwd`; export s
; \
899 if
[ -f
dir.
info ] ; then \
900 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
904 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
907 -rm -f Makefile config.status config.cache
908 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
909 rm -rf
$(TARGET_SUBDIR
); \
912 local-maintainer-clean
:
913 @echo
"This command is intended for maintainers to use;"
914 @echo
"it deletes files that may require special tools to rebuild."
916 clean: do-clean local-clean
917 mostlyclean: do-mostlyclean local-clean
918 distclean: do-distclean local-clean local-distclean
919 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
920 maintainer-clean
: local-distclean
921 realclean: maintainer-clean
923 # This rule is used to clean specific modules.
924 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
925 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
926 @
dir=`echo $@ | sed -e 's/clean-//'`; \
927 if
[ -f .
/$${dir}/Makefile
] ; then \
929 s
=`cd $(srcdir); pwd`; export s
; \
931 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
936 .PHONY
: $(CLEAN_TARGET_MODULES
)
937 $(CLEAN_TARGET_MODULES
):
938 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
939 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
940 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
942 s
=`cd $(srcdir); pwd`; export s
; \
944 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
949 clean-target
: $(CLEAN_TARGET_MODULES
)
954 check: $(CHECK_MODULES
) \
955 $(CHECK_TARGET_MODULES
) \
956 $(CHECK_X11_MODULES
) \
959 # Installation targets.
961 .PHONY
: install uninstall source-vault binary-vault vault-install
962 install: $(INSTALL_TARGET
)
965 @echo
"the uninstall target is not supported in this tree"
968 $(MAKE
) -f .
/release
/Build-A-Release \
969 host
=$(host_alias
) source-vault
972 $(MAKE
) -f .
/release
/Build-A-Release \
973 host
=$(host_alias
) target
=$(target_alias
)
976 @if
[ -f .
/release
/vault-install
] ; then \
977 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
983 install.
all: install-no-fixedincludes
984 @if
[ -f .
/gcc
/Makefile
] ; then \
985 r
=`pwd` ; export r
; \
988 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
993 # inet-install is used because the I*Net wants DejaGNU installed but
994 # not built. Similarly, gzip is built but not installed.
996 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
998 # install-no-fixedincludes is used because Cygnus can not distribute
999 # the fixed header files.
1000 .PHONY
: install-no-fixedincludes
1001 install-no-fixedincludes
: \
1003 $(INSTALL_MODULES
) \
1004 $(INSTALL_TARGET_MODULES
) \
1005 $(INSTALL_X11_MODULES
) \
1006 gcc-no-fixedincludes
1008 # Install the gcc headers files, but not the fixed include files,
1009 # which Cygnus is not allowed to distribute. This rule is very
1010 # dependent on the workings of the gcc Makefile.in.
1011 .PHONY
: gcc-no-fixedincludes
1012 gcc-no-fixedincludes
:
1013 @if
[ -f .
/gcc
/Makefile
]; then \
1014 rm -rf gcc
/tmp-include
; \
1015 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1016 mkdir gcc
/include; \
1017 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1018 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1019 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1020 r
=`pwd`; export r
; \
1021 s
=`cd $(srcdir); pwd` ; export s
; \
1024 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1025 rm -rf gcc
/include; \
1026 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1029 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1030 # build a target all-X means to cd to X and make all.
1032 # all-gui, and all-libproc are handled specially because
1033 # they are still experimental, and if they fail to build, that
1034 # shouldn't stop "make all".
1035 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1036 $(ALL_MODULES
) all-gui all-libproc
:
1037 @
dir=`echo $@ | sed -e 's/all-//'`; \
1038 if
[ -f .
/$${dir}/Makefile
] ; then \
1039 r
=`pwd`; export r
; \
1040 s
=`cd $(srcdir); pwd`; export s
; \
1042 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1047 # These rules are used to check the modules which use FLAGS_TO_PASS.
1048 # To build a target check-X means to cd to X and make check. Some
1049 # modules are only tested in a native toolchain.
1051 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1052 $(NATIVE_CHECK_MODULES
):
1053 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1054 dir=`echo $@ | sed -e 's/check-//'`; \
1055 if
[ -f .
/$${dir}/Makefile
] ; then \
1056 r
=`pwd`; export r
; \
1057 s
=`cd $(srcdir); pwd`; export s
; \
1059 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1065 $(CROSS_CHECK_MODULES
):
1066 @
dir=`echo $@ | sed -e 's/check-//'`; \
1067 if
[ -f .
/$${dir}/Makefile
] ; then \
1068 r
=`pwd`; export r
; \
1069 s
=`cd $(srcdir); pwd`; export s
; \
1071 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1076 # This rule is used to install the modules which use FLAGS_TO_PASS.
1077 # To build a target install-X means to cd to X and make install.
1078 .PHONY
: $(INSTALL_MODULES
)
1079 $(INSTALL_MODULES
): installdirs
1080 @
dir=`echo $@ | sed -e 's/install-//'`; \
1081 if
[ -f .
/$${dir}/Makefile
] ; then \
1082 r
=`pwd`; export r
; \
1083 s
=`cd $(srcdir); pwd`; export s
; \
1085 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1090 # This rule is used to configure the modules which are built with the
1092 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1093 $(CONFIGURE_TARGET_MODULES
):
1094 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1095 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1096 r
=`pwd`; export r
; \
1097 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1098 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1099 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1100 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1101 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1103 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1104 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1105 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1108 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1111 fi
; exit
0 # break command into two pieces
1112 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1113 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1115 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1117 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1118 if
[ -d
$(srcdir)/$${dir} ]; then \
1119 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1120 r
=`pwd`; export r
; \
1121 s
=`cd $(srcdir); pwd`; export s
; \
1123 AR
="$(AR_FOR_TARGET)"; export AR
; \
1124 AS
="$(AS_FOR_TARGET)"; export AS
; \
1125 CC
="$(CC_FOR_TARGET)"; export CC
; \
1126 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1127 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1128 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1129 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1130 LD
="$(LD_FOR_TARGET)"; export LD
; \
1131 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1132 NM
="$(NM_FOR_TARGET)"; export NM
; \
1133 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1134 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1135 cd
$(TARGET_SUBDIR
)/$${dir}; \
1138 topdir
=$(srcdir) ;; \
1140 case
"$(TARGET_SUBDIR)" in \
1141 .
) topdir
="../$(srcdir)" ;; \
1142 *) topdir
="../../$(srcdir)" ;; \
1145 if
[ "$(srcdir)" = "." ] ; then \
1146 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1147 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1148 if
[ -f Makefile
]; then \
1149 if
$(MAKE
) distclean; then \
1163 srcdiroption
="--srcdir=."; \
1166 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1167 libsrcdir
="$$s/$${dir}"; \
1169 if
[ -f
$${libsrcdir}/configure
] ; then \
1170 $(SHELL
) $${libsrcdir}/configure \
1171 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1172 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1174 $(SHELL
) $$s/configure \
1175 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1176 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1185 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1186 # To build a target all-X means to cd to X and make all.
1187 .PHONY
: $(ALL_TARGET_MODULES
)
1188 $(ALL_TARGET_MODULES
):
1189 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1190 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1191 r
=`pwd`; export r
; \
1192 s
=`cd $(srcdir); pwd`; export s
; \
1194 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1199 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1200 # To build a target install-X means to cd to X and make install.
1201 .PHONY
: $(CHECK_TARGET_MODULES
)
1202 $(CHECK_TARGET_MODULES
):
1203 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1204 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1205 r
=`pwd`; export r
; \
1206 s
=`cd $(srcdir); pwd`; export s
; \
1208 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1213 # This rule is used to install the modules which use
1214 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1216 .PHONY
: $(INSTALL_TARGET_MODULES
)
1217 $(INSTALL_TARGET_MODULES
): installdirs
1218 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1219 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1220 r
=`pwd`; export r
; \
1221 s
=`cd $(srcdir); pwd`; export s
; \
1223 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1224 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1229 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1230 # To build a target all-X means to cd to X and make all.
1231 .PHONY
: $(ALL_X11_MODULES
)
1233 @
dir=`echo $@ | sed -e 's/all-//'`; \
1234 if
[ -f .
/$${dir}/Makefile
] ; then \
1235 r
=`pwd`; export r
; \
1236 s
=`cd $(srcdir); pwd`; export s
; \
1239 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1244 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1245 # To build a target check-X means to cd to X and make all.
1246 .PHONY
: $(CHECK_X11_MODULES
)
1247 $(CHECK_X11_MODULES
):
1248 @
dir=`echo $@ | sed -e 's/check-//'`; \
1249 if
[ -f .
/$${dir}/Makefile
] ; then \
1250 r
=`pwd`; export r
; \
1251 s
=`cd $(srcdir); pwd`; export s
; \
1254 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1259 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1260 # To build a target install-X means to cd to X and make install.
1261 .PHONY
: $(INSTALL_X11_MODULES
)
1262 $(INSTALL_X11_MODULES
):
1263 @
dir=`echo $@ | sed -e 's/install-//'`; \
1264 if
[ -f .
/$${dir}/Makefile
] ; then \
1265 r
=`pwd`; export r
; \
1266 s
=`cd $(srcdir); pwd`; export s
; \
1269 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1274 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1277 @if
[ -f .
/gcc
/Makefile
] ; then \
1278 r
=`pwd`; export r
; \
1279 s
=`cd $(srcdir); pwd`; export s
; \
1281 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1286 .PHONY
: all-bootstrap
1288 @if
[ -f .
/gcc
/Makefile
] ; then \
1289 r
=`pwd`; export r
; \
1290 s
=`cd $(srcdir); pwd`; export s
; \
1292 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) bootstrap
); \
1299 @if
[ -f .
/gcc
/Makefile
] ; then \
1300 r
=`pwd`; export r
; \
1301 s
=`cd $(srcdir); pwd`; export s
; \
1303 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1310 @if
[ -f .
/gcc
/Makefile
] ; then \
1311 r
=`pwd`; export r
; \
1312 s
=`cd $(srcdir); pwd`; export s
; \
1314 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1320 # EXPERIMENTAL STUFF
1321 # This rule is used to install the modules which use FLAGS_TO_PASS.
1322 # To build a target install-X means to cd to X and make install.
1323 .PHONY
: install-dosrel
1324 install-dosrel
: installdirs info
1325 @
dir=`echo $@ | sed -e 's/install-//'`; \
1326 if
[ -f .
/$${dir}/Makefile
] ; then \
1327 r
=`pwd`; export r
; \
1328 s
=`cd $(srcdir); pwd`; export s
; \
1330 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1335 install-dosrel-fake
:
1338 # This is a list of inter-dependencies among modules.
1340 all-autoconf
: all-m4
1344 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-byacc
1348 all-dejagnu
: all-tcl all-expect all-tk
1349 all-diff
: all-libiberty
1351 all-emacs19
: all-byacc
1353 configure-target-examples
: $(ALL_GCC
)
1354 all-target-examples
: configure-target-examples
1355 all-expect
: all-tcl all-tk
1356 all-fileutils
: all-libiberty
1359 all-flex
: all-libiberty all-byacc
1360 all-gas
: all-libiberty all-opcodes all-bfd
1364 all-gcc
: all-byacc all-binutils all-gas all-ld
1365 all-bootstrap
: all-libiberty all-byacc all-binutils all-gas all-ld
1366 GDB_TK
= all-tk all-tcl
1367 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1369 all-gprof
: all-libiberty all-bfd all-opcodes
1370 all-grep
: all-libiberty
1371 all-grez
: all-libiberty all-bfd all-opcodes
1372 all-gui
: all-gdb all-libproc all-target-librx
1374 all-gzip
: all-libiberty
1375 all-hello
: all-libiberty
1376 # start-sanitize-ide
1380 all-inet
: all-tcl all-send-pr all-perl
1381 all-ispell
: all-emacs19
1382 all-itcl
: all-tcl all-tk
1383 all-ld
: all-libiberty all-bfd all-opcodes all-byacc all-flex
1384 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1385 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
++
1386 configure-target-libgloss
: $(ALL_GCC
)
1387 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1388 configure-target-libio
: $(ALL_GCC
)
1389 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1391 # start-sanitize-ide
1392 all-libide
: all-tcl all-tk all-itcl all-ilu
1394 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1395 all-target-librx
: configure-target-librx
1396 configure-target-libstdc
++: $(ALL_GCC
)
1397 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1398 all-m4
: all-libiberty
1399 all-make
: all-libiberty
1401 configure-target-newlib
: $(ALL_GCC
)
1402 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1403 all-opcodes
: all-bfd all-libiberty
1404 all-patch
: all-libiberty
1406 all-prms
: all-libiberty
1409 all-recode
: all-libiberty
1410 all-sed
: all-libiberty
1411 all-send-pr
: all-prms
1413 all-sim
: all-libiberty all-bfd all-opcodes
1414 all-sn
: all-tcl all-tk all-itcl all-db
1415 all-tar
: all-libiberty
1417 all-tclX
: all-tcl all-tk
1419 all-texinfo
: all-libiberty
1421 all-tgas
: all-libiberty all-bfd all-opcodes
1423 # start-sanitize-ide
1424 all-vmake
: all-tcl all-tk all-itcl all-libide
1427 all-target-winsup
: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1428 configure-target-winsup
: configure-target-newlib
1429 all-uudecode
: all-libiberty
1430 configure-target-libiberty
: $(ALL_GCC
)
1431 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1432 all-target
: $(ALL_TARGET_MODULES
)
1433 install-target
: $(INSTALL_TARGET_MODULES
)
1435 ### other supporting targets
1441 installdirs: mkinstalldirs
1442 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1444 dir.
info: do-install-info
1445 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1446 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1447 mv
-f
dir.
info.new
dir.
info ; \
1452 @echo
"Building a full distribution of this tree isn't done"
1453 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1457 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1458 # ability to use several tags files at once, so there is probably no need
1459 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1460 # (if we felt like it) have this Makefile write a piece of elisp which
1461 # the user could load to tell emacs19 where all the TAGS files we just
1465 # with the gnu make, this is done automatically.
1467 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
1468 $(SHELL
) .
/config.status
1471 # Support for building net releases
1473 # Files in devo used in any net release.
1474 # ChangeLog omitted because it may refer to files which are not in this
1475 # distribution (perhaps it would be better to include it anyway).
1476 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1477 config.guess config.sub config move-if-change \
1478 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1479 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1482 # Files in devo/etc used in any net release.
1483 # ChangeLog omitted because it may refer to files which are not in this
1484 # distribution (perhaps it would be better to include it anyway).
1485 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1486 make-stds.texi standards.
info*
1488 # When you use `make setup-dirs' or `make taz' you should always redefine
1490 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1491 # Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
1492 DISTBISONFILES
= binutils
/Makefile.in gas
/Makefile.in gdb
/Makefile.in
ld/Makefile.in
1496 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1497 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1498 # Make sure "diststuff" files get built properly.
1499 for f in
$(DISTBISONFILES
) ; do \
1500 if
[ -r
$$f ]; then \
1501 sed
'/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp
; \
1505 # Take out texinfo from a few places; make simple BISON=bison line.
1506 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1507 -e
'/^ install-texinfo /d' \
1508 -e
'/^BISON = /,/^$$/d' \
1509 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1511 mv
-f tmp Makefile.in
1513 $(start-sanitize-Sanitize
)
1514 @if
[ -f .Sanitize
] ; then echo
"RUN Sanitize FIRST!" ; false
; fi
;
1515 $(end-sanitize-Sanitize
)
1517 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1518 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1519 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1520 # Make links, and run "make diststuff" or "make info" when needed.
1521 rm -rf proto-toplev
; mkdir proto-toplev
1522 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1523 for d in
$$dirs ; do \
1524 if
[ -d
$$d ]; then \
1525 if
[ ! -f
$$d/Makefile
] ; then true
; \
1526 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1527 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1528 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1529 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1531 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1532 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1534 ln
-s ..
/$$d proto-toplev
/$$d ; \
1536 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1538 cd etc
; $(MAKE
) info
1541 mkdir proto-toplev
/etc
1542 (cd proto-toplev
/etc
; \
1543 for i in
$(ETC_SUPPORT
); do \
1544 ln
-s ..
/..
/etc
/$$i .
; \
1547 # Take out texinfo from configurable dirs
1548 rm proto-toplev
/configure.in
1549 sed
-e
'/^host_tools=/s/texinfo //' \
1550 <configure.in
>proto-toplev
/configure.in
1552 mkdir proto-toplev
/texinfo
1553 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1554 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1555 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1556 if
test -r texinfo
/util
/tex3patch
; then \
1557 mkdir proto-toplev
/texinfo
/util
&& \
1558 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1560 chmod og
=u
`find . -print`
1561 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) \
1562 VER
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`
1565 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1566 -rm -f
$(TOOL
)-$(VER
)
1567 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1568 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1569 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1571 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1572 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1575 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes setup.com makefile.vms
1576 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1577 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1578 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1580 # The FSF "binutils" release includes gprof and ld.
1581 .PHONY
: binutils.
tar.gz
1582 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof setup.com makefile.vms
1583 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1584 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1585 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1587 .PHONY
: gas
+binutils.
tar.gz
1588 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1589 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1590 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1591 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1593 .PHONY
: libg
++.
tar.gz
1594 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1595 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1596 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1597 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1599 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1600 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1601 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1602 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1605 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils
1606 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1607 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1608 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1609 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1611 .PHONY
: newlib.
tar.gz
1612 NEWLIB_SUPPORT_DIRS
=libgloss
1613 # taz configures for the sun4 target which won't configure newlib.
1614 # We need newlib configured so that the .info files are made.
1615 # Unfortunately, it is not enough to just configure newlib separately:
1616 # taz will build the .info files but since SUBDIRS won't contain newlib,
1617 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1618 # used in building the .info files, eg: *.def, *.ref).
1619 # The problem isn't solvable however without a lot of extra work because
1620 # target libraries are built in subdir $(target_alias) which gets nuked during
1621 # the make distclean. For now punt on the issue of shipping newlib info files
1622 # with newlib net releases and wait for a day when some native target (sun4?)
1623 # supports newlib (if only minimally).
1624 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1625 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1626 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1627 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1632 # start-sanitize-chill
1633 ## This is ugly, but I don't want GNU make to put these variables in
1634 ## the environment. Older makes will see this as a set of targets
1635 ## with no dependencies and no actions.
1636 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1637 # end-sanitize-chill
1639 # end of Makefile.in