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.
23 exec_prefix = $(prefix)
25 bindir=${exec_prefix}/bin
26 sbindir
=${exec_prefix}/sbin
27 libexecdir
=${exec_prefix}/libexec
28 datadir=${prefix}/share
29 sysconfdir
=${prefix}/etc
30 sharedstatedir
=${prefix}/com
31 localstatedir
=${prefix}/var
32 libdir=${exec_prefix}/lib
33 includedir=${prefix}/include
34 oldincludedir=/usr
/include
35 infodir=${prefix}/info
38 tooldir
= $(exec_prefix)/$(target
)
40 program_transform_name
=
42 man1dir = $(mandir)/man1
43 man2dir = $(mandir)/man2
44 man3dir = $(mandir)/man3
45 man4dir = $(mandir)/man4
46 man5dir = $(mandir)/man5
47 man6dir = $(mandir)/man6
48 man7dir = $(mandir)/man7
49 man8dir = $(mandir)/man8
50 man9dir = $(mandir)/man9
55 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
57 INSTALL_PROGRAM_ARGS
=
59 INSTALL
= $(SHELL
) $$s/install-sh
-c
60 INSTALL_PROGRAM
= $(INSTALL
) $(INSTALL_PROGRAM_ARGS
)
61 INSTALL_SCRIPT
= $(INSTALL
)
62 INSTALL_DATA
= $(INSTALL
) -m
644
64 INSTALL_DOSREL
= install-dosrel-fake
71 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
72 # here so that they can be overridden by Makefile fragments.
73 HOST_CC
= $(CC_FOR_BUILD
)
75 HOST_PREFIX_1
= loser-
77 # These flag values are normally overridden by the configure script.
82 CFLAGS_FOR_TARGET
= $(CFLAGS
)
84 LIBCFLAGS_FOR_TARGET
= $(CFLAGS_FOR_TARGET
)
88 # start-sanitize-chill
89 CHILLFLAGS
= $(CFLAGS
)
94 # Use -O2 to stress test the compiler.
95 LIBCXXFLAGS
= $(CXXFLAGS
) -fno-implicit-templates
96 CXXFLAGS_FOR_TARGET
= $(CXXFLAGS
)
97 LIBCXXFLAGS_FOR_TARGET
= $(CXXFLAGS_FOR_TARGET
) -fno-implicit-templates
108 # Not plain GZIP, since gzip looks there for extra command-line options.
111 # These values are substituted by configure.
115 BISON
= `if [ -f $$r/bison/bison ] ; then \
116 echo $$r/bison/bison -L $$s/bison/ ; \
121 YACC
= `if [ -f $$r/bison/bison ] ; then \
122 echo $$r/bison/bison -y -L $$s/bison/ ; \
123 elif [ -f $$r/byacc/byacc ] ; then \
124 echo $$r/byacc/byacc ; \
126 echo ${DEFAULT_YACC} ; \
129 LEX
= `if [ -f $$r/flex/flex ] ; \
130 then echo $$r/flex/flex ; \
131 else echo ${DEFAULT_LEX} ; fi`
133 M4
= `if [ -f $$r/m4/m4 ] ; \
134 then echo $$r/m4/m4 ; \
137 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
138 then echo $$r/texinfo/makeinfo/makeinfo ; \
139 else echo makeinfo ; fi`
141 # This just becomes part of the MAKEINFO definition passed down to
142 # sub-makes. It lets flags be given on the command line while still
143 # using the makeinfo from the object tree.
146 EXPECT
= `if [ -f $$r/expect/expect ] ; \
147 then echo $$r/expect/expect ; \
148 else echo expect ; fi`
150 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
151 then echo $$s/dejagnu/runtest ; \
152 else echo runtest ; fi`
155 # compilers to use to create programs which must be run in the build
158 CXX_FOR_BUILD
= $(CXX
)
160 SUBDIRS
= "this is set via configure, don't edit this"
163 # This is set by the configure script to the list of directories which
164 # should be built using the target tools.
165 TARGET_CONFIGDIRS
= libiberty libgloss newlib libio librx libstdc
++ libg
++ winsup opcodes cygmon
167 # Target libraries are put under this directory:
168 # Changed by configure to $(target_alias) if cross.
171 # This is set by the configure script to the arguments passed to configure.
174 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
178 # This is the name of the environment variable used for the path to
179 # the libraries. This may be changed by configure.in.
180 RPATH_ENVVAR
= LD_LIBRARY_PATH
182 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
183 REALLY_SET_LIB_PATH
= \
184 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
185 export $(RPATH_ENVVAR
);
188 INSTALL_TARGET
= installdirs \
190 $(INSTALL_TARGET_MODULES
) \
191 $(INSTALL_X11_MODULES
) \
197 if [ -f $$r/gcc/xgcc ] ; then \
198 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
199 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
200 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
202 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
205 echo $$r/gcc/xgcc -B$$r/gcc/; \
208 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
211 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
215 # If CC_FOR_TARGET is not overriden on the command line, then this
216 # variable is passed down to the gcc Makefile, where it is used to
217 # build libgcc2.a. We define it here so that it can itself be
218 # overridden on the command line.
219 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/
221 # start-sanitize-chill
222 CHILL_FOR_TARGET
= ` \
223 if [ -f $$r/gcc/xgcc ] ; then \
224 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
226 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
229 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
236 if [ -f $$r/gcc/xgcc ] ; then \
237 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
238 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
239 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; \
241 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
244 echo $$r/gcc/xgcc -B$$r/gcc/; \
247 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
250 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
255 if [ -f $$r/gas/as-new ] ; then \
256 echo $$r/gas/as-new ; \
258 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
261 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
266 if [ -f $$r/ld/ld-new ] ; then \
267 echo $$r/ld/ld-new ; \
269 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
272 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
276 DLLTOOL_FOR_TARGET
= ` \
277 if [ -f $$r/binutils/dlltool ] ; then \
278 echo $$r/binutils/dlltool ; \
280 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
283 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
287 WINDRES_FOR_TARGET
= ` \
288 if [ -f $$r/binutils/windres ] ; then \
289 echo $$r/binutils/windres ; \
291 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
294 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
299 if [ -f $$r/binutils/ar ] ; then \
300 echo $$r/binutils/ar ; \
302 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
305 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
309 RANLIB_FOR_TARGET
= ` \
310 if [ -f $$r/binutils/ranlib ] ; then \
311 echo $$r/binutils/ranlib ; \
313 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
316 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
321 if [ -f $$r/binutils/nm-new ] ; then \
322 echo $$r/binutils/nm-new ; \
324 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
327 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
331 #### host and target specific makefile fragments come in here.
334 # Flags to pass down to all sub-makes.
335 # Please keep these in alphabetical order.
336 BASE_FLAGS_TO_PASS
= \
337 "AR_FLAGS=$(AR_FLAGS)" \
338 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
339 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
341 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
342 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
344 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
345 $(start-sanitize-chill
)\
346 "CHILLFLAGS=$(CHILLFLAGS)" \
347 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
348 "CHILL_LIB=$(CHILL_LIB)" \
349 $(end-sanitize-chill
)\
350 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
351 "CXXFLAGS=$(CXXFLAGS)" \
352 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
353 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
354 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
355 "INSTALL=$(INSTALL)" \
356 "INSTALL_DATA=$(INSTALL_DATA)" \
357 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
358 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
359 "LDFLAGS=$(LDFLAGS)" \
361 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
362 "LIBCFLAGS=$(LIBCFLAGS)" \
363 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
364 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
365 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
368 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
369 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
370 "PICFLAG=$(PICFLAG)" \
371 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
372 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
375 "RUNTEST=$(RUNTEST)" \
376 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
377 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
380 "datadir=$(datadir)" \
381 "exec_prefix=$(exec_prefix)" \
382 "includedir=$(includedir)" \
383 "infodir=$(infodir)" \
385 "libexecdir=$(libexecdir)" \
386 "localstatedir=$(localstatedir)" \
388 "oldincludedir=$(oldincludedir)" \
390 "sbindir=$(sbindir)" \
391 "sharedstatedir=$(sharedstatedir)" \
392 "sysconfdir=$(sysconfdir)" \
395 # Flags to pass down to most sub-makes, in which we're building with
396 # the host environment.
397 # If any variables are added here, they must be added to do-*, below.
403 'DLLTOOL=$(DLLTOOL)' \
409 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
411 # Flags that are concerned with the location of the X11 include files
414 # NOTE: until the top-level is getting the values via autoconf, it only
415 # causes problems to have this top-level Makefile overriding the autoconf-set
416 # values in child directories. Only variables that don't conflict with
417 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
419 X11_FLAGS_TO_PASS
= \
420 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
421 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
423 # Flags to pass down to makes which are built with the target environment.
424 # The double $ decreases the length of the command line; the variables
425 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
426 # If any variables are added here, they must be added to do-*, below.
427 EXTRA_TARGET_FLAGS
= \
428 'AR=$$(AR_FOR_TARGET)' \
429 'AS=$$(AS_FOR_TARGET)' \
430 'CC=$$(CC_FOR_TARGET)' \
431 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
432 'CXX=$$(CXX_FOR_TARGET)' \
433 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
434 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
435 'LD=$$(LD_FOR_TARGET)' \
436 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
437 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
438 'NM=$$(NM_FOR_TARGET)' \
439 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
440 'RANLIB=$$(RANLIB_FOR_TARGET)' \
441 'WINDRES=$$(WINDRES_FOR_TARGET)'
443 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
445 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
446 # unfortunately needs the native compiler and the target ar and
448 # If any variables are added here, they must be added to do-*, below.
449 # The HOST_* variables are a special case, which are used for the gcc
450 # cross-building scheme.
452 'AR=$$(AR_FOR_TARGET)' \
456 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
457 'HOST_CC=$(CC_FOR_BUILD)' \
458 'HOST_PREFIX=$(HOST_PREFIX)' \
459 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
461 'RANLIB=$$(RANLIB_FOR_TARGET)' \
462 'WINDRES=$$(WINDRES_FOR_TARGET)' \
463 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
464 "`if test x'$(LANGUAGES)' != x; then echo 'LANGUAGES=$(LANGUAGES)'; else echo 'XFOO=bar'; fi`" \
465 "`if test x'$(STMP_FIXPROTO)' != x; then echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)'; else echo 'XFOO=bar'; fi`" \
466 "`if test x'$(LIMITS_H_TEST)' != x; then echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)'; else echo 'XFOO=bar'; fi`" \
467 "`if test x'$(LIBGCC1_TEST)' != x; then echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)'; else echo 'XFOO=bar'; fi`" \
468 "`if test x'$(LIBGCC2_CFLAGS)' != x; then echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
469 "`if test x'$(LIBGCC2_DEBUG_CFLAGS)' != x; then echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
470 "`if test x'$(LIBGCC2_INCLUDES)' != x; then echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)'; else echo 'XFOO=bar'; fi`" \
471 "`if test x'$(ENQUIRE)' != x; then echo 'ENQUIRE=$(ENQUIRE)'; else echo 'XFOO=bar'; fi`" \
472 "`if test x'$(BOOT_CFLAGS)' != x; then echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)'; else echo 'XFOO=bar'; fi`"
474 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
476 # This is a list of the targets for all of the modules which are compiled
477 # using $(FLAGS_TO_PASS).
505 $(start-sanitize-ide
) \
507 $(end-sanitize-ide
) \
512 $(start-sanitize-ide
) \
514 $(end-sanitize-ide
) \
541 $(start-sanitize-ide
) \
543 $(end-sanitize-ide
) \
546 # This is a list of the check targets for all of the modules which are
547 # compiled using $(FLAGS_TO_PASS).
549 # The list is in two parts. The first lists those tools which
550 # are tested as part of the host's native tool-chain, and not
551 # tested in a cross configuration.
552 NATIVE_CHECK_MODULES
= \
557 CROSS_CHECK_MODULES
= \
579 $(start-sanitize-ide
) \
581 $(end-sanitize-ide
) \
586 $(start-sanitize-ide
) \
588 $(end-sanitize-ide
) \
614 $(start-sanitize-ide
) \
616 $(end-sanitize-ide
) \
619 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
621 # This is a list of the install targets for all of the modules which are
622 # compiled using $(FLAGS_TO_PASS).
623 # We put install-opcodes before install-binutils because the installed
624 # binutils might be on PATH, and they might need the shared opcodes
654 $(start-sanitize-ide
) \
656 $(end-sanitize-ide
) \
661 $(start-sanitize-ide
) \
663 $(end-sanitize-ide
) \
688 $(start-sanitize-ide
) \
690 $(end-sanitize-ide
) \
693 # This is a list of the targets for all of the modules which are compiled
694 # using $(X11_FLAGS_TO_PASS).
706 # This is a list of the check targets for all of the modules which are
707 # compiled using $(X11_FLAGS_TO_PASS).
708 CHECK_X11_MODULES
= \
718 # This is a list of the install targets for all the modules which are
719 # compiled using $(X11_FLAGS_TO_PASS).
720 INSTALL_X11_MODULES
= \
731 # This is a list of the targets for all of the modules which are compiled
732 # using $(TARGET_FLAGS_TO_PASS).
733 ALL_TARGET_MODULES
= \
735 all-target-libstdc
++ \
740 all-target-libgloss \
741 all-target-libiberty \
743 all-target-examples \
746 # This is a list of the configure targets for all of the modules which
747 # are compiled using the target tools.
748 CONFIGURE_TARGET_MODULES
= \
749 configure-target-libio \
750 configure-target-libstdc
++ \
751 configure-target-librx \
752 configure-target-libg
++ \
753 configure-target-newlib \
754 configure-target-winsup \
755 configure-target-libgloss \
756 configure-target-libiberty \
757 configure-target-gperf \
758 configure-target-examples \
759 configure-target-cygmon
761 # This is a list of the check targets for all of the modules which are
762 # compiled using $(TARGET_FLAGS_TO_PASS).
763 CHECK_TARGET_MODULES
= \
765 check-target-libstdc
++ \
766 check-target-libg
++ \
767 check-target-newlib \
768 check-target-winsup \
769 check-target-libiberty \
772 # This is a list of the install targets for all of the modules which are
773 # compiled using $(TARGET_FLAGS_TO_PASS).
774 INSTALL_TARGET_MODULES
= \
775 install-target-libio \
776 install-target-libstdc
++ \
777 install-target-libg
++ \
778 install-target-newlib \
779 install-target-winsup \
780 install-target-libgloss \
781 install-target-libiberty \
784 # This is a list of the targets for which we can do a clean-{target}.
812 $(start-sanitize-ide
) \
814 $(end-sanitize-ide
) \
819 $(start-sanitize-ide
) \
821 $(end-sanitize-ide
) \
848 $(start-sanitize-ide
) \
850 $(end-sanitize-ide
) \
853 # All of the target modules that can be cleaned
854 CLEAN_TARGET_MODULES
= \
856 clean-target-libstdc
++ \
858 clean-target-libg
++ \
859 clean-target-newlib \
860 clean-target-winsup \
861 clean-target-libgloss \
862 clean-target-libiberty \
864 clean-target-examples \
867 # All of the x11 modules that can be cleaned
868 CLEAN_X11_MODULES
= \
879 # The first rule in the file had better be this one. Don't put any above it.
883 # The target built for a native build.
888 $(ALL_TARGET_MODULES
) \
891 # Do a target for all the subdirectories. A ``make do-X'' will do a
892 # ``make X'' in all subdirectories (because, in general, there is a
893 # dependency (below) of X upon do-X, a ``make X'' will also do this,
894 # but it may do additional work as well).
895 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
896 # because it is so large that it can easily overflow the command line
897 # length limit on some systems.
906 do-maintainer-clean \
910 @target
=`echo $@ | sed -e 's/^do-//'`; \
912 s
=`cd $(srcdir); pwd`; export s
; \
914 for i in
$(SUBDIRS
) -dummy-
; do \
915 if
[ -f .
/$$i/Makefile
]; then \
918 for flag in
$(EXTRA_GCC_FLAGS
); do \
919 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
923 for flag in
$(EXTRA_HOST_FLAGS
); do \
924 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
928 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
930 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
931 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
932 "RANLIB=$${RANLIB}" \
933 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
935 then true
; else exit
1; fi
; \
938 @target
=`echo $@ | sed -e 's/^do-//'`; \
940 s
=`cd $(srcdir); pwd`; export s
; \
942 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
943 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
944 for flag in
$(EXTRA_TARGET_FLAGS
); do \
945 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
947 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
948 if
(cd
$(TARGET_SUBDIR
)/$$i; \
949 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
950 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
951 "RANLIB=$${RANLIB}" \
952 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
954 then true
; else exit
1; fi
; \
958 # Here are the targets which correspond to the do-X targets.
960 .PHONY
: info installcheck dvi install-info
961 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
962 .PHONY
: local-clean local-distclean local-maintainer-clean
964 installcheck: do-installcheck
967 # Make sure makeinfo is built before we do a `make info'.
970 install-info
: do-install-info
dir.
info
971 s
=`cd $(srcdir); pwd`; export s
; \
972 if
[ -f
dir.
info ] ; then \
973 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
977 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
980 -rm -f Makefile config.status config.cache
981 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
982 rm -rf
$(TARGET_SUBDIR
); \
985 local-maintainer-clean
:
986 @echo
"This command is intended for maintainers to use;"
987 @echo
"it deletes files that may require special tools to rebuild."
989 clean: do-clean local-clean
990 mostlyclean: do-mostlyclean local-clean
991 distclean: do-distclean local-clean local-distclean
992 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
993 maintainer-clean
: local-distclean
994 realclean: maintainer-clean
996 # This rule is used to clean specific modules.
997 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
998 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
999 @
dir=`echo $@ | sed -e 's/clean-//'`; \
1000 if
[ -f .
/$${dir}/Makefile
] ; then \
1001 r
=`pwd`; export r
; \
1002 s
=`cd $(srcdir); pwd`; export s
; \
1004 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
1009 .PHONY
: $(CLEAN_TARGET_MODULES
)
1010 $(CLEAN_TARGET_MODULES
):
1011 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
1012 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1013 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1014 r
=`pwd`; export r
; \
1015 s
=`cd $(srcdir); pwd`; export s
; \
1017 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
1022 clean-target
: $(CLEAN_TARGET_MODULES
)
1027 check: $(CHECK_MODULES
) \
1028 $(CHECK_TARGET_MODULES
) \
1029 $(CHECK_X11_MODULES
) \
1032 # Installation targets.
1034 .PHONY
: install uninstall source-vault binary-vault vault-install
1035 install: $(INSTALL_TARGET
)
1038 @echo
"the uninstall target is not supported in this tree"
1041 $(MAKE
) -f .
/release
/Build-A-Release \
1042 host
=$(host_alias
) source-vault
1045 $(MAKE
) -f .
/release
/Build-A-Release \
1046 host
=$(host_alias
) target
=$(target_alias
)
1049 @if
[ -f .
/release
/vault-install
] ; then \
1050 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1056 install.
all: install-no-fixedincludes
1057 @if
[ -f .
/gcc
/Makefile
] ; then \
1058 r
=`pwd` ; export r
; \
1061 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1066 # inet-install is used because the I*Net wants DejaGNU installed but
1067 # not built. Similarly, gzip is built but not installed.
1069 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1071 # install-no-fixedincludes is used because Cygnus can not distribute
1072 # the fixed header files.
1073 .PHONY
: install-no-fixedincludes
1074 install-no-fixedincludes
: \
1076 $(INSTALL_MODULES
) \
1077 $(INSTALL_TARGET_MODULES
) \
1078 $(INSTALL_X11_MODULES
) \
1079 gcc-no-fixedincludes
1081 # Install the gcc headers files, but not the fixed include files,
1082 # which Cygnus is not allowed to distribute. This rule is very
1083 # dependent on the workings of the gcc Makefile.in.
1084 .PHONY
: gcc-no-fixedincludes
1085 gcc-no-fixedincludes
:
1086 @if
[ -f .
/gcc
/Makefile
]; then \
1087 rm -rf gcc
/tmp-include
; \
1088 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1089 mkdir gcc
/include; \
1090 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1091 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1092 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1093 r
=`pwd`; export r
; \
1094 s
=`cd $(srcdir); pwd` ; export s
; \
1097 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1098 rm -rf gcc
/include; \
1099 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1102 # start-sanitize-ide
1103 # Install Foundry. Avoid installing a bunch of stuff we don't need.
1105 mods
="$(INSTALL_MODULES)"; \
1106 x11_mods
="$(INSTALL_X11_MODULES)"; \
1107 for d in install-tcl install-tk install-itcl install-tix install-ilu
; do \
1108 mods
="`echo $${mods} | sed -e "s
/$$d//"`"; \
1109 x11_mods
="`echo $${x11_mods} | sed -e "s
/$$d//"`"; \
1111 $(MAKE
) INSTALL_MODULES
="$${mods}" INSTALL_X11_MODULES
="$${x11_mods}" install
1112 for d in tcl tk itcl tix ilu
; do \
1113 if
[ -f
$$d/Makefile
]; then \
1114 r
=`pwd`; export r
; \
1115 s
=`cd $(srcdir); pwd`; export s
; \
1117 (cd
$$d; $(MAKE
) $(FLAGS_TO_PASS
) install-minimal
); \
1124 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1125 # build a target all-X means to cd to X and make all.
1127 # all-gui, and all-libproc are handled specially because
1128 # they are still experimental, and if they fail to build, that
1129 # shouldn't stop "make all".
1130 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1131 $(ALL_MODULES
) all-gui all-libproc
:
1132 @
dir=`echo $@ | sed -e 's/all-//'`; \
1133 if
[ -f .
/$${dir}/Makefile
] ; then \
1134 r
=`pwd`; export r
; \
1135 s
=`cd $(srcdir); pwd`; export s
; \
1137 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1142 # These rules are used to check the modules which use FLAGS_TO_PASS.
1143 # To build a target check-X means to cd to X and make check. Some
1144 # modules are only tested in a native toolchain.
1146 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1147 $(NATIVE_CHECK_MODULES
):
1148 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1149 dir=`echo $@ | sed -e 's/check-//'`; \
1150 if
[ -f .
/$${dir}/Makefile
] ; then \
1151 r
=`pwd`; export r
; \
1152 s
=`cd $(srcdir); pwd`; export s
; \
1154 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1160 $(CROSS_CHECK_MODULES
):
1161 @
dir=`echo $@ | sed -e 's/check-//'`; \
1162 if
[ -f .
/$${dir}/Makefile
] ; then \
1163 r
=`pwd`; export r
; \
1164 s
=`cd $(srcdir); pwd`; export s
; \
1166 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1171 # This rule is used to install the modules which use FLAGS_TO_PASS.
1172 # To build a target install-X means to cd to X and make install.
1173 .PHONY
: $(INSTALL_MODULES
)
1174 $(INSTALL_MODULES
): installdirs
1175 @
dir=`echo $@ | sed -e 's/install-//'`; \
1176 if
[ -f .
/$${dir}/Makefile
] ; then \
1177 r
=`pwd`; export r
; \
1178 s
=`cd $(srcdir); pwd`; export s
; \
1180 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1185 # This rule is used to configure the modules which are built with the
1187 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1188 $(CONFIGURE_TARGET_MODULES
):
1189 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1190 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1191 r
=`pwd`; export r
; \
1192 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1193 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1194 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1195 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1196 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1198 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1199 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1200 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1203 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1206 fi
; exit
0 # break command into two pieces
1207 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1208 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1210 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1212 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1213 if
[ -d
$(srcdir)/$${dir} ]; then \
1214 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1215 r
=`pwd`; export r
; \
1216 s
=`cd $(srcdir); pwd`; export s
; \
1218 AR
="$(AR_FOR_TARGET)"; export AR
; \
1219 AS
="$(AS_FOR_TARGET)"; export AS
; \
1220 CC
="$(CC_FOR_TARGET)"; export CC
; \
1221 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1222 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1223 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1224 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1225 LD
="$(LD_FOR_TARGET)"; export LD
; \
1226 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1227 NM
="$(NM_FOR_TARGET)"; export NM
; \
1228 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1229 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1230 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1231 cd
$(TARGET_SUBDIR
)/$${dir}; \
1234 topdir
=$(srcdir) ;; \
1236 case
"$(TARGET_SUBDIR)" in \
1237 .
) topdir
="../$(srcdir)" ;; \
1238 *) topdir
="../../$(srcdir)" ;; \
1241 if
[ "$(srcdir)" = "." ] ; then \
1242 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1243 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1244 if
[ -f Makefile
]; then \
1245 if
$(MAKE
) distclean; then \
1259 srcdiroption
="--srcdir=."; \
1262 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1263 libsrcdir
="$$s/$${dir}"; \
1265 if
[ -f
$${libsrcdir}/configure
] ; then \
1266 $(SHELL
) $${libsrcdir}/configure \
1267 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1268 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1270 $(SHELL
) $$s/configure \
1271 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1272 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1281 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1282 # To build a target all-X means to cd to X and make all.
1283 .PHONY
: $(ALL_TARGET_MODULES
)
1284 $(ALL_TARGET_MODULES
):
1285 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1286 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1287 r
=`pwd`; export r
; \
1288 s
=`cd $(srcdir); pwd`; export s
; \
1290 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1295 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1296 # To build a target install-X means to cd to X and make install.
1297 .PHONY
: $(CHECK_TARGET_MODULES
)
1298 $(CHECK_TARGET_MODULES
):
1299 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1300 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1301 r
=`pwd`; export r
; \
1302 s
=`cd $(srcdir); pwd`; export s
; \
1304 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1309 # This rule is used to install the modules which use
1310 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1312 .PHONY
: $(INSTALL_TARGET_MODULES
)
1313 $(INSTALL_TARGET_MODULES
): installdirs
1314 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1315 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1316 r
=`pwd`; export r
; \
1317 s
=`cd $(srcdir); pwd`; export s
; \
1319 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1320 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1325 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1326 # To build a target all-X means to cd to X and make all.
1327 .PHONY
: $(ALL_X11_MODULES
)
1329 @
dir=`echo $@ | sed -e 's/all-//'`; \
1330 if
[ -f .
/$${dir}/Makefile
] ; then \
1331 r
=`pwd`; export r
; \
1332 s
=`cd $(srcdir); pwd`; export s
; \
1335 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1340 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1341 # To build a target check-X means to cd to X and make all.
1342 .PHONY
: $(CHECK_X11_MODULES
)
1343 $(CHECK_X11_MODULES
):
1344 @
dir=`echo $@ | sed -e 's/check-//'`; \
1345 if
[ -f .
/$${dir}/Makefile
] ; then \
1346 r
=`pwd`; export r
; \
1347 s
=`cd $(srcdir); pwd`; export s
; \
1350 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1355 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1356 # To build a target install-X means to cd to X and make install.
1357 .PHONY
: $(INSTALL_X11_MODULES
)
1358 $(INSTALL_X11_MODULES
): installdirs
1359 @
dir=`echo $@ | sed -e 's/install-//'`; \
1360 if
[ -f .
/$${dir}/Makefile
] ; then \
1361 r
=`pwd`; export r
; \
1362 s
=`cd $(srcdir); pwd`; export s
; \
1365 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1370 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
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
) all); \
1382 .PHONY
: all-bootstrap
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
) bootstrap
); \
1395 @if
[ -f .
/gcc
/Makefile
] ; then \
1396 r
=`pwd`; export r
; \
1397 s
=`cd $(srcdir); pwd`; export s
; \
1399 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1406 @if
[ -f .
/gcc
/Makefile
] ; then \
1407 r
=`pwd`; export r
; \
1408 s
=`cd $(srcdir); pwd`; export s
; \
1410 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1416 # EXPERIMENTAL STUFF
1417 # This rule is used to install the modules which use FLAGS_TO_PASS.
1418 # To build a target install-X means to cd to X and make install.
1419 .PHONY
: install-dosrel
1420 install-dosrel
: installdirs info
1421 @
dir=`echo $@ | sed -e 's/install-//'`; \
1422 if
[ -f .
/$${dir}/Makefile
] ; then \
1423 r
=`pwd`; export r
; \
1424 s
=`cd $(srcdir); pwd`; export s
; \
1426 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1431 install-dosrel-fake
:
1434 # This is a list of inter-dependencies among modules.
1436 all-autoconf
: all-m4 all-texinfo
1440 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc
1441 all-bison
: all-texinfo
1444 configure-target-cygmon
: $(ALL_GCC
)
1445 all-target-cygmon
: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1447 all-dejagnu
: all-tcl all-expect all-tk
1448 all-diff
: all-libiberty
1450 all-emacs19
: all-bison all-byacc
1452 configure-target-examples
: $(ALL_GCC
)
1453 all-target-examples
: configure-target-examples
1454 all-expect
: all-tcl all-tk
1455 all-fileutils
: all-libiberty
1458 all-flex
: all-libiberty all-bison all-byacc
1459 all-gas
: all-libiberty all-opcodes all-bfd
1463 all-gcc
: all-bison all-byacc all-binutils all-gas all-ld
1464 all-bootstrap
: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1465 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libide
1466 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1468 configure-target-gperf
: $(ALL_GCC
)
1469 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libstdc
++
1470 all-gprof
: all-libiberty all-bfd all-opcodes
1471 all-grep
: all-libiberty
1472 all-grez
: all-libiberty all-bfd all-opcodes
1473 all-gui
: all-gdb all-libproc all-target-librx
1475 all-gzip
: all-libiberty
1476 all-hello
: all-libiberty
1477 # start-sanitize-ide
1481 all-inet
: all-tcl all-send-pr all-perl
1482 all-ispell
: all-emacs19
1483 all-itcl
: all-tcl all-tk
1484 # start-sanitize-ide
1485 all-jstools
: all-tcl all-tk all-tix all-libide
1487 all-ld
: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex
1488 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1489 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
++
1490 configure-target-libgloss
: $(ALL_GCC
)
1491 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1492 configure-target-libio
: $(ALL_GCC
)
1493 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1494 check-target-libio
: all-target-libstdc
++
1496 all-libide
: all-tcl all-tk all-itcl all-ilu
1497 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1498 all-target-librx
: configure-target-librx
1499 configure-target-libstdc
++: $(ALL_GCC
)
1500 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1501 all-m4
: all-libiberty
1502 all-make
: all-libiberty
1504 configure-target-newlib
: $(ALL_GCC
)
1505 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1506 all-opcodes
: all-bfd all-libiberty
1507 all-patch
: all-libiberty
1509 all-prms
: all-libiberty
1512 all-recode
: all-libiberty
1513 all-sed
: all-libiberty
1514 all-send-pr
: all-prms
1516 all-sim
: all-libiberty all-bfd all-opcodes all-readline
1517 all-sn
: all-tcl all-tk all-tix all-itcl all-db all-grep
1518 all-tar
: all-libiberty
1520 all-tclX
: all-tcl all-tk
1522 all-texinfo
: all-libiberty
1524 all-tgas
: all-libiberty all-bfd all-opcodes
1526 all-tix
: all-tcl all-tk
1527 # start-sanitize-ide
1528 all-vmake
: all-tcl all-tk all-itcl all-tix all-libide
1531 all-target-winsup
: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1532 configure-target-winsup
: configure-target-newlib
1533 all-uudecode
: all-libiberty
1534 configure-target-libiberty
: $(ALL_GCC
)
1535 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1536 all-target
: $(ALL_TARGET_MODULES
)
1537 install-itcl
: install-tcl
1538 install-target
: $(INSTALL_TARGET_MODULES
)
1540 ### other supporting targets
1546 installdirs: mkinstalldirs
1547 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1549 dir.
info: do-install-info
1550 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1551 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1552 mv
-f
dir.
info.new
dir.
info ; \
1557 @echo
"Building a full distribution of this tree isn't done"
1558 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1562 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1563 # ability to use several tags files at once, so there is probably no need
1564 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1565 # (if we felt like it) have this Makefile write a piece of elisp which
1566 # the user could load to tell emacs19 where all the TAGS files we just
1570 # with the gnu make, this is done automatically.
1572 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
1573 $(SHELL
) .
/config.status
1576 # Support for building net releases
1578 # Files in devo used in any net release.
1579 # ChangeLog omitted because it may refer to files which are not in this
1580 # distribution (perhaps it would be better to include it anyway).
1581 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1582 config.guess config.sub config move-if-change \
1583 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1584 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1585 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1587 # Files in devo/etc used in any net release.
1588 # ChangeLog omitted because it may refer to files which are not in this
1589 # distribution (perhaps it would be better to include it anyway).
1590 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1591 make-stds.texi standards.
info*
1593 # When you use `make setup-dirs' or `make taz' you should always redefine
1595 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1599 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1600 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1601 # Take out texinfo from a few places; make simple BISON=bison line.
1602 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1603 -e
'/^ install-texinfo /d' \
1605 mv
-f tmp Makefile.in
1607 $(start-sanitize-Sanitize
)
1608 @if
[ -f .Sanitize
] ; then echo
"RUN Sanitize FIRST!" ; false
; fi
;
1609 $(end-sanitize-Sanitize
)
1611 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1612 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1613 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1614 # Make links, and run "make diststuff" or "make info" when needed.
1615 rm -rf proto-toplev
; mkdir proto-toplev
1616 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1617 for d in
$$dirs ; do \
1618 if
[ -d
$$d ]; then \
1619 if
[ ! -f
$$d/Makefile
] ; then true
; \
1620 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1621 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1622 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1623 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1625 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1626 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1628 ln
-s ..
/$$d proto-toplev
/$$d ; \
1630 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1632 cd etc
; $(MAKE
) info
1635 mkdir proto-toplev
/etc
1636 (cd proto-toplev
/etc
; \
1637 for i in
$(ETC_SUPPORT
); do \
1638 ln
-s ..
/..
/etc
/$$i .
; \
1641 # Take out texinfo from configurable dirs
1642 rm proto-toplev
/configure.in
1643 sed
-e
'/^host_tools=/s/texinfo //' \
1644 <configure.in
>proto-toplev
/configure.in
1646 mkdir proto-toplev
/texinfo
1647 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1648 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1649 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1650 if
test -r texinfo
/util
/tex3patch
; then \
1651 mkdir proto-toplev
/texinfo
/util
&& \
1652 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1654 chmod og
=u
`find . -print`
1655 if grep AM_INIT_AUTOMAKE
$(TOOL
)/configure.in
>/dev
/null
2>&1; then \
1656 ver
=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1658 ver
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1660 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) VER
=$$ver
1663 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1664 -rm -f
$(TOOL
)-$(VER
)
1665 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1666 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1667 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1669 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1670 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1673 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes setup.com makefile.vms
1674 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1675 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1676 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1678 # The FSF "binutils" release includes gprof and ld.
1679 .PHONY
: binutils.
tar.gz
1680 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof setup.com makefile.vms
1681 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1682 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1683 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1685 .PHONY
: gas
+binutils.
tar.gz
1686 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1687 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1688 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1689 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1691 .PHONY
: libg
++.
tar.gz
1692 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1693 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1694 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1695 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1697 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1698 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1699 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1700 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1703 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils
1704 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1705 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1706 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1707 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1709 .PHONY
: newlib.
tar.gz
1710 NEWLIB_SUPPORT_DIRS
=libgloss
1711 # taz configures for the sun4 target which won't configure newlib.
1712 # We need newlib configured so that the .info files are made.
1713 # Unfortunately, it is not enough to just configure newlib separately:
1714 # taz will build the .info files but since SUBDIRS won't contain newlib,
1715 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1716 # used in building the .info files, eg: *.def, *.ref).
1717 # The problem isn't solvable however without a lot of extra work because
1718 # target libraries are built in subdir $(target_alias) which gets nuked during
1719 # the make distclean. For now punt on the issue of shipping newlib info files
1720 # with newlib net releases and wait for a day when some native target (sun4?)
1721 # supports newlib (if only minimally).
1722 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1723 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1724 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1725 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1730 # start-sanitize-chill
1731 ## This is ugly, but I don't want GNU make to put these variables in
1732 ## the environment. Older makes will see this as a set of targets
1733 ## with no dependencies and no actions.
1734 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1735 # end-sanitize-chill
1737 # end of Makefile.in