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) \
551 $(start-sanitize-ide) \
553 $(end-sanitize-ide) \
556 # This is a list of the check targets for all of the modules which are
557 # compiled using $(FLAGS_TO_PASS).
559 # The list is in two parts. The first lists those tools which
560 # are tested as part of the host's native tool-chain, and not
561 # tested in a cross configuration.
562 NATIVE_CHECK_MODULES = \
567 CROSS_CHECK_MODULES = \
591 $(start-sanitize-ide) \
593 $(end-sanitize-ide) \
599 $(start-sanitize-ide) \
601 $(end-sanitize-ide) \
605 $(start-sanitize-ide) \
608 $(end-sanitize-ide) \
631 $(start-sanitize-ide) \
633 $(end-sanitize-ide) \
636 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
638 # This is a list of the install targets for all of the modules which are
639 # compiled using $(FLAGS_TO_PASS).
640 # We put install-opcodes before install-binutils because the installed
641 # binutils might be on PATH, and they might need the shared opcodes
643 # We put install-tcl before install-itcl because itcl wants to run a
644 # program on installation which uses the Tcl libraries.
675 $(start-sanitize-ide) \
677 $(end-sanitize-ide) \
684 $(start-sanitize-ide) \
686 $(end-sanitize-ide) \
690 $(start-sanitize-ide) \
693 $(end-sanitize-ide) \
714 $(start-sanitize-ide) \
716 $(end-sanitize-ide) \
719 # This is a list of the targets for all of the modules which are compiled
720 # using $(X11_FLAGS_TO_PASS).
732 # This is a list of the check targets for all of the modules which are
733 # compiled using $(X11_FLAGS_TO_PASS).
734 CHECK_X11_MODULES = \
744 # This is a list of the install targets for all the modules which are
745 # compiled using $(X11_FLAGS_TO_PASS).
746 INSTALL_X11_MODULES = \
757 # This is a list of the targets for all of the modules which are compiled
758 # using $(TARGET_FLAGS_TO_PASS).
759 ALL_TARGET_MODULES = \
761 all-target-libstdc++ \
766 all-target-libgloss \
767 all-target-libiberty \
769 all-target-examples \
772 # This is a list of the configure targets for all of the modules which
773 # are compiled using the target tools.
774 CONFIGURE_TARGET_MODULES = \
775 configure-target-libio \
776 configure-target-libstdc++ \
777 configure-target-librx \
778 configure-target-libg++ \
779 configure-target-newlib \
780 configure-target-winsup \
781 configure-target-libgloss \
782 configure-target-libiberty \
783 configure-target-gperf \
784 configure-target-examples \
785 configure-target-cygmon
787 # This is a list of the check targets for all of the modules which are
788 # compiled using $(TARGET_FLAGS_TO_PASS).
789 CHECK_TARGET_MODULES = \
791 check-target-libstdc++ \
792 check-target-libg++ \
793 check-target-newlib \
794 check-target-winsup \
795 check-target-libiberty \
798 # This is a list of the install targets for all of the modules which are
799 # compiled using $(TARGET_FLAGS_TO_PASS).
800 INSTALL_TARGET_MODULES = \
801 install-target-libio \
802 install-target-libstdc++ \
803 install-target-libg++ \
804 install-target-newlib \
805 install-target-winsup \
806 install-target-libgloss \
807 install-target-libiberty \
810 # This is a list of the targets for which we can do a clean-{target}.
840 $(start-sanitize-ide) \
842 $(end-sanitize-ide) \
848 $(start-sanitize-ide) \
850 $(end-sanitize-ide) \
854 $(start-sanitize-ide) \
857 $(end-sanitize-ide) \
881 $(start-sanitize-ide) \
883 $(end-sanitize-ide) \
886 # All of the target modules that can be cleaned
887 CLEAN_TARGET_MODULES = \
889 clean-target-libstdc++ \
891 clean-target-libg++ \
892 clean-target-newlib \
893 clean-target-winsup \
894 clean-target-libgloss \
895 clean-target-libiberty \
897 clean-target-examples \
900 # All of the x11 modules that can be cleaned
901 CLEAN_X11_MODULES = \
912 # The first rule in the file had better be this one. Don't put any above it.
916 # The target built for a native build.
921 $(ALL_TARGET_MODULES) \
924 # Do a target for all the subdirectories. A ``make do-X'' will do a
925 # ``make X'' in all subdirectories (because, in general, there is a
926 # dependency (below) of X upon do-X, a ``make X'' will also do this,
927 # but it may do additional work as well).
928 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
929 # because it is so large that it can easily overflow the command line
930 # length limit on some systems.
939 do-maintainer-clean \
943 @target=`echo $@ | sed -e 's/^do-//'`; \
945 s=`cd $(srcdir); pwd`; export s; \
947 for i in $(SUBDIRS) -dummy-; do \
948 if [ -f ./$$i/Makefile ]; then \
951 for flag in $(EXTRA_GCC_FLAGS); do \
952 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
956 for flag in $(EXTRA_HOST_FLAGS); do \
957 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
961 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
963 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
964 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
965 "RANLIB=$${RANLIB}" \
966 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
968 then true; else exit 1; fi; \
971 @target=`echo $@ | sed -e 's/^do-//'`; \
973 s=`cd $(srcdir); pwd`; export s; \
975 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
976 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
977 for flag in $(EXTRA_TARGET_FLAGS); do \
978 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
980 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
981 if (cd $(TARGET_SUBDIR)/$$i; \
982 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
983 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
984 "RANLIB=$${RANLIB}" \
985 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
987 then true; else exit 1; fi; \
991 # Here are the targets which correspond to the do-X targets.
993 .PHONY: info installcheck dvi install-info
994 .PHONY: clean distclean mostlyclean maintainer-clean realclean
995 .PHONY: local-clean local-distclean local-maintainer-clean
997 installcheck: do-installcheck
1000 # Make sure makeinfo is built before we do a `make info'.
1001 do-info: all-texinfo
1003 install-info: do-install-info dir.info
1004 s=`cd $(srcdir); pwd`; export s; \
1005 if [ -f dir.info ] ; then \
1006 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
1010 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
1013 -rm -f Makefile config.status config.cache
1014 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1015 rm -rf $(TARGET_SUBDIR); \
1018 local-maintainer-clean:
1019 @echo "This command is intended for maintainers to use;"
1020 @echo "it deletes files that may require special tools to rebuild."
1022 clean: do-clean local-clean
1023 mostlyclean: do-mostlyclean local-clean
1024 distclean: do-distclean local-clean local-distclean
1025 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1026 maintainer-clean: local-distclean
1027 realclean: maintainer-clean
1029 # This rule is used to clean specific modules.
1030 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1031 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1032 @dir=`echo $@ | sed -e 's/clean-//'`; \
1033 if [ -f ./$${dir}/Makefile ] ; then \
1034 r=`pwd`; export r; \
1035 s=`cd $(srcdir); pwd`; export s; \
1037 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1042 .PHONY: $(CLEAN_TARGET_MODULES)
1043 $(CLEAN_TARGET_MODULES):
1044 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1045 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1046 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1047 r=`pwd`; export r; \
1048 s=`cd $(srcdir); pwd`; export s; \
1050 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1055 clean-target: $(CLEAN_TARGET_MODULES)
1060 check: $(CHECK_MODULES) \
1061 $(CHECK_TARGET_MODULES) \
1062 $(CHECK_X11_MODULES) \
1065 # Installation targets.
1067 .PHONY: install uninstall source-vault binary-vault vault-install
1068 install: $(INSTALL_TARGET)
1071 @echo "the uninstall target is not supported in this tree"
1074 $(MAKE) -f ./release/Build-A-Release \
1075 host=$(host_alias) source-vault
1078 $(MAKE) -f ./release/Build-A-Release \
1079 host=$(host_alias) target=$(target_alias)
1082 @if [ -f ./release/vault-install ] ; then \
1083 ./release/vault-install $(host_alias) $(target_alias) ; \
1089 install.all: install-no-fixedincludes
1090 @if [ -f ./gcc/Makefile ] ; then \
1091 r=`pwd` ; export r ; \
1094 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1099 # inet-install is used because the I*Net wants DejaGNU installed but
1100 # not built. Similarly, gzip is built but not installed.
1102 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1104 # install-no-fixedincludes is used because Cygnus can not distribute
1105 # the fixed header files.
1106 .PHONY: install-no-fixedincludes
1107 install-no-fixedincludes: \
1109 $(INSTALL_MODULES) \
1110 $(INSTALL_TARGET_MODULES) \
1111 $(INSTALL_X11_MODULES) \
1112 gcc-no-fixedincludes
1114 # Install the gcc headers files, but not the fixed include files,
1115 # which Cygnus is not allowed to distribute. This rule is very
1116 # dependent on the workings of the gcc Makefile.in.
1117 .PHONY: gcc-no-fixedincludes
1118 gcc-no-fixedincludes:
1119 @if [ -f ./gcc/Makefile ]; then \
1120 rm -rf gcc/tmp-include; \
1121 mv gcc/include gcc/tmp-include 2>/dev/null; \
1122 mkdir gcc/include; \
1123 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1124 touch gcc/stmp-fixinc gcc/include/fixed; \
1125 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1126 r=`pwd`; export r; \
1127 s=`cd $(srcdir); pwd` ; export s; \
1130 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1131 rm -rf gcc/include; \
1132 mv gcc/tmp-include gcc/include 2>/dev/null; \
1135 # start-sanitize-ide
1136 # Install Foundry. Avoid installing a bunch of stuff we don't need.
1138 mods="$(INSTALL_MODULES)"; \
1139 x11_mods="$(INSTALL_X11_MODULES)"; \
1140 for d in install-tcl install-tk install-itcl install-tix install-ilu; do \
1141 mods="`echo $${mods} | sed -e "s/$$d//"`"; \
1142 x11_mods="`echo $${x11_mods} | sed -e "s/$$d//"`"; \
1144 $(MAKE) INSTALL_MODULES="$${mods}" INSTALL_X11_MODULES="$${x11_mods}" install
1145 for d in tcl tk itcl tix ilu; do \
1146 if [ -f $$d/Makefile ]; then \
1147 r=`pwd`; export r; \
1148 s=`cd $(srcdir); pwd`; export s; \
1150 (cd $$d; $(MAKE) $(FLAGS_TO_PASS) install-minimal); \
1157 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1158 # build a target all-X means to cd to X and make all.
1160 # all-gui, and all-libproc are handled specially because
1161 # they are still experimental, and if they fail to build, that
1162 # shouldn't stop "make all".
1163 .PHONY: $(ALL_MODULES) all-gui all-libproc
1164 $(ALL_MODULES) all-gui all-libproc:
1165 @dir=`echo $@ | sed -e 's/all-//'`; \
1166 if [ -f ./$${dir}/Makefile ] ; then \
1167 r=`pwd`; export r; \
1168 s=`cd $(srcdir); pwd`; export s; \
1170 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1175 # These rules are used to check the modules which use FLAGS_TO_PASS.
1176 # To build a target check-X means to cd to X and make check. Some
1177 # modules are only tested in a native toolchain.
1179 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1180 $(NATIVE_CHECK_MODULES):
1181 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1182 dir=`echo $@ | sed -e 's/check-//'`; \
1183 if [ -f ./$${dir}/Makefile ] ; then \
1184 r=`pwd`; export r; \
1185 s=`cd $(srcdir); pwd`; export s; \
1187 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1193 $(CROSS_CHECK_MODULES):
1194 @dir=`echo $@ | sed -e 's/check-//'`; \
1195 if [ -f ./$${dir}/Makefile ] ; then \
1196 r=`pwd`; export r; \
1197 s=`cd $(srcdir); pwd`; export s; \
1199 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1204 # This rule is used to install the modules which use FLAGS_TO_PASS.
1205 # To build a target install-X means to cd to X and make install.
1206 .PHONY: $(INSTALL_MODULES)
1207 $(INSTALL_MODULES): installdirs
1208 @dir=`echo $@ | sed -e 's/install-//'`; \
1209 if [ -f ./$${dir}/Makefile ] ; then \
1210 r=`pwd`; export r; \
1211 s=`cd $(srcdir); pwd`; export s; \
1213 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1218 # This rule is used to configure the modules which are built with the
1220 .PHONY: $(CONFIGURE_TARGET_MODULES)
1221 $(CONFIGURE_TARGET_MODULES):
1222 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1223 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1224 r=`pwd`; export r; \
1225 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1226 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1227 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1228 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1229 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1231 echo "Multilibs changed for $${dir}, reconfiguring"; \
1232 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1233 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1236 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1239 fi; exit 0 # break command into two pieces
1240 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1241 if [ ! -d $(TARGET_SUBDIR) ]; then \
1243 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1245 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1246 if [ -d $(srcdir)/$${dir} ]; then \
1247 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1248 r=`pwd`; export r; \
1249 s=`cd $(srcdir); pwd`; export s; \
1251 AR="$(AR_FOR_TARGET)"; export AR; \
1252 AS="$(AS_FOR_TARGET)"; export AS; \
1253 CC="$(CC_FOR_TARGET)"; export CC; \
1254 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1255 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1256 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1257 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1258 LD="$(LD_FOR_TARGET)"; export LD; \
1259 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1260 NM="$(NM_FOR_TARGET)"; export NM; \
1261 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1262 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1263 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1264 cd $(TARGET_SUBDIR)/$${dir}; \
1267 topdir=$(srcdir) ;; \
1269 case "$(TARGET_SUBDIR)" in \
1270 .) topdir="../$(srcdir)" ;; \
1271 *) topdir="../../$(srcdir)" ;; \
1274 if [ "$(srcdir)" = "." ] ; then \
1275 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1276 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1277 if [ -f Makefile ]; then \
1278 if $(MAKE) distclean; then \
1292 srcdiroption="--srcdir=."; \
1295 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1296 libsrcdir="$$s/$${dir}"; \
1298 if [ -f $${libsrcdir}/configure ] ; then \
1299 $(SHELL) $${libsrcdir}/configure \
1300 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1301 --with-target-subdir="$(TARGET_SUBDIR)"; \
1303 $(SHELL) $$s/configure \
1304 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1305 --with-target-subdir="$(TARGET_SUBDIR)"; \
1314 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1315 # To build a target all-X means to cd to X and make all.
1316 .PHONY: $(ALL_TARGET_MODULES)
1317 $(ALL_TARGET_MODULES):
1318 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1319 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1320 r=`pwd`; export r; \
1321 s=`cd $(srcdir); pwd`; export s; \
1323 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1328 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1329 # To build a target install-X means to cd to X and make install.
1330 .PHONY: $(CHECK_TARGET_MODULES)
1331 $(CHECK_TARGET_MODULES):
1332 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1333 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1334 r=`pwd`; export r; \
1335 s=`cd $(srcdir); pwd`; export s; \
1337 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1342 # This rule is used to install the modules which use
1343 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1345 .PHONY: $(INSTALL_TARGET_MODULES)
1346 $(INSTALL_TARGET_MODULES): installdirs
1347 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1348 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1349 r=`pwd`; export r; \
1350 s=`cd $(srcdir); pwd`; export s; \
1352 (cd $(TARGET_SUBDIR)/$${dir}; \
1353 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1358 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1359 # To build a target all-X means to cd to X and make all.
1360 .PHONY: $(ALL_X11_MODULES)
1362 @dir=`echo $@ | sed -e 's/all-//'`; \
1363 if [ -f ./$${dir}/Makefile ] ; then \
1364 r=`pwd`; export r; \
1365 s=`cd $(srcdir); pwd`; export s; \
1368 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1373 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1374 # To build a target check-X means to cd to X and make all.
1375 .PHONY: $(CHECK_X11_MODULES)
1376 $(CHECK_X11_MODULES):
1377 @dir=`echo $@ | sed -e 's/check-//'`; \
1378 if [ -f ./$${dir}/Makefile ] ; then \
1379 r=`pwd`; export r; \
1380 s=`cd $(srcdir); pwd`; export s; \
1383 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1388 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1389 # To build a target install-X means to cd to X and make install.
1390 .PHONY: $(INSTALL_X11_MODULES)
1391 $(INSTALL_X11_MODULES): installdirs
1392 @dir=`echo $@ | sed -e 's/install-//'`; \
1393 if [ -f ./$${dir}/Makefile ] ; then \
1394 r=`pwd`; export r; \
1395 s=`cd $(srcdir); pwd`; export s; \
1398 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1403 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
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) all); \
1415 .PHONY: all-bootstrap
1417 @if [ -f ./gcc/Makefile ] ; then \
1418 r=`pwd`; export r; \
1419 s=`cd $(srcdir); pwd`; export s; \
1421 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1428 @if [ -f ./gcc/Makefile ] ; then \
1429 r=`pwd`; export r; \
1430 s=`cd $(srcdir); pwd`; export s; \
1432 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1439 @if [ -f ./gcc/Makefile ] ; then \
1440 r=`pwd`; export r; \
1441 s=`cd $(srcdir); pwd`; export s; \
1443 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1449 # EXPERIMENTAL STUFF
1450 # This rule is used to install the modules which use FLAGS_TO_PASS.
1451 # To build a target install-X means to cd to X and make install.
1452 .PHONY: install-dosrel
1453 install-dosrel: installdirs info
1454 @dir=`echo $@ | sed -e 's/install-//'`; \
1455 if [ -f ./$${dir}/Makefile ] ; then \
1456 r=`pwd`; export r; \
1457 s=`cd $(srcdir); pwd`; export s; \
1459 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1464 install-dosrel-fake:
1467 # This is a list of inter-dependencies among modules.
1470 all-autoconf: all-m4 all-texinfo
1474 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc
1475 all-bison: all-texinfo
1478 configure-target-cygmon: $(ALL_GCC)
1479 all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1481 all-dejagnu: all-tcl all-expect all-tk
1482 all-diff: all-libiberty
1484 all-emacs19: all-bison all-byacc
1486 configure-target-examples: $(ALL_GCC)
1487 all-target-examples: configure-target-examples
1488 all-expect: all-tcl all-tk
1489 all-fileutils: all-libiberty
1492 all-flex: all-libiberty all-bison all-byacc
1493 all-gas: all-libiberty all-opcodes all-bfd
1497 all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1498 all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1499 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1500 # start-sanitize-ide
1501 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui all-libide all-libidetcl
1503 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1506 configure-target-gperf: $(ALL_GCC)
1507 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
1508 all-gprof: all-libiberty all-bfd all-opcodes
1509 all-grep: all-libiberty
1510 all-grez: all-libiberty all-bfd all-opcodes
1511 all-gui: all-gdb all-libproc all-target-librx
1513 all-gzip: all-libiberty
1514 all-hello: all-libiberty
1515 # start-sanitize-ide
1519 all-inet: all-tcl all-send-pr all-perl
1521 all-ispell: all-emacs19
1522 all-itcl: all-tcl all-tk
1523 # start-sanitize-ide
1524 all-jstools: all-tcl all-tk all-tix all-libgui all-libide all-libidetcl
1526 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex
1527 configure-target-libg++: $(ALL_GCC) configure-target-librx
1528 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++
1529 configure-target-libgloss: $(ALL_GCC)
1530 all-target-libgloss: configure-target-libgloss configure-target-newlib
1531 configure-target-libio: $(ALL_GCC)
1532 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1533 check-target-libio: all-target-libstdc++
1534 all-libgui: all-tcl all-tk all-itcl
1536 # start-sanitize-ide
1538 all-libidetcl: all-tcl all-tk all-itcl all-ilu all-libgui all-libide
1540 configure-target-librx: $(ALL_GCC) configure-target-newlib
1541 all-target-librx: configure-target-librx
1542 configure-target-libstdc++: $(ALL_GCC)
1543 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1544 all-m4: all-libiberty
1545 all-make: all-libiberty
1547 configure-target-newlib: $(ALL_GCC)
1548 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1549 all-opcodes: all-bfd all-libiberty
1550 all-patch: all-libiberty
1552 all-prms: all-libiberty
1555 all-recode: all-libiberty
1556 all-sed: all-libiberty
1557 all-send-pr: all-prms
1559 all-sim: all-libiberty all-bfd all-opcodes all-readline
1560 all-snavigator: all-tcl all-tk all-tix all-itcl all-db all-grep
1561 all-tar: all-libiberty
1563 all-tclX: all-tcl all-tk
1565 all-texinfo: all-libiberty
1567 all-tgas: all-libiberty all-bfd all-opcodes
1569 all-tix: all-tcl all-tk
1570 # start-sanitize-ide
1571 all-vmake: all-tcl all-tk all-itcl all-tix all-libgui all-libide all-libidetcl
1574 all-target-winsup: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup
1575 configure-target-winsup: configure-target-newlib
1576 all-uudecode: all-libiberty
1577 configure-target-libiberty: $(ALL_GCC)
1578 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1579 all-target: $(ALL_TARGET_MODULES)
1580 install-target: $(INSTALL_TARGET_MODULES)
1581 # start-sanitize-gdbtk
1582 install-gdbtk: install-tcl install-tk install-itcl install-tix install-libgui install-gdb
1584 ### other supporting targets
1590 installdirs: mkinstalldirs
1591 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1593 dir.info: do-install-info
1594 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1595 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1596 mv -f dir.info.new dir.info ; \
1601 @echo "Building a full distribution of this tree isn't done"
1602 @echo "via 'make dist'. Check out the etc/ subdirectory"
1606 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1607 # ability to use several tags files at once, so there is probably no need
1608 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1609 # (if we felt like it) have this Makefile write a piece of elisp which
1610 # the user could load to tell emacs19 where all the TAGS files we just
1614 # with the gnu make, this is done automatically.
1616 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
1617 $(SHELL) ./config.status
1620 # Support for building net releases
1622 # Files in devo used in any net release.
1623 # ChangeLog omitted because it may refer to files which are not in this
1624 # distribution (perhaps it would be better to include it anyway).
1625 DEVO_SUPPORT= README Makefile.in configure configure.in \
1626 config.guess config.sub config move-if-change \
1627 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1628 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1629 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1631 # Files in devo/etc used in any net release.
1632 # ChangeLog omitted because it may refer to files which are not in this
1633 # distribution (perhaps it would be better to include it anyway).
1634 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1635 make-stds.texi standards.info*
1637 # When you use `make setup-dirs' or `make taz' you should always redefine
1639 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1643 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1644 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1645 # Take out texinfo from a few places.
1646 sed -e '/^all\.normal: /s/\all-texinfo //' \
1647 -e '/^ install-texinfo /d' \
1649 mv -f tmp Makefile.in
1651 $(start-sanitize-Sanitize)
1652 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1653 $(end-sanitize-Sanitize)
1655 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1656 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1657 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1658 # Make links, and run "make diststuff" or "make info" when needed.
1659 rm -rf proto-toplev ; mkdir proto-toplev
1660 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1661 for d in $$dirs ; do \
1662 if [ -d $$d ]; then \
1663 if [ ! -f $$d/Makefile ] ; then true ; \
1664 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1665 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1666 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1667 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1669 if [ -d $$d/proto-$$d.dir ]; then \
1670 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1672 ln -s ../$$d proto-toplev/$$d ; \
1674 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1676 cd etc ; $(MAKE) info
1679 mkdir proto-toplev/etc
1680 (cd proto-toplev/etc; \
1681 for i in $(ETC_SUPPORT); do \
1682 ln -s ../../etc/$$i . ; \
1685 # Take out texinfo from configurable dirs
1686 rm proto-toplev/configure.in
1687 sed -e '/^host_tools=/s/texinfo //' \
1688 <configure.in >proto-toplev/configure.in
1690 mkdir proto-toplev/texinfo
1691 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1692 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1693 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1694 if test -r texinfo/util/tex3patch ; then \
1695 mkdir proto-toplev/texinfo/util && \
1696 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1698 chmod og=u `find . -print`
1699 if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1700 ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1702 ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1704 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver
1707 echo "==> Making $(TOOL)-$(VER).tar.gz"
1708 -rm -f $(TOOL)-$(VER)
1709 ln -s proto-toplev $(TOOL)-$(VER)
1710 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1711 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
1713 TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1714 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1717 GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms
1718 gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1719 $(MAKE) -f Makefile.in taz TOOL=gas \
1720 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1722 # The FSF "binutils" release includes gprof and ld.
1723 .PHONY: binutils.tar.gz
1724 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms
1725 binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1726 $(MAKE) -f Makefile.in taz TOOL=binutils \
1727 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1729 .PHONY: gas+binutils.tar.gz
1730 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1731 gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1732 $(MAKE) -f Makefile.in taz TOOL=gas \
1733 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1735 .PHONY: libg++.tar.gz
1736 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1737 libg++.tar.gz: $(DIST_SUPPORT) libg++
1738 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1739 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1741 GNATS_SUPPORT_DIRS=include libiberty send-pr
1742 gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1743 $(MAKE) -f Makefile.in taz TOOL=gnats \
1744 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1747 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
1748 GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1749 gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1750 $(MAKE) -f Makefile.in taz TOOL=gdb \
1751 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1753 .PHONY: newlib.tar.gz
1754 NEWLIB_SUPPORT_DIRS=libgloss
1755 # taz configures for the sun4 target which won't configure newlib.
1756 # We need newlib configured so that the .info files are made.
1757 # Unfortunately, it is not enough to just configure newlib separately:
1758 # taz will build the .info files but since SUBDIRS won't contain newlib,
1759 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1760 # used in building the .info files, eg: *.def, *.ref).
1761 # The problem isn't solvable however without a lot of extra work because
1762 # target libraries are built in subdir $(target_alias) which gets nuked during
1763 # the make distclean. For now punt on the issue of shipping newlib info files
1764 # with newlib net releases and wait for a day when some native target (sun4?)
1765 # supports newlib (if only minimally).
1766 newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1767 $(MAKE) -f Makefile.in taz TOOL=newlib \
1768 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1769 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1774 # start-sanitize-chill
1775 ## This is ugly, but I don't want GNU make to put these variables in
1776 ## the environment. Older makes will see this as a set of targets
1777 ## with no dependencies and no actions.
1778 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1779 # end-sanitize-chill
1781 # end of Makefile.in