2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
27 tooldir = $(exec_prefix)/$(target)
29 program_transform_name =
31 datadir = $(prefix)/share
32 mandir = $(prefix)/man
33 man1dir = $(mandir)/man1
34 man2dir = $(mandir)/man2
35 man3dir = $(mandir)/man3
36 man4dir = $(mandir)/man4
37 man5dir = $(mandir)/man5
38 man6dir = $(mandir)/man6
39 man7dir = $(mandir)/man7
40 man8dir = $(mandir)/man8
41 man9dir = $(mandir)/man9
42 infodir = $(prefix)/info
43 includedir = $(prefix)/include
48 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
50 INSTALL_PROGRAM_ARGS =
52 INSTALL = $(SHELL) $$s/install-sh -c
53 INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
54 INSTALL_SCRIPT = $(INSTALL)
55 INSTALL_DATA = $(INSTALL) -m 644
57 INSTALL_DOSREL = install-dosrel-fake
64 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
65 # here so that they can be overridden by Makefile fragments.
66 HOST_CC = $(CC_FOR_BUILD)
68 HOST_PREFIX_1 = loser-
70 # These flag values are normally overridden by the configure script.
75 CFLAGS_FOR_TARGET = $(CFLAGS)
77 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
81 # start-sanitize-chill
82 CHILLFLAGS = $(CFLAGS)
87 # Use -O2 to stress test the compiler.
88 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
89 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
90 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
101 # Not plain GZIP, since gzip looks there for extra command-line options.
104 # These values are substituted by configure.
108 BISON = `if [ -f $$r/bison/bison ] ; then \
109 echo $$r/bison/bison -L $$s/bison/ ; \
114 YACC = `if [ -f $$r/bison/bison ] ; then \
115 echo $$r/bison/bison -y -L $$s/bison/ ; \
116 elif [ -f $$r/byacc/byacc ] ; then \
117 echo $$r/byacc/byacc ; \
119 echo ${DEFAULT_YACC} ; \
122 LEX = `if [ -f $$r/flex/flex ] ; \
123 then echo $$r/flex/flex ; \
124 else echo ${DEFAULT_LEX} ; fi`
126 M4 = `if [ -f $$r/m4/m4 ] ; \
127 then echo $$r/m4/m4 ; \
130 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
131 then echo $$r/texinfo/makeinfo/makeinfo ; \
132 else echo makeinfo ; fi`
134 # This just becomes part of the MAKEINFO definition passed down to
135 # sub-makes. It lets flags be given on the command line while still
136 # using the makeinfo from the object tree.
139 EXPECT = `if [ -f $$r/expect/expect ] ; \
140 then echo $$r/expect/expect ; \
141 else echo expect ; fi`
143 RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
144 then echo $$s/dejagnu/runtest ; \
145 else echo runtest ; fi`
148 # compilers to use to create programs which must be run in the build
151 CXX_FOR_BUILD = $(CXX)
153 SUBDIRS = "this is set via configure, don't edit this"
156 # This is set by the configure script to the list of directories which
157 # should be built using the target tools.
158 TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
160 # Target libraries are put under this directory:
161 # Changed by configure to $(target_alias) if cross.
164 # This is set by the configure script to the arguments passed to configure.
167 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
171 # This is the name of the environment variable used for the path to
172 # the libraries. This may be changed by configure.in.
173 RPATH_ENVVAR = LD_LIBRARY_PATH
175 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
176 REALLY_SET_LIB_PATH = \
177 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
178 export $(RPATH_ENVVAR);
181 INSTALL_TARGET = installdirs \
183 $(INSTALL_TARGET_MODULES) \
184 $(INSTALL_X11_MODULES) \
190 if [ -f $$r/gcc/xgcc ] ; then \
191 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
192 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
193 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; \
195 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
198 echo $$r/gcc/xgcc -B$$r/gcc/; \
201 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
204 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
208 # If CC_FOR_TARGET is not overriden on the command line, then this
209 # variable is passed down to the gcc Makefile, where it is used to
210 # build libgcc2.a. We define it here so that it can itself be
211 # overridden on the command line.
212 GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
214 # start-sanitize-chill
215 CHILL_FOR_TARGET = ` \
216 if [ -f $$r/gcc/xgcc ] ; then \
217 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
219 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
222 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
229 if [ -f $$r/gcc/xgcc ] ; then \
230 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
231 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
232 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; \
234 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
237 echo $$r/gcc/xgcc -B$$r/gcc/; \
240 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
243 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
248 if [ -f $$r/gas/as-new ] ; then \
249 echo $$r/gas/as-new ; \
251 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
254 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
259 if [ -f $$r/ld/ld-new ] ; then \
260 echo $$r/ld/ld-new ; \
262 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
265 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
269 DLLTOOL_FOR_TARGET = ` \
270 if [ -f $$r/binutils/dlltool ] ; then \
271 echo $$r/binutils/dlltool ; \
273 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
276 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
280 WINDRES_FOR_TARGET = ` \
281 if [ -f $$r/binutils/windres ] ; then \
282 echo $$r/binutils/windres ; \
284 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
287 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
292 if [ -f $$r/binutils/ar ] ; then \
293 echo $$r/binutils/ar ; \
295 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
298 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
302 RANLIB_FOR_TARGET = ` \
303 if [ -f $$r/binutils/ranlib ] ; then \
304 echo $$r/binutils/ranlib ; \
306 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
309 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
314 if [ -f $$r/binutils/nm-new ] ; then \
315 echo $$r/binutils/nm-new ; \
317 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
320 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
324 #### host and target specific makefile fragments come in here.
327 # Flags to pass down to all sub-makes.
328 # Please keep these in alphabetical order.
329 BASE_FLAGS_TO_PASS = \
330 "AR_FLAGS=$(AR_FLAGS)" \
331 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
332 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
334 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
335 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
337 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
338 $(start-sanitize-chill)\
339 "CHILLFLAGS=$(CHILLFLAGS)" \
340 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
341 "CHILL_LIB=$(CHILL_LIB)" \
342 $(end-sanitize-chill)\
343 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
344 "CXXFLAGS=$(CXXFLAGS)" \
345 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
346 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
347 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
348 "INSTALL=$(INSTALL)" \
349 "INSTALL_DATA=$(INSTALL_DATA)" \
350 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
351 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
352 "LDFLAGS=$(LDFLAGS)" \
354 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
355 "LIBCFLAGS=$(LIBCFLAGS)" \
356 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
357 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
358 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
361 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
362 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
363 "PICFLAG=$(PICFLAG)" \
364 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
365 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
368 "RUNTEST=$(RUNTEST)" \
369 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
370 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
372 "exec_prefix=$(exec_prefix)" \
376 # Flags to pass down to most sub-makes, in which we're building with
377 # the host environment.
378 # If any variables are added here, they must be added to do-*, below.
384 'DLLTOOL=$(DLLTOOL)' \
390 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
392 # Flags that are concerned with the location of the X11 include files
395 # NOTE: until the top-level is getting the values via autoconf, it only
396 # causes problems to have this top-level Makefile overriding the autoconf-set
397 # values in child directories. Only variables that don't conflict with
398 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
400 X11_FLAGS_TO_PASS = \
401 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
402 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
404 # Flags to pass down to makes which are built with the target environment.
405 # The double $ decreases the length of the command line; the variables
406 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
407 # If any variables are added here, they must be added to do-*, below.
408 EXTRA_TARGET_FLAGS = \
409 'AR=$$(AR_FOR_TARGET)' \
410 'AS=$$(AS_FOR_TARGET)' \
411 'CC=$$(CC_FOR_TARGET)' \
412 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
413 'CXX=$$(CXX_FOR_TARGET)' \
414 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
415 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
416 'LD=$$(LD_FOR_TARGET)' \
417 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
418 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
419 'NM=$$(NM_FOR_TARGET)' \
420 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
421 'RANLIB=$$(RANLIB_FOR_TARGET)' \
422 'WINDRES=$$(WINDRES_FOR_TARGET)'
424 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
426 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
427 # unfortunately needs the native compiler and the target ar and
429 # If any variables are added here, they must be added to do-*, below.
430 # The HOST_* variables are a special case, which are used for the gcc
431 # cross-building scheme.
433 'AR=$$(AR_FOR_TARGET)' \
437 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
438 'HOST_CC=$(CC_FOR_BUILD)' \
439 'HOST_PREFIX=$(HOST_PREFIX)' \
440 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
442 'RANLIB=$$(RANLIB_FOR_TARGET)' \
443 'WINDRES=$$(WINDRES_FOR_TARGET)' \
444 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
445 "`if test x'$(LANGUAGES)' != x; then echo 'LANGUAGES=$(LANGUAGES)'; else echo 'XFOO=bar'; fi`" \
446 "`if test x'$(STMP_FIXPROTO)' != x; then echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)'; else echo 'XFOO=bar'; fi`" \
447 "`if test x'$(LIMITS_H_TEST)' != x; then echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)'; else echo 'XFOO=bar'; fi`" \
448 "`if test x'$(LIBGCC1_TEST)' != x; then echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)'; else echo 'XFOO=bar'; fi`" \
449 "`if test x'$(LIBGCC2_CFLAGS)' != x; then echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
450 "`if test x'$(LIBGCC2_DEBUG_CFLAGS)' != x; then echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
451 "`if test x'$(LIBGCC2_INCLUDES)' != x; then echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)'; else echo 'XFOO=bar'; fi`" \
452 "`if test x'$(ENQUIRE)' != x; then echo 'ENQUIRE=$(ENQUIRE)'; else echo 'XFOO=bar'; fi`" \
453 "`if test x'$(BOOT_CFLAGS)' != x; then echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)'; else echo 'XFOO=bar'; fi`"
455 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
457 # This is a list of the targets for all of the modules which are compiled
458 # using $(FLAGS_TO_PASS).
486 $(start-sanitize-ide) \
488 $(end-sanitize-ide) \
493 $(start-sanitize-ide) \
495 $(end-sanitize-ide) \
498 $(start-sanitize-ide) \
500 $(end-sanitize-ide) \
524 $(start-sanitize-ide) \
526 $(end-sanitize-ide) \
529 # This is a list of the check targets for all of the modules which are
530 # compiled using $(FLAGS_TO_PASS).
532 # The list is in two parts. The first lists those tools which
533 # are tested as part of the host's native tool-chain, and not
534 # tested in a cross configuration.
535 NATIVE_CHECK_MODULES = \
540 CROSS_CHECK_MODULES = \
562 $(start-sanitize-ide) \
564 $(end-sanitize-ide) \
569 $(start-sanitize-ide) \
571 $(end-sanitize-ide) \
574 $(start-sanitize-ide) \
576 $(end-sanitize-ide) \
599 $(start-sanitize-ide) \
601 $(end-sanitize-ide) \
604 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
606 # This is a list of the install targets for all of the modules which are
607 # compiled using $(FLAGS_TO_PASS).
608 # We put install-opcodes before install-binutils because the installed
609 # binutils might be on PATH, and they might need the shared opcodes
639 $(start-sanitize-ide) \
641 $(end-sanitize-ide) \
646 $(start-sanitize-ide) \
648 $(end-sanitize-ide) \
651 $(start-sanitize-ide) \
653 $(end-sanitize-ide) \
675 $(start-sanitize-ide) \
677 $(end-sanitize-ide) \
680 # This is a list of the targets for all of the modules which are compiled
681 # using $(X11_FLAGS_TO_PASS).
693 # This is a list of the check targets for all of the modules which are
694 # compiled using $(X11_FLAGS_TO_PASS).
695 CHECK_X11_MODULES = \
705 # This is a list of the install targets for all the modules which are
706 # compiled using $(X11_FLAGS_TO_PASS).
707 INSTALL_X11_MODULES = \
718 # This is a list of the targets for all of the modules which are compiled
719 # using $(TARGET_FLAGS_TO_PASS).
720 ALL_TARGET_MODULES = \
722 all-target-libstdc++ \
727 all-target-libgloss \
728 all-target-libiberty \
732 # This is a list of the configure targets for all of the modules which
733 # are compiled using the target tools.
734 CONFIGURE_TARGET_MODULES = \
735 configure-target-libio \
736 configure-target-libstdc++ \
737 configure-target-librx \
738 configure-target-libg++ \
739 configure-target-newlib \
740 configure-target-winsup \
741 configure-target-libgloss \
742 configure-target-libiberty \
743 configure-target-gperf \
744 configure-target-examples
746 # This is a list of the check targets for all of the modules which are
747 # compiled using $(TARGET_FLAGS_TO_PASS).
748 CHECK_TARGET_MODULES = \
750 check-target-libstdc++ \
751 check-target-libg++ \
752 check-target-newlib \
753 check-target-winsup \
754 check-target-libiberty \
757 # This is a list of the install targets for all of the modules which are
758 # compiled using $(TARGET_FLAGS_TO_PASS).
759 INSTALL_TARGET_MODULES = \
760 install-target-libio \
761 install-target-libstdc++ \
762 install-target-libg++ \
763 install-target-newlib \
764 install-target-winsup \
765 install-target-libgloss \
766 install-target-libiberty \
769 # This is a list of the targets for which we can do a clean-{target}.
797 $(start-sanitize-ide) \
799 $(end-sanitize-ide) \
804 $(start-sanitize-ide) \
806 $(end-sanitize-ide) \
809 $(start-sanitize-ide) \
811 $(end-sanitize-ide) \
835 $(start-sanitize-ide) \
837 $(end-sanitize-ide) \
840 # All of the target modules that can be cleaned
841 CLEAN_TARGET_MODULES = \
843 clean-target-libstdc++ \
845 clean-target-libg++ \
846 clean-target-newlib \
847 clean-target-winsup \
848 clean-target-libgloss \
849 clean-target-libiberty \
851 clean-target-examples
853 # All of the x11 modules that can be cleaned
854 CLEAN_X11_MODULES = \
865 # The first rule in the file had better be this one. Don't put any above it.
869 # The target built for a native build.
874 $(ALL_TARGET_MODULES) \
877 # Do a target for all the subdirectories. A ``make do-X'' will do a
878 # ``make X'' in all subdirectories (because, in general, there is a
879 # dependency (below) of X upon do-X, a ``make X'' will also do this,
880 # but it may do additional work as well).
881 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
882 # because it is so large that it can easily overflow the command line
883 # length limit on some systems.
892 do-maintainer-clean \
896 @target=`echo $@ | sed -e 's/^do-//'`; \
898 s=`cd $(srcdir); pwd`; export s; \
900 for i in $(SUBDIRS) -dummy-; do \
901 if [ -f ./$$i/Makefile ]; then \
904 for flag in $(EXTRA_GCC_FLAGS); do \
905 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
909 for flag in $(EXTRA_HOST_FLAGS); do \
910 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
914 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
916 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
917 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
918 "RANLIB=$${RANLIB}" \
919 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
921 then true; else exit 1; fi; \
924 @target=`echo $@ | sed -e 's/^do-//'`; \
926 s=`cd $(srcdir); pwd`; export s; \
928 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
929 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
930 for flag in $(EXTRA_TARGET_FLAGS); do \
931 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
933 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
934 if (cd $(TARGET_SUBDIR)/$$i; \
935 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
936 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
937 "RANLIB=$${RANLIB}" \
938 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
940 then true; else exit 1; fi; \
944 # Here are the targets which correspond to the do-X targets.
946 .PHONY: info installcheck dvi install-info
947 .PHONY: clean distclean mostlyclean maintainer-clean realclean
948 .PHONY: local-clean local-distclean local-maintainer-clean
950 installcheck: do-installcheck
953 # Make sure makeinfo is built before we do a `make info'.
956 install-info: do-install-info dir.info
957 s=`cd $(srcdir); pwd`; export s; \
958 if [ -f dir.info ] ; then \
959 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
963 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
966 -rm -f Makefile config.status config.cache
967 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
968 rm -rf $(TARGET_SUBDIR); \
971 local-maintainer-clean:
972 @echo "This command is intended for maintainers to use;"
973 @echo "it deletes files that may require special tools to rebuild."
975 clean: do-clean local-clean
976 mostlyclean: do-mostlyclean local-clean
977 distclean: do-distclean local-clean local-distclean
978 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
979 maintainer-clean: local-distclean
980 realclean: maintainer-clean
982 # This rule is used to clean specific modules.
983 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
984 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
985 @dir=`echo $@ | sed -e 's/clean-//'`; \
986 if [ -f ./$${dir}/Makefile ] ; then \
988 s=`cd $(srcdir); pwd`; export s; \
990 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
995 .PHONY: $(CLEAN_TARGET_MODULES)
996 $(CLEAN_TARGET_MODULES):
997 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
998 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
999 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1000 r=`pwd`; export r; \
1001 s=`cd $(srcdir); pwd`; export s; \
1003 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1008 clean-target: $(CLEAN_TARGET_MODULES)
1013 check: $(CHECK_MODULES) \
1014 $(CHECK_TARGET_MODULES) \
1015 $(CHECK_X11_MODULES) \
1018 # Installation targets.
1020 .PHONY: install uninstall source-vault binary-vault vault-install
1021 install: $(INSTALL_TARGET)
1024 @echo "the uninstall target is not supported in this tree"
1027 $(MAKE) -f ./release/Build-A-Release \
1028 host=$(host_alias) source-vault
1031 $(MAKE) -f ./release/Build-A-Release \
1032 host=$(host_alias) target=$(target_alias)
1035 @if [ -f ./release/vault-install ] ; then \
1036 ./release/vault-install $(host_alias) $(target_alias) ; \
1042 install.all: install-no-fixedincludes
1043 @if [ -f ./gcc/Makefile ] ; then \
1044 r=`pwd` ; export r ; \
1047 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1052 # inet-install is used because the I*Net wants DejaGNU installed but
1053 # not built. Similarly, gzip is built but not installed.
1055 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1057 # install-no-fixedincludes is used because Cygnus can not distribute
1058 # the fixed header files.
1059 .PHONY: install-no-fixedincludes
1060 install-no-fixedincludes: \
1062 $(INSTALL_MODULES) \
1063 $(INSTALL_TARGET_MODULES) \
1064 $(INSTALL_X11_MODULES) \
1065 gcc-no-fixedincludes
1067 # Install the gcc headers files, but not the fixed include files,
1068 # which Cygnus is not allowed to distribute. This rule is very
1069 # dependent on the workings of the gcc Makefile.in.
1070 .PHONY: gcc-no-fixedincludes
1071 gcc-no-fixedincludes:
1072 @if [ -f ./gcc/Makefile ]; then \
1073 rm -rf gcc/tmp-include; \
1074 mv gcc/include gcc/tmp-include 2>/dev/null; \
1075 mkdir gcc/include; \
1076 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1077 touch gcc/stmp-fixinc gcc/include/fixed; \
1078 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1079 r=`pwd`; export r; \
1080 s=`cd $(srcdir); pwd` ; export s; \
1083 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1084 rm -rf gcc/include; \
1085 mv gcc/tmp-include gcc/include 2>/dev/null; \
1088 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1089 # build a target all-X means to cd to X and make all.
1091 # all-gui, and all-libproc are handled specially because
1092 # they are still experimental, and if they fail to build, that
1093 # shouldn't stop "make all".
1094 .PHONY: $(ALL_MODULES) all-gui all-libproc
1095 $(ALL_MODULES) all-gui all-libproc:
1096 @dir=`echo $@ | sed -e 's/all-//'`; \
1097 if [ -f ./$${dir}/Makefile ] ; then \
1098 r=`pwd`; export r; \
1099 s=`cd $(srcdir); pwd`; export s; \
1101 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1106 # These rules are used to check the modules which use FLAGS_TO_PASS.
1107 # To build a target check-X means to cd to X and make check. Some
1108 # modules are only tested in a native toolchain.
1110 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1111 $(NATIVE_CHECK_MODULES):
1112 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1113 dir=`echo $@ | sed -e 's/check-//'`; \
1114 if [ -f ./$${dir}/Makefile ] ; then \
1115 r=`pwd`; export r; \
1116 s=`cd $(srcdir); pwd`; export s; \
1118 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1124 $(CROSS_CHECK_MODULES):
1125 @dir=`echo $@ | sed -e 's/check-//'`; \
1126 if [ -f ./$${dir}/Makefile ] ; then \
1127 r=`pwd`; export r; \
1128 s=`cd $(srcdir); pwd`; export s; \
1130 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1135 # This rule is used to install the modules which use FLAGS_TO_PASS.
1136 # To build a target install-X means to cd to X and make install.
1137 .PHONY: $(INSTALL_MODULES)
1138 $(INSTALL_MODULES): installdirs
1139 @dir=`echo $@ | sed -e 's/install-//'`; \
1140 if [ -f ./$${dir}/Makefile ] ; then \
1141 r=`pwd`; export r; \
1142 s=`cd $(srcdir); pwd`; export s; \
1144 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1149 # This rule is used to configure the modules which are built with the
1151 .PHONY: $(CONFIGURE_TARGET_MODULES)
1152 $(CONFIGURE_TARGET_MODULES):
1153 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1154 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1155 r=`pwd`; export r; \
1156 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1157 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1158 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1159 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1160 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1162 echo "Multilibs changed for $${dir}, reconfiguring"; \
1163 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1164 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1167 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1170 fi; exit 0 # break command into two pieces
1171 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1172 if [ ! -d $(TARGET_SUBDIR) ]; then \
1174 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1176 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1177 if [ -d $(srcdir)/$${dir} ]; then \
1178 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1179 r=`pwd`; export r; \
1180 s=`cd $(srcdir); pwd`; export s; \
1182 AR="$(AR_FOR_TARGET)"; export AR; \
1183 AS="$(AS_FOR_TARGET)"; export AS; \
1184 CC="$(CC_FOR_TARGET)"; export CC; \
1185 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1186 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1187 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1188 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1189 LD="$(LD_FOR_TARGET)"; export LD; \
1190 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1191 NM="$(NM_FOR_TARGET)"; export NM; \
1192 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1193 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1194 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1195 cd $(TARGET_SUBDIR)/$${dir}; \
1198 topdir=$(srcdir) ;; \
1200 case "$(TARGET_SUBDIR)" in \
1201 .) topdir="../$(srcdir)" ;; \
1202 *) topdir="../../$(srcdir)" ;; \
1205 if [ "$(srcdir)" = "." ] ; then \
1206 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1207 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1208 if [ -f Makefile ]; then \
1209 if $(MAKE) distclean; then \
1223 srcdiroption="--srcdir=."; \
1226 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1227 libsrcdir="$$s/$${dir}"; \
1229 if [ -f $${libsrcdir}/configure ] ; then \
1230 $(SHELL) $${libsrcdir}/configure \
1231 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1232 --with-target-subdir="$(TARGET_SUBDIR)"; \
1234 $(SHELL) $$s/configure \
1235 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1236 --with-target-subdir="$(TARGET_SUBDIR)"; \
1245 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1246 # To build a target all-X means to cd to X and make all.
1247 .PHONY: $(ALL_TARGET_MODULES)
1248 $(ALL_TARGET_MODULES):
1249 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1250 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1251 r=`pwd`; export r; \
1252 s=`cd $(srcdir); pwd`; export s; \
1254 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1259 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1260 # To build a target install-X means to cd to X and make install.
1261 .PHONY: $(CHECK_TARGET_MODULES)
1262 $(CHECK_TARGET_MODULES):
1263 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1264 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1265 r=`pwd`; export r; \
1266 s=`cd $(srcdir); pwd`; export s; \
1268 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1273 # This rule is used to install the modules which use
1274 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1276 .PHONY: $(INSTALL_TARGET_MODULES)
1277 $(INSTALL_TARGET_MODULES): installdirs
1278 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1279 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1280 r=`pwd`; export r; \
1281 s=`cd $(srcdir); pwd`; export s; \
1283 (cd $(TARGET_SUBDIR)/$${dir}; \
1284 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1289 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1290 # To build a target all-X means to cd to X and make all.
1291 .PHONY: $(ALL_X11_MODULES)
1293 @dir=`echo $@ | sed -e 's/all-//'`; \
1294 if [ -f ./$${dir}/Makefile ] ; then \
1295 r=`pwd`; export r; \
1296 s=`cd $(srcdir); pwd`; export s; \
1299 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1304 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1305 # To build a target check-X means to cd to X and make all.
1306 .PHONY: $(CHECK_X11_MODULES)
1307 $(CHECK_X11_MODULES):
1308 @dir=`echo $@ | sed -e 's/check-//'`; \
1309 if [ -f ./$${dir}/Makefile ] ; then \
1310 r=`pwd`; export r; \
1311 s=`cd $(srcdir); pwd`; export s; \
1314 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1319 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1320 # To build a target install-X means to cd to X and make install.
1321 .PHONY: $(INSTALL_X11_MODULES)
1322 $(INSTALL_X11_MODULES): installdirs
1323 @dir=`echo $@ | sed -e 's/install-//'`; \
1324 if [ -f ./$${dir}/Makefile ] ; then \
1325 r=`pwd`; export r; \
1326 s=`cd $(srcdir); pwd`; export s; \
1329 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1334 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1337 @if [ -f ./gcc/Makefile ] ; then \
1338 r=`pwd`; export r; \
1339 s=`cd $(srcdir); pwd`; export s; \
1341 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1346 .PHONY: all-bootstrap
1348 @if [ -f ./gcc/Makefile ] ; then \
1349 r=`pwd`; export r; \
1350 s=`cd $(srcdir); pwd`; export s; \
1352 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1359 @if [ -f ./gcc/Makefile ] ; then \
1360 r=`pwd`; export r; \
1361 s=`cd $(srcdir); pwd`; export s; \
1363 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1370 @if [ -f ./gcc/Makefile ] ; then \
1371 r=`pwd`; export r; \
1372 s=`cd $(srcdir); pwd`; export s; \
1374 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1380 # EXPERIMENTAL STUFF
1381 # This rule is used to install the modules which use FLAGS_TO_PASS.
1382 # To build a target install-X means to cd to X and make install.
1383 .PHONY: install-dosrel
1384 install-dosrel: installdirs info
1385 @dir=`echo $@ | sed -e 's/install-//'`; \
1386 if [ -f ./$${dir}/Makefile ] ; then \
1387 r=`pwd`; export r; \
1388 s=`cd $(srcdir); pwd`; export s; \
1390 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1395 install-dosrel-fake:
1398 # This is a list of inter-dependencies among modules.
1400 all-autoconf: all-m4 all-texinfo
1404 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc
1405 all-bison: all-texinfo
1409 all-dejagnu: all-tcl all-expect all-tk
1410 all-diff: all-libiberty
1412 all-emacs19: all-bison all-byacc
1414 configure-target-examples: $(ALL_GCC)
1415 all-target-examples: configure-target-examples
1416 all-expect: all-tcl all-tk
1417 all-fileutils: all-libiberty
1420 all-flex: all-libiberty all-bison all-byacc
1421 all-gas: all-libiberty all-opcodes all-bfd
1425 all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1426 all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1427 GDB_TK = all-tk all-tcl all-itcl all-tix
1428 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1430 configure-target-gperf: $(ALL_GCC)
1431 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libg++
1432 all-gprof: all-libiberty all-bfd all-opcodes
1433 all-grep: all-libiberty
1434 all-grez: all-libiberty all-bfd all-opcodes
1435 all-gui: all-gdb all-libproc all-target-librx
1437 all-gzip: all-libiberty
1438 all-hello: all-libiberty
1439 # start-sanitize-ide
1443 all-inet: all-tcl all-send-pr all-perl
1444 all-ispell: all-emacs19
1445 all-itcl: all-tcl all-tk
1446 # start-sanitize-ide
1447 all-jstools: all-tcl all-tk all-libide
1449 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex
1450 configure-target-libg++: $(ALL_GCC) configure-target-librx
1451 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++
1452 configure-target-libgloss: $(ALL_GCC)
1453 all-target-libgloss: configure-target-libgloss configure-target-newlib
1454 configure-target-libio: $(ALL_GCC)
1455 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1457 # start-sanitize-ide
1458 all-libide: all-tcl all-tk all-itcl all-ilu
1460 configure-target-librx: $(ALL_GCC) configure-target-newlib
1461 all-target-librx: configure-target-librx
1462 configure-target-libstdc++: $(ALL_GCC)
1463 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1464 all-m4: all-libiberty
1465 all-make: all-libiberty
1467 configure-target-newlib: $(ALL_GCC)
1468 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1469 all-opcodes: all-bfd all-libiberty
1470 all-patch: all-libiberty
1472 all-prms: all-libiberty
1475 all-recode: all-libiberty
1476 all-sed: all-libiberty
1477 all-send-pr: all-prms
1479 all-sim: all-libiberty all-bfd all-opcodes all-readline
1480 all-sn: all-tcl all-tk all-itcl all-db all-grep
1481 all-tar: all-libiberty
1483 all-tclX: all-tcl all-tk
1485 all-texinfo: all-libiberty
1487 all-tgas: all-libiberty all-bfd all-opcodes
1489 all-tix: all-tcl all-tk
1490 # start-sanitize-ide
1491 all-vmake: all-tcl all-tk all-itcl all-libide all-tix
1494 all-target-winsup: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1495 configure-target-winsup: configure-target-newlib
1496 all-uudecode: all-libiberty
1497 configure-target-libiberty: $(ALL_GCC)
1498 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1499 all-target: $(ALL_TARGET_MODULES)
1500 install-target: $(INSTALL_TARGET_MODULES)
1502 ### other supporting targets
1508 installdirs: mkinstalldirs
1509 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1511 dir.info: do-install-info
1512 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1513 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1514 mv -f dir.info.new dir.info ; \
1519 @echo "Building a full distribution of this tree isn't done"
1520 @echo "via 'make dist'. Check out the etc/ subdirectory"
1524 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1525 # ability to use several tags files at once, so there is probably no need
1526 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1527 # (if we felt like it) have this Makefile write a piece of elisp which
1528 # the user could load to tell emacs19 where all the TAGS files we just
1532 # with the gnu make, this is done automatically.
1534 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
1535 $(SHELL) ./config.status
1538 # Support for building net releases
1540 # Files in devo used in any net release.
1541 # ChangeLog omitted because it may refer to files which are not in this
1542 # distribution (perhaps it would be better to include it anyway).
1543 DEVO_SUPPORT= README Makefile.in configure configure.in \
1544 config.guess config.sub config move-if-change \
1545 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1546 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1547 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1549 # Files in devo/etc used in any net release.
1550 # ChangeLog omitted because it may refer to files which are not in this
1551 # distribution (perhaps it would be better to include it anyway).
1552 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1553 make-stds.texi standards.info*
1555 # When you use `make setup-dirs' or `make taz' you should always redefine
1557 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1561 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1562 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1563 # Take out texinfo from a few places; make simple BISON=bison line.
1564 sed -e '/^all\.normal: /s/\all-texinfo //' \
1565 -e '/^ install-texinfo /d' \
1567 mv -f tmp Makefile.in
1569 $(start-sanitize-Sanitize)
1570 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1571 $(end-sanitize-Sanitize)
1573 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1574 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1575 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1576 # Make links, and run "make diststuff" or "make info" when needed.
1577 rm -rf proto-toplev ; mkdir proto-toplev
1578 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1579 for d in $$dirs ; do \
1580 if [ -d $$d ]; then \
1581 if [ ! -f $$d/Makefile ] ; then true ; \
1582 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1583 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1584 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1585 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1587 if [ -d $$d/proto-$$d.dir ]; then \
1588 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1590 ln -s ../$$d proto-toplev/$$d ; \
1592 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1594 cd etc ; $(MAKE) info
1597 mkdir proto-toplev/etc
1598 (cd proto-toplev/etc; \
1599 for i in $(ETC_SUPPORT); do \
1600 ln -s ../../etc/$$i . ; \
1603 # Take out texinfo from configurable dirs
1604 rm proto-toplev/configure.in
1605 sed -e '/^host_tools=/s/texinfo //' \
1606 <configure.in >proto-toplev/configure.in
1608 mkdir proto-toplev/texinfo
1609 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1610 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1611 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1612 if test -r texinfo/util/tex3patch ; then \
1613 mkdir proto-toplev/texinfo/util && \
1614 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1616 chmod og=u `find . -print`
1617 if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1618 ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1620 ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1622 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver
1625 echo "==> Making $(TOOL)-$(VER).tar.gz"
1626 -rm -f $(TOOL)-$(VER)
1627 ln -s proto-toplev $(TOOL)-$(VER)
1628 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1629 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
1631 TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1632 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1635 GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms
1636 gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1637 $(MAKE) -f Makefile.in taz TOOL=gas \
1638 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1640 # The FSF "binutils" release includes gprof and ld.
1641 .PHONY: binutils.tar.gz
1642 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms
1643 binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1644 $(MAKE) -f Makefile.in taz TOOL=binutils \
1645 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1647 .PHONY: gas+binutils.tar.gz
1648 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1649 gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1650 $(MAKE) -f Makefile.in taz TOOL=gas \
1651 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1653 .PHONY: libg++.tar.gz
1654 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1655 libg++.tar.gz: $(DIST_SUPPORT) libg++
1656 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1657 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1659 GNATS_SUPPORT_DIRS=include libiberty send-pr
1660 gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1661 $(MAKE) -f Makefile.in taz TOOL=gnats \
1662 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1665 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
1666 GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1667 gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1668 $(MAKE) -f Makefile.in taz TOOL=gdb \
1669 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1671 .PHONY: newlib.tar.gz
1672 NEWLIB_SUPPORT_DIRS=libgloss
1673 # taz configures for the sun4 target which won't configure newlib.
1674 # We need newlib configured so that the .info files are made.
1675 # Unfortunately, it is not enough to just configure newlib separately:
1676 # taz will build the .info files but since SUBDIRS won't contain newlib,
1677 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1678 # used in building the .info files, eg: *.def, *.ref).
1679 # The problem isn't solvable however without a lot of extra work because
1680 # target libraries are built in subdir $(target_alias) which gets nuked during
1681 # the make distclean. For now punt on the issue of shipping newlib info files
1682 # with newlib net releases and wait for a day when some native target (sun4?)
1683 # supports newlib (if only minimally).
1684 newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1685 $(MAKE) -f Makefile.in taz TOOL=newlib \
1686 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1687 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1692 # start-sanitize-chill
1693 ## This is ugly, but I don't want GNU make to put these variables in
1694 ## the environment. Older makes will see this as a set of targets
1695 ## with no dependencies and no actions.
1696 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1697 # end-sanitize-chill
1699 # end of Makefile.in