2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
4 # Free Software Foundation
6 # This file is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 exec_prefix = $(prefix)
26 bindir=${exec_prefix}/bin
27 sbindir=${exec_prefix}/sbin
28 libexecdir=${exec_prefix}/libexec
29 datadir=${prefix}/share
30 sysconfdir=${prefix}/etc
31 sharedstatedir=${prefix}/com
32 localstatedir=${prefix}/var
33 libdir=${exec_prefix}/lib
34 includedir=${prefix}/include
35 oldincludedir=/usr/include
36 infodir=${prefix}/info
39 tooldir = $(exec_prefix)/$(target)
41 program_transform_name =
43 man1dir = $(mandir)/man1
44 man2dir = $(mandir)/man2
45 man3dir = $(mandir)/man3
46 man4dir = $(mandir)/man4
47 man5dir = $(mandir)/man5
48 man6dir = $(mandir)/man6
49 man7dir = $(mandir)/man7
50 man8dir = $(mandir)/man8
51 man9dir = $(mandir)/man9
56 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
58 INSTALL_PROGRAM_ARGS =
60 INSTALL = $(SHELL) $$s/install-sh -c
61 INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
62 INSTALL_SCRIPT = $(INSTALL)
63 INSTALL_DATA = $(INSTALL) -m 644
65 INSTALL_DOSREL = install-dosrel-fake
72 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
73 # here so that they can be overridden by Makefile fragments.
74 HOST_CC = $(CC_FOR_BUILD)
76 HOST_PREFIX_1 = loser-
78 # These flag values are normally overridden by the configure script.
83 CFLAGS_FOR_TARGET = $(CFLAGS)
85 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
89 # start-sanitize-chill
90 CHILLFLAGS = $(CFLAGS)
95 # Use -O2 to stress test the compiler.
96 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
97 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
98 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
109 # Not plain GZIP, since gzip looks there for extra command-line options.
112 # These values are substituted by configure.
116 BISON = `if [ -f $$r/bison/bison ] ; then \
117 echo $$r/bison/bison -L $$s/bison/ ; \
122 YACC = `if [ -f $$r/bison/bison ] ; then \
123 echo $$r/bison/bison -y -L $$s/bison/ ; \
124 elif [ -f $$r/byacc/byacc ] ; then \
125 echo $$r/byacc/byacc ; \
127 echo ${DEFAULT_YACC} ; \
130 LEX = `if [ -f $$r/flex/flex ] ; \
131 then echo $$r/flex/flex ; \
132 else echo ${DEFAULT_LEX} ; fi`
134 M4 = `if [ -f $$r/m4/m4 ] ; \
135 then echo $$r/m4/m4 ; \
138 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
139 then echo $$r/texinfo/makeinfo/makeinfo ; \
140 else echo makeinfo ; fi`
142 # This just becomes part of the MAKEINFO definition passed down to
143 # sub-makes. It lets flags be given on the command line while still
144 # using the makeinfo from the object tree.
147 EXPECT = `if [ -f $$r/expect/expect ] ; \
148 then echo $$r/expect/expect ; \
149 else echo expect ; fi`
151 RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
152 then echo $$s/dejagnu/runtest ; \
153 else echo runtest ; fi`
156 # compilers to use to create programs which must be run in the build
159 CXX_FOR_BUILD = $(CXX)
161 SUBDIRS = "this is set via configure, don't edit this"
164 # This is set by the configure script to the list of directories which
165 # should be built using the target tools.
166 TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup opcodes cygmon
168 # Target libraries are put under this directory:
169 # Changed by configure to $(target_alias) if cross.
172 # This is set by the configure script to the arguments passed to configure.
175 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
179 # This is the name of the environment variable used for the path to
180 # the libraries. This may be changed by configure.in.
181 RPATH_ENVVAR = LD_LIBRARY_PATH
183 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
184 REALLY_SET_LIB_PATH = \
185 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
186 export $(RPATH_ENVVAR);
189 INSTALL_TARGET = installdirs \
192 $(INSTALL_TARGET_MODULES) \
193 $(INSTALL_X11_MODULES) \
198 if [ -f $$r/gcc/xgcc ] ; then \
199 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
200 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
201 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; \
203 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
206 echo $$r/gcc/xgcc -B$$r/gcc/; \
209 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
212 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
216 # If CC_FOR_TARGET is not overriden on the command line, then this
217 # variable is passed down to the gcc Makefile, where it is used to
218 # build libgcc2.a. We define it here so that it can itself be
219 # overridden on the command line.
220 GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
222 # start-sanitize-chill
223 CHILL_FOR_TARGET = ` \
224 if [ -f $$r/gcc/xgcc ] ; then \
225 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
227 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
230 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
237 if [ -f $$r/gcc/xgcc ] ; then \
238 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
239 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
240 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; \
242 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
245 echo $$r/gcc/xgcc -B$$r/gcc/; \
248 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
251 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
256 if [ -f $$r/gas/as-new ] ; then \
257 echo $$r/gas/as-new ; \
259 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
262 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
267 if [ -f $$r/ld/ld-new ] ; then \
268 echo $$r/ld/ld-new ; \
270 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
273 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
277 DLLTOOL_FOR_TARGET = ` \
278 if [ -f $$r/binutils/dlltool ] ; then \
279 echo $$r/binutils/dlltool ; \
281 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
284 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
288 WINDRES_FOR_TARGET = ` \
289 if [ -f $$r/binutils/windres ] ; then \
290 echo $$r/binutils/windres ; \
292 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
295 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
300 if [ -f $$r/binutils/ar ] ; then \
301 echo $$r/binutils/ar ; \
303 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
306 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
310 RANLIB_FOR_TARGET = ` \
311 if [ -f $$r/binutils/ranlib ] ; then \
312 echo $$r/binutils/ranlib ; \
314 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
317 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
322 if [ -f $$r/binutils/nm-new ] ; then \
323 echo $$r/binutils/nm-new ; \
325 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
328 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
332 #### host and target specific makefile fragments come in here.
335 # Flags to pass down to all sub-makes.
336 # Please keep these in alphabetical order.
337 BASE_FLAGS_TO_PASS = \
338 "AR_FLAGS=$(AR_FLAGS)" \
339 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
340 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
342 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
343 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
345 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
346 $(start-sanitize-chill)\
347 "CHILLFLAGS=$(CHILLFLAGS)" \
348 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
349 "CHILL_LIB=$(CHILL_LIB)" \
350 $(end-sanitize-chill)\
351 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
352 "CXXFLAGS=$(CXXFLAGS)" \
353 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
354 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
355 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
356 "INSTALL=$(INSTALL)" \
357 "INSTALL_DATA=$(INSTALL_DATA)" \
358 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
359 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
360 "LDFLAGS=$(LDFLAGS)" \
362 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
363 "LIBCFLAGS=$(LIBCFLAGS)" \
364 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
365 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
366 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
369 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
370 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
371 "PICFLAG=$(PICFLAG)" \
372 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
373 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
374 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
377 "RUNTEST=$(RUNTEST)" \
378 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
379 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
382 "datadir=$(datadir)" \
383 "exec_prefix=$(exec_prefix)" \
384 "includedir=$(includedir)" \
385 "infodir=$(infodir)" \
387 "libexecdir=$(libexecdir)" \
388 "lispdir=$(lispdir)" \
389 "localstatedir=$(localstatedir)" \
391 "oldincludedir=$(oldincludedir)" \
393 "sbindir=$(sbindir)" \
394 "sharedstatedir=$(sharedstatedir)" \
395 "sysconfdir=$(sysconfdir)" \
398 # Flags to pass down to most sub-makes, in which we're building with
399 # the host environment.
400 # If any variables are added here, they must be added to do-*, below.
406 'DLLTOOL=$(DLLTOOL)' \
412 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
414 # Flags that are concerned with the location of the X11 include files
417 # NOTE: until the top-level is getting the values via autoconf, it only
418 # causes problems to have this top-level Makefile overriding the autoconf-set
419 # values in child directories. Only variables that don't conflict with
420 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
422 X11_FLAGS_TO_PASS = \
423 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
424 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
426 # Flags to pass down to makes which are built with the target environment.
427 # The double $ decreases the length of the command line; the variables
428 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
429 # If any variables are added here, they must be added to do-*, below.
430 EXTRA_TARGET_FLAGS = \
431 'AR=$$(AR_FOR_TARGET)' \
432 'AS=$$(AS_FOR_TARGET)' \
433 'CC=$$(CC_FOR_TARGET)' \
434 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
435 'CXX=$$(CXX_FOR_TARGET)' \
436 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
437 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
438 'LD=$$(LD_FOR_TARGET)' \
439 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
440 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
441 'NM=$$(NM_FOR_TARGET)' \
442 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
443 'RANLIB=$$(RANLIB_FOR_TARGET)' \
444 'WINDRES=$$(WINDRES_FOR_TARGET)'
446 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
448 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
449 # unfortunately needs the native compiler and the target ar and
451 # If any variables are added here, they must be added to do-*, below.
452 # The HOST_* variables are a special case, which are used for the gcc
453 # cross-building scheme.
455 'AR=$$(AR_FOR_TARGET)' \
459 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
460 'HOST_CC=$(CC_FOR_BUILD)' \
461 'HOST_PREFIX=$(HOST_PREFIX)' \
462 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
464 'RANLIB=$$(RANLIB_FOR_TARGET)' \
465 'WINDRES=$$(WINDRES_FOR_TARGET)' \
466 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
467 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
468 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
469 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
470 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
471 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
472 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
473 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
474 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
475 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
477 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
479 # This is a list of the targets for all of the modules which are compiled
480 # using $(FLAGS_TO_PASS).
510 $(start-sanitize-ide) \
512 $(end-sanitize-ide) \
518 $(start-sanitize-ide) \
520 $(end-sanitize-ide) \
524 $(start-sanitize-ide) \
527 $(end-sanitize-ide) \
552 $(start-sanitize-ide) \
554 $(end-sanitize-ide) \
557 # This is a list of the check targets for all of the modules which are
558 # compiled using $(FLAGS_TO_PASS).
560 # The list is in two parts. The first lists those tools which
561 # are tested as part of the host's native tool-chain, and not
562 # tested in a cross configuration.
563 NATIVE_CHECK_MODULES = \
568 CROSS_CHECK_MODULES = \
592 $(start-sanitize-ide) \
594 $(end-sanitize-ide) \
600 $(start-sanitize-ide) \
602 $(end-sanitize-ide) \
606 $(start-sanitize-ide) \
609 $(end-sanitize-ide) \
633 $(start-sanitize-ide) \
635 $(end-sanitize-ide) \
638 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
640 # This is a list of the install targets for all of the modules which are
641 # compiled using $(FLAGS_TO_PASS).
642 # We put install-opcodes before install-binutils because the installed
643 # binutils might be on PATH, and they might need the shared opcodes
645 # We put install-tcl before install-itcl because itcl wants to run a
646 # program on installation which uses the Tcl libraries.
677 $(start-sanitize-ide) \
679 $(end-sanitize-ide) \
686 $(start-sanitize-ide) \
688 $(end-sanitize-ide) \
692 $(start-sanitize-ide) \
695 $(end-sanitize-ide) \
717 $(start-sanitize-ide) \
719 $(end-sanitize-ide) \
722 # This is a list of the targets for all of the modules which are compiled
723 # using $(X11_FLAGS_TO_PASS).
735 # This is a list of the check targets for all of the modules which are
736 # compiled using $(X11_FLAGS_TO_PASS).
737 CHECK_X11_MODULES = \
747 # This is a list of the install targets for all the modules which are
748 # compiled using $(X11_FLAGS_TO_PASS).
749 INSTALL_X11_MODULES = \
760 # This is a list of the targets for all of the modules which are compiled
761 # using $(TARGET_FLAGS_TO_PASS).
762 ALL_TARGET_MODULES = \
764 all-target-libstdc++ \
769 all-target-libgloss \
770 all-target-libiberty \
772 all-target-examples \
775 # This is a list of the configure targets for all of the modules which
776 # are compiled using the target tools.
777 CONFIGURE_TARGET_MODULES = \
778 configure-target-libio \
779 configure-target-libstdc++ \
780 configure-target-librx \
781 configure-target-libg++ \
782 configure-target-newlib \
783 configure-target-winsup \
784 configure-target-libgloss \
785 configure-target-libiberty \
786 configure-target-gperf \
787 configure-target-examples \
788 configure-target-cygmon
790 # This is a list of the check targets for all of the modules which are
791 # compiled using $(TARGET_FLAGS_TO_PASS).
792 CHECK_TARGET_MODULES = \
794 check-target-libstdc++ \
795 check-target-libg++ \
796 check-target-newlib \
797 check-target-winsup \
798 check-target-libiberty \
801 # This is a list of the install targets for all of the modules which are
802 # compiled using $(TARGET_FLAGS_TO_PASS).
803 INSTALL_TARGET_MODULES = \
804 install-target-libio \
805 install-target-libstdc++ \
806 install-target-libg++ \
807 install-target-newlib \
808 install-target-winsup \
809 install-target-libgloss \
810 install-target-libiberty \
813 # This is a list of the targets for which we can do a clean-{target}.
843 $(start-sanitize-ide) \
845 $(end-sanitize-ide) \
851 $(start-sanitize-ide) \
853 $(end-sanitize-ide) \
857 $(start-sanitize-ide) \
860 $(end-sanitize-ide) \
885 $(start-sanitize-ide) \
887 $(end-sanitize-ide) \
890 # All of the target modules that can be cleaned
891 CLEAN_TARGET_MODULES = \
893 clean-target-libstdc++ \
895 clean-target-libg++ \
896 clean-target-newlib \
897 clean-target-winsup \
898 clean-target-libgloss \
899 clean-target-libiberty \
901 clean-target-examples \
904 # All of the x11 modules that can be cleaned
905 CLEAN_X11_MODULES = \
916 # The first rule in the file had better be this one. Don't put any above it.
920 # The target built for a native build.
925 $(ALL_TARGET_MODULES) \
928 # Do a target for all the subdirectories. A ``make do-X'' will do a
929 # ``make X'' in all subdirectories (because, in general, there is a
930 # dependency (below) of X upon do-X, a ``make X'' will also do this,
931 # but it may do additional work as well).
932 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
933 # because it is so large that it can easily overflow the command line
934 # length limit on some systems.
943 do-maintainer-clean \
947 @target=`echo $@ | sed -e 's/^do-//'`; \
949 s=`cd $(srcdir); pwd`; export s; \
951 for i in $(SUBDIRS) -dummy-; do \
952 if [ -f ./$$i/Makefile ]; then \
955 for flag in $(EXTRA_GCC_FLAGS); do \
956 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
960 for flag in $(EXTRA_HOST_FLAGS); do \
961 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
965 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
967 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
968 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
969 "RANLIB=$${RANLIB}" \
970 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
972 then true; else exit 1; fi; \
975 @target=`echo $@ | sed -e 's/^do-//'`; \
977 s=`cd $(srcdir); pwd`; export s; \
979 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
980 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
981 for flag in $(EXTRA_TARGET_FLAGS); do \
982 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
984 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
985 if (cd $(TARGET_SUBDIR)/$$i; \
986 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
987 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
988 "RANLIB=$${RANLIB}" \
989 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
991 then true; else exit 1; fi; \
995 # Here are the targets which correspond to the do-X targets.
997 .PHONY: info installcheck dvi install-info
998 .PHONY: clean distclean mostlyclean maintainer-clean realclean
999 .PHONY: local-clean local-distclean local-maintainer-clean
1001 installcheck: do-installcheck
1004 # Make sure makeinfo is built before we do a `make info'.
1005 do-info: all-texinfo
1007 install-info: do-install-info dir.info
1008 s=`cd $(srcdir); pwd`; export s; \
1009 if [ -f dir.info ] ; then \
1010 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
1014 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
1017 -rm -f Makefile config.status config.cache
1018 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1019 rm -rf $(TARGET_SUBDIR); \
1022 local-maintainer-clean:
1023 @echo "This command is intended for maintainers to use;"
1024 @echo "it deletes files that may require special tools to rebuild."
1026 clean: do-clean local-clean
1027 mostlyclean: do-mostlyclean local-clean
1028 distclean: do-distclean local-clean local-distclean
1029 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1030 maintainer-clean: local-distclean
1031 realclean: maintainer-clean
1033 # This rule is used to clean specific modules.
1034 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1035 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1036 @dir=`echo $@ | sed -e 's/clean-//'`; \
1037 if [ -f ./$${dir}/Makefile ] ; then \
1038 r=`pwd`; export r; \
1039 s=`cd $(srcdir); pwd`; export s; \
1041 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1046 .PHONY: $(CLEAN_TARGET_MODULES)
1047 $(CLEAN_TARGET_MODULES):
1048 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1049 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1050 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1051 r=`pwd`; export r; \
1052 s=`cd $(srcdir); pwd`; export s; \
1054 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1059 clean-target: $(CLEAN_TARGET_MODULES)
1064 check: $(CHECK_MODULES) \
1065 $(CHECK_TARGET_MODULES) \
1066 $(CHECK_X11_MODULES) \
1069 # Installation targets.
1071 .PHONY: install uninstall source-vault binary-vault vault-install
1072 install: $(INSTALL_TARGET)
1075 @echo "the uninstall target is not supported in this tree"
1078 $(MAKE) -f ./release/Build-A-Release \
1079 host=$(host_alias) source-vault
1082 $(MAKE) -f ./release/Build-A-Release \
1083 host=$(host_alias) target=$(target_alias)
1086 @if [ -f ./release/vault-install ] ; then \
1087 ./release/vault-install $(host_alias) $(target_alias) ; \
1093 install.all: install-no-fixedincludes
1094 @if [ -f ./gcc/Makefile ] ; then \
1095 r=`pwd` ; export r ; \
1098 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1103 # inet-install is used because the I*Net wants DejaGNU installed but
1104 # not built. Similarly, gzip is built but not installed.
1106 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1108 # install-no-fixedincludes is used because Cygnus can not distribute
1109 # the fixed header files.
1110 .PHONY: install-no-fixedincludes
1111 install-no-fixedincludes: \
1113 $(INSTALL_MODULES) \
1114 $(INSTALL_TARGET_MODULES) \
1115 $(INSTALL_X11_MODULES) \
1116 gcc-no-fixedincludes
1118 # Install the gcc headers files, but not the fixed include files,
1119 # which Cygnus is not allowed to distribute. This rule is very
1120 # dependent on the workings of the gcc Makefile.in.
1121 .PHONY: gcc-no-fixedincludes
1122 gcc-no-fixedincludes:
1123 @if [ -f ./gcc/Makefile ]; then \
1124 rm -rf gcc/tmp-include; \
1125 mv gcc/include gcc/tmp-include 2>/dev/null; \
1126 mkdir gcc/include; \
1127 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1128 touch gcc/stmp-fixinc gcc/include/fixed; \
1129 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1130 r=`pwd`; export r; \
1131 s=`cd $(srcdir); pwd` ; export s; \
1134 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1135 rm -rf gcc/include; \
1136 mv gcc/tmp-include gcc/include 2>/dev/null; \
1139 # start-sanitize-ide
1140 # Install Foundry. Avoid installing a bunch of stuff we don't need.
1142 mods="$(INSTALL_MODULES)"; \
1143 x11_mods="$(INSTALL_X11_MODULES)"; \
1144 for d in install-tcl install-tk install-itcl install-tix install-ilu; do \
1145 mods="`echo $${mods} | sed -e "s/$$d//"`"; \
1146 x11_mods="`echo $${x11_mods} | sed -e "s/$$d//"`"; \
1148 $(MAKE) INSTALL_MODULES="$${mods}" INSTALL_X11_MODULES="$${x11_mods}" install
1149 for d in tcl tk itcl tix ilu; do \
1150 if [ -f $$d/Makefile ]; then \
1151 r=`pwd`; export r; \
1152 s=`cd $(srcdir); pwd`; export s; \
1154 (cd $$d; $(MAKE) $(FLAGS_TO_PASS) install-minimal); \
1161 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1162 # build a target all-X means to cd to X and make all.
1164 # all-gui, and all-libproc are handled specially because
1165 # they are still experimental, and if they fail to build, that
1166 # shouldn't stop "make all".
1167 .PHONY: $(ALL_MODULES) all-gui all-libproc
1168 $(ALL_MODULES) all-gui all-libproc:
1169 @dir=`echo $@ | sed -e 's/all-//'`; \
1170 if [ -f ./$${dir}/Makefile ] ; then \
1171 r=`pwd`; export r; \
1172 s=`cd $(srcdir); pwd`; export s; \
1174 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1179 # These rules are used to check the modules which use FLAGS_TO_PASS.
1180 # To build a target check-X means to cd to X and make check. Some
1181 # modules are only tested in a native toolchain.
1183 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1184 $(NATIVE_CHECK_MODULES):
1185 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1186 dir=`echo $@ | sed -e 's/check-//'`; \
1187 if [ -f ./$${dir}/Makefile ] ; then \
1188 r=`pwd`; export r; \
1189 s=`cd $(srcdir); pwd`; export s; \
1191 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1197 $(CROSS_CHECK_MODULES):
1198 @dir=`echo $@ | sed -e 's/check-//'`; \
1199 if [ -f ./$${dir}/Makefile ] ; then \
1200 r=`pwd`; export r; \
1201 s=`cd $(srcdir); pwd`; export s; \
1203 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1208 # This rule is used to install the modules which use FLAGS_TO_PASS.
1209 # To build a target install-X means to cd to X and make install.
1210 .PHONY: $(INSTALL_MODULES)
1211 $(INSTALL_MODULES): installdirs
1212 @dir=`echo $@ | sed -e 's/install-//'`; \
1213 if [ -f ./$${dir}/Makefile ] ; then \
1214 r=`pwd`; export r; \
1215 s=`cd $(srcdir); pwd`; export s; \
1217 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1222 # This rule is used to configure the modules which are built with the
1224 .PHONY: $(CONFIGURE_TARGET_MODULES)
1225 $(CONFIGURE_TARGET_MODULES):
1226 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1227 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1228 r=`pwd`; export r; \
1229 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1230 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1231 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1232 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1233 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1235 echo "Multilibs changed for $${dir}, reconfiguring"; \
1236 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1237 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1240 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1243 fi; exit 0 # break command into two pieces
1244 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1245 if [ ! -d $(TARGET_SUBDIR) ]; then \
1247 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1249 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1250 if [ -d $(srcdir)/$${dir} ]; then \
1251 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1252 r=`pwd`; export r; \
1253 s=`cd $(srcdir); pwd`; export s; \
1255 AR="$(AR_FOR_TARGET)"; export AR; \
1256 AS="$(AS_FOR_TARGET)"; export AS; \
1257 CC="$(CC_FOR_TARGET)"; export CC; \
1258 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1259 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1260 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1261 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1262 LD="$(LD_FOR_TARGET)"; export LD; \
1263 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1264 NM="$(NM_FOR_TARGET)"; export NM; \
1265 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1266 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1267 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1268 cd $(TARGET_SUBDIR)/$${dir}; \
1271 topdir=$(srcdir) ;; \
1273 case "$(TARGET_SUBDIR)" in \
1274 .) topdir="../$(srcdir)" ;; \
1275 *) topdir="../../$(srcdir)" ;; \
1278 if [ "$(srcdir)" = "." ] ; then \
1279 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1280 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1281 if [ -f Makefile ]; then \
1282 if $(MAKE) distclean; then \
1296 srcdiroption="--srcdir=."; \
1299 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1300 libsrcdir="$$s/$${dir}"; \
1302 if [ -f $${libsrcdir}/configure ] ; then \
1303 $(SHELL) $${libsrcdir}/configure \
1304 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1305 --with-target-subdir="$(TARGET_SUBDIR)"; \
1307 $(SHELL) $$s/configure \
1308 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1309 --with-target-subdir="$(TARGET_SUBDIR)"; \
1318 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1319 # To build a target all-X means to cd to X and make all.
1320 .PHONY: $(ALL_TARGET_MODULES)
1321 $(ALL_TARGET_MODULES):
1322 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1323 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1324 r=`pwd`; export r; \
1325 s=`cd $(srcdir); pwd`; export s; \
1327 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1332 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1333 # To build a target install-X means to cd to X and make install.
1334 .PHONY: $(CHECK_TARGET_MODULES)
1335 $(CHECK_TARGET_MODULES):
1336 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1337 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1338 r=`pwd`; export r; \
1339 s=`cd $(srcdir); pwd`; export s; \
1341 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1346 # This rule is used to install the modules which use
1347 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1349 .PHONY: $(INSTALL_TARGET_MODULES)
1350 $(INSTALL_TARGET_MODULES): installdirs
1351 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1352 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1353 r=`pwd`; export r; \
1354 s=`cd $(srcdir); pwd`; export s; \
1356 (cd $(TARGET_SUBDIR)/$${dir}; \
1357 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1362 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1363 # To build a target all-X means to cd to X and make all.
1364 .PHONY: $(ALL_X11_MODULES)
1366 @dir=`echo $@ | sed -e 's/all-//'`; \
1367 if [ -f ./$${dir}/Makefile ] ; then \
1368 r=`pwd`; export r; \
1369 s=`cd $(srcdir); pwd`; export s; \
1372 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1377 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1378 # To build a target check-X means to cd to X and make all.
1379 .PHONY: $(CHECK_X11_MODULES)
1380 $(CHECK_X11_MODULES):
1381 @dir=`echo $@ | sed -e 's/check-//'`; \
1382 if [ -f ./$${dir}/Makefile ] ; then \
1383 r=`pwd`; export r; \
1384 s=`cd $(srcdir); pwd`; export s; \
1387 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1392 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1393 # To build a target install-X means to cd to X and make install.
1394 .PHONY: $(INSTALL_X11_MODULES)
1395 $(INSTALL_X11_MODULES): installdirs
1396 @dir=`echo $@ | sed -e 's/install-//'`; \
1397 if [ -f ./$${dir}/Makefile ] ; then \
1398 r=`pwd`; export r; \
1399 s=`cd $(srcdir); pwd`; export s; \
1402 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1407 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1410 @if [ -f ./gcc/Makefile ] ; then \
1411 r=`pwd`; export r; \
1412 s=`cd $(srcdir); pwd`; export s; \
1414 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1419 .PHONY: all-bootstrap
1421 @if [ -f ./gcc/Makefile ] ; then \
1422 r=`pwd`; export r; \
1423 s=`cd $(srcdir); pwd`; export s; \
1425 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1432 @if [ -f ./gcc/Makefile ] ; then \
1433 r=`pwd`; export r; \
1434 s=`cd $(srcdir); pwd`; export s; \
1436 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1443 @if [ -f ./gcc/Makefile ] ; then \
1444 r=`pwd`; export r; \
1445 s=`cd $(srcdir); pwd`; export s; \
1447 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1453 # EXPERIMENTAL STUFF
1454 # This rule is used to install the modules which use FLAGS_TO_PASS.
1455 # To build a target install-X means to cd to X and make install.
1456 .PHONY: install-dosrel
1457 install-dosrel: installdirs info
1458 @dir=`echo $@ | sed -e 's/install-//'`; \
1459 if [ -f ./$${dir}/Makefile ] ; then \
1460 r=`pwd`; export r; \
1461 s=`cd $(srcdir); pwd`; export s; \
1463 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1468 install-dosrel-fake:
1471 # This is a list of inter-dependencies among modules.
1474 all-autoconf: all-m4 all-texinfo
1478 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc
1479 all-bison: all-texinfo
1482 configure-target-cygmon: $(ALL_GCC)
1483 all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1485 all-dejagnu: all-tcl all-expect all-tk
1486 all-diff: all-libiberty
1488 all-emacs19: all-bison all-byacc
1490 configure-target-examples: $(ALL_GCC)
1491 all-target-examples: configure-target-examples
1492 all-expect: all-tcl all-tk
1493 all-fileutils: all-libiberty
1496 all-flex: all-libiberty all-bison all-byacc
1497 all-gas: all-libiberty all-opcodes all-bfd
1501 all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1502 all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1503 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1504 # start-sanitize-ide
1505 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui all-libide all-libidetcl
1507 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1510 configure-target-gperf: $(ALL_GCC)
1511 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
1512 all-gprof: all-libiberty all-bfd all-opcodes
1513 all-grep: all-libiberty
1514 all-grez: all-libiberty all-bfd all-opcodes
1515 all-gui: all-gdb all-libproc all-target-librx
1517 all-gzip: all-libiberty
1518 all-hello: all-libiberty
1519 # start-sanitize-ide
1523 all-inet: all-tcl all-send-pr all-perl
1525 all-ispell: all-emacs19
1526 all-itcl: all-tcl all-tk
1527 # start-sanitize-ide
1528 all-jstools: all-tcl all-tk all-tix all-libgui all-libide all-libidetcl
1530 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex
1531 configure-target-libg++: $(ALL_GCC) configure-target-librx
1532 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++
1533 configure-target-libgloss: $(ALL_GCC)
1534 all-target-libgloss: configure-target-libgloss configure-target-newlib
1535 configure-target-libio: $(ALL_GCC)
1536 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1537 check-target-libio: all-target-libstdc++
1538 all-libgui: all-tcl all-tk all-itcl
1540 # start-sanitize-ide
1542 all-libidetcl: all-tcl all-tk all-itcl all-ilu all-libgui all-libide
1544 configure-target-librx: $(ALL_GCC) configure-target-newlib
1545 all-target-librx: configure-target-librx
1546 configure-target-libstdc++: $(ALL_GCC)
1547 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1549 all-m4: all-libiberty
1550 all-make: all-libiberty
1552 configure-target-newlib: $(ALL_GCC)
1553 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1554 all-opcodes: all-bfd all-libiberty
1555 all-patch: all-libiberty
1557 all-prms: all-libiberty
1560 all-recode: all-libiberty
1561 all-sed: all-libiberty
1562 all-send-pr: all-prms
1564 all-sim: all-libiberty all-bfd all-opcodes all-readline
1565 all-snavigator: all-tcl all-tk all-tix all-itcl all-db all-grep
1566 all-tar: all-libiberty
1568 all-tclX: all-tcl all-tk
1570 all-texinfo: all-libiberty
1572 all-tgas: all-libiberty all-bfd all-opcodes
1574 all-tix: all-tcl all-tk
1575 # start-sanitize-ide
1576 all-vmake: all-tcl all-tk all-itcl all-tix all-libgui all-libide all-libidetcl
1579 all-target-winsup: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup
1580 configure-target-winsup: configure-target-newlib
1581 all-uudecode: all-libiberty
1582 configure-target-libiberty: $(ALL_GCC)
1583 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1584 all-target: $(ALL_TARGET_MODULES)
1585 install-target: $(INSTALL_TARGET_MODULES)
1586 # start-sanitize-gdbtk
1587 install-gdbtk: install-tcl install-tk install-itcl install-tix install-libgui install-gdb
1589 ### other supporting targets
1595 installdirs: mkinstalldirs
1596 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1598 dir.info: do-install-info
1599 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1600 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1601 mv -f dir.info.new dir.info ; \
1606 @echo "Building a full distribution of this tree isn't done"
1607 @echo "via 'make dist'. Check out the etc/ subdirectory"
1611 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1612 # ability to use several tags files at once, so there is probably no need
1613 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1614 # (if we felt like it) have this Makefile write a piece of elisp which
1615 # the user could load to tell emacs19 where all the TAGS files we just
1619 # with the gnu make, this is done automatically.
1621 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
1622 $(SHELL) ./config.status
1625 # Support for building net releases
1627 # Files in devo used in any net release.
1628 # ChangeLog omitted because it may refer to files which are not in this
1629 # distribution (perhaps it would be better to include it anyway).
1630 DEVO_SUPPORT= README Makefile.in configure configure.in \
1631 config.guess config.sub config move-if-change \
1632 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1633 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1634 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1636 # Files in devo/etc used in any net release.
1637 # ChangeLog omitted because it may refer to files which are not in this
1638 # distribution (perhaps it would be better to include it anyway).
1639 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1640 make-stds.texi standards.info*
1642 # When you use `make setup-dirs' or `make taz' you should always redefine
1644 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1648 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1649 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1650 # Take out texinfo from a few places.
1651 sed -e '/^all\.normal: /s/\all-texinfo //' \
1652 -e '/^ install-texinfo /d' \
1654 mv -f tmp Makefile.in
1656 $(start-sanitize-Sanitize)
1657 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1658 $(end-sanitize-Sanitize)
1660 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1661 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1662 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1663 # Make links, and run "make diststuff" or "make info" when needed.
1664 rm -rf proto-toplev ; mkdir proto-toplev
1665 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1666 for d in $$dirs ; do \
1667 if [ -d $$d ]; then \
1668 if [ ! -f $$d/Makefile ] ; then true ; \
1669 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1670 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1671 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1672 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1674 if [ -d $$d/proto-$$d.dir ]; then \
1675 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1677 ln -s ../$$d proto-toplev/$$d ; \
1679 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1681 cd etc ; $(MAKE) info
1684 mkdir proto-toplev/etc
1685 (cd proto-toplev/etc; \
1686 for i in $(ETC_SUPPORT); do \
1687 ln -s ../../etc/$$i . ; \
1690 # Take out texinfo from configurable dirs
1691 rm proto-toplev/configure.in
1692 sed -e '/^host_tools=/s/texinfo //' \
1693 <configure.in >proto-toplev/configure.in
1695 mkdir proto-toplev/texinfo
1696 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1697 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1698 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1699 if test -r texinfo/util/tex3patch ; then \
1700 mkdir proto-toplev/texinfo/util && \
1701 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1703 chmod og=u `find . -print`
1704 if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1705 ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1707 ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1709 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver
1712 echo "==> Making $(TOOL)-$(VER).tar.gz"
1713 -rm -f $(TOOL)-$(VER)
1714 ln -s proto-toplev $(TOOL)-$(VER)
1715 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1716 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
1718 TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1719 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1722 GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms
1723 gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1724 $(MAKE) -f Makefile.in taz TOOL=gas \
1725 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1727 # The FSF "binutils" release includes gprof and ld.
1728 .PHONY: binutils.tar.gz
1729 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms
1730 binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1731 $(MAKE) -f Makefile.in taz TOOL=binutils \
1732 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1734 .PHONY: gas+binutils.tar.gz
1735 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1736 gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1737 $(MAKE) -f Makefile.in taz TOOL=gas \
1738 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1740 .PHONY: libg++.tar.gz
1741 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1742 libg++.tar.gz: $(DIST_SUPPORT) libg++
1743 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1744 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1746 GNATS_SUPPORT_DIRS=include libiberty send-pr
1747 gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1748 $(MAKE) -f Makefile.in taz TOOL=gnats \
1749 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1752 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
1753 GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1754 gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1755 $(MAKE) -f Makefile.in taz TOOL=gdb \
1756 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1758 .PHONY: newlib.tar.gz
1759 NEWLIB_SUPPORT_DIRS=libgloss
1760 # taz configures for the sun4 target which won't configure newlib.
1761 # We need newlib configured so that the .info files are made.
1762 # Unfortunately, it is not enough to just configure newlib separately:
1763 # taz will build the .info files but since SUBDIRS won't contain newlib,
1764 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1765 # used in building the .info files, eg: *.def, *.ref).
1766 # The problem isn't solvable however without a lot of extra work because
1767 # target libraries are built in subdir $(target_alias) which gets nuked during
1768 # the make distclean. For now punt on the issue of shipping newlib info files
1769 # with newlib net releases and wait for a day when some native target (sun4?)
1770 # supports newlib (if only minimally).
1771 newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1772 $(MAKE) -f Makefile.in taz TOOL=newlib \
1773 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1774 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1779 # start-sanitize-chill
1780 ## This is ugly, but I don't want GNU make to put these variables in
1781 ## the environment. Older makes will see this as a set of targets
1782 ## with no dependencies and no actions.
1783 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1784 # end-sanitize-chill
1786 # end of Makefile.in