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: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
109 BISON
= `if [ -f $$r/byacc/byacc ] ; \
110 then echo $$r/byacc/byacc ; \
111 else echo ${DEFAULT_YACC} ; \
114 LEX
= `if [ -f $$r/flex/flex ] ; \
115 then echo $$r/flex/flex ; \
116 else echo ${DEFAULT_LEX} ; fi`
118 M4
= `if [ -f $$r/m4/m4 ] ; \
119 then echo $$r/m4/m4 ; \
122 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
123 then echo $$r/texinfo/makeinfo/makeinfo ; \
124 else echo makeinfo ; fi`
126 # This just becomes part of the MAKEINFO definition passed down to
127 # sub-makes. It lets flags be given on the command line while still
128 # using the makeinfo from the object tree.
131 EXPECT
= `if [ -f $$r/expect/expect ] ; \
132 then echo $$r/expect/expect ; \
133 else echo expect ; fi`
135 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
136 then echo $$s/dejagnu/runtest ; \
137 else echo runtest ; fi`
140 # compilers to use to create programs which must be run in the build
143 CXX_FOR_BUILD
= $(CXX
)
145 SUBDIRS
= "this is set via configure, don't edit this"
148 # This is set by the configure script to the list of directories which
149 # should be built using the target tools.
150 TARGET_CONFIGDIRS
= libiberty libgloss newlib libio librx libstdc
++ libg
++ winsup
152 # Target libraries are put under this directory:
153 # Changed by configure to $(target_alias) if cross.
156 # This is set by the configure script to the arguments passed to configure.
159 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
163 # This is the name of the environment variable used for the path to
164 # the libraries. This may be changed by configure.in.
165 RPATH_ENVVAR
= LD_LIBRARY_PATH
167 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
168 REALLY_SET_LIB_PATH
= \
169 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
170 export $(RPATH_ENVVAR
);
173 INSTALL_TARGET
= installdirs \
175 $(INSTALL_TARGET_MODULES
) \
176 $(INSTALL_X11_MODULES
) \
182 if [ -f $$r/gcc/xgcc ] ; then \
183 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
184 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
185 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; \
187 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
190 echo $$r/gcc/xgcc -B$$r/gcc/; \
193 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
196 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
200 # If CC_FOR_TARGET is not overriden on the command line, then this
201 # variable is passed down to the gcc Makefile, where it is used to
202 # build libgcc2.a. We define it here so that it can itself be
203 # overridden on the command line.
204 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/
206 # start-sanitize-chill
207 CHILL_FOR_TARGET
= ` \
208 if [ -f $$r/gcc/xgcc ] ; then \
209 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
211 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
214 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
221 if [ -f $$r/gcc/xgcc ] ; then \
222 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
223 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
224 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; \
226 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
229 echo $$r/gcc/xgcc -B$$r/gcc/; \
232 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
235 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
240 if [ -f $$r/gas/as-new ] ; then \
241 echo $$r/gas/as-new ; \
243 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
246 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
251 if [ -f $$r/ld/ld.new ] ; then \
252 echo $$r/ld/ld.new ; \
254 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
257 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
261 DLLTOOL_FOR_TARGET
= ` \
262 if [ -f $$r/binutils/dlltool ] ; then \
263 echo $$r/binutils/dlltool ; \
265 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
268 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
272 WINDRES_FOR_TARGET
= ` \
273 if [ -f $$r/binutils/windres ] ; then \
274 echo $$r/binutils/windres ; \
276 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
279 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
284 if [ -f $$r/binutils/ar ] ; then \
285 echo $$r/binutils/ar ; \
287 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
290 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
294 RANLIB_FOR_TARGET
= ` \
295 if [ -f $$r/binutils/ranlib ] ; then \
296 echo $$r/binutils/ranlib ; \
298 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
301 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
306 if [ -f $$r/binutils/nm-new ] ; then \
307 echo $$r/binutils/nm-new ; \
309 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
312 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
316 #### host and target specific makefile fragments come in here.
319 # Flags to pass down to all sub-makes.
320 # Please keep these in alphabetical order.
321 BASE_FLAGS_TO_PASS
= \
322 "AR_FLAGS=$(AR_FLAGS)" \
323 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
324 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
326 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
327 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
329 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
330 $(start-sanitize-chill
)\
331 "CHILLFLAGS=$(CHILLFLAGS)" \
332 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
333 "CHILL_LIB=$(CHILL_LIB)" \
334 $(end-sanitize-chill
)\
335 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
336 "CXXFLAGS=$(CXXFLAGS)" \
337 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
338 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
339 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
340 "INSTALL=$(INSTALL)" \
341 "INSTALL_DATA=$(INSTALL_DATA)" \
342 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
343 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
344 "LDFLAGS=$(LDFLAGS)" \
346 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
347 "LIBCFLAGS=$(LIBCFLAGS)" \
348 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
349 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
350 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
353 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
354 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
355 "PICFLAG=$(PICFLAG)" \
356 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
357 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
360 "RUNTEST=$(RUNTEST)" \
361 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
362 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
364 "exec_prefix=$(exec_prefix)" \
368 # Flags to pass down to most sub-makes, in which we're building with
369 # the host environment.
370 # If any variables are added here, they must be added to do-*, below.
376 'DLLTOOL=$(DLLTOOL)' \
382 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
384 # Flags that are concerned with the location of the X11 include files
387 # NOTE: until the top-level is getting the values via autoconf, it only
388 # causes problems to have this top-level Makefile overriding the autoconf-set
389 # values in child directories. Only variables that don't conflict with
390 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
392 X11_FLAGS_TO_PASS
= \
393 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
394 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
396 # Flags to pass down to makes which are built with the target environment.
397 # The double $ decreases the length of the command line; the variables
398 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
399 # If any variables are added here, they must be added to do-*, below.
400 EXTRA_TARGET_FLAGS
= \
401 'AR=$$(AR_FOR_TARGET)' \
402 'AS=$$(AS_FOR_TARGET)' \
403 'CC=$$(CC_FOR_TARGET)' \
404 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
405 'CXX=$$(CXX_FOR_TARGET)' \
406 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
407 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
408 'LD=$$(LD_FOR_TARGET)' \
409 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
410 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
411 'NM=$$(NM_FOR_TARGET)' \
412 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
413 'RANLIB=$$(RANLIB_FOR_TARGET)' \
414 'WINDRES=$$(WINDRES_FOR_TARGET)'
416 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
418 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
419 # unfortunately needs the native compiler and the target ar and
421 # If any variables are added here, they must be added to do-*, below.
422 # The HOST_* variables are a special case, which are used for the gcc
423 # cross-building scheme.
425 'AR=$$(AR_FOR_TARGET)' \
429 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
430 'HOST_CC=$(CC_FOR_BUILD)' \
431 'HOST_PREFIX=$(HOST_PREFIX)' \
432 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
434 'RANLIB=$$(RANLIB_FOR_TARGET)' \
435 'WINDRES=$$(WINDRES_FOR_TARGET)' \
436 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
437 "`if test x'$(LANGUAGES)' != x; then echo 'LANGUAGES=$(LANGUAGES)'; else echo 'XFOO=bar'; fi`" \
438 "`if test x'$(STMP_FIXPROTO)' != x; then echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)'; else echo 'XFOO=bar'; fi`" \
439 "`if test x'$(LIMITS_H_TEST)' != x; then echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)'; else echo 'XFOO=bar'; fi`" \
440 "`if test x'$(LIBGCC1_TEST)' != x; then echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)'; else echo 'XFOO=bar'; fi`" \
441 "`if test x'$(LIBGCC2_CFLAGS)' != x; then echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
442 "`if test x'$(LIBGCC2_DEBUG_CFLAGS)' != x; then echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
443 "`if test x'$(LIBGCC2_INCLUDES)' != x; then echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)'; else echo 'XFOO=bar'; fi`" \
444 "`if test x'$(ENQUIRE)' != x; then echo 'ENQUIRE=$(ENQUIRE)'; else echo 'XFOO=bar'; fi`" \
445 "`if test x'$(BOOT_CFLAGS)' != x; then echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)'; else echo 'XFOO=bar'; fi`"
447 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
449 # This is a list of the targets for all of the modules which are compiled
450 # using $(FLAGS_TO_PASS).
477 $(start-sanitize-ide
) \
479 $(end-sanitize-ide
) \
486 $(start-sanitize-ide
) \
488 $(end-sanitize-ide
) \
512 $(start-sanitize-ide
) \
514 $(end-sanitize-ide
) \
517 # This is a list of the check targets for all of the modules which are
518 # compiled using $(FLAGS_TO_PASS).
520 # The list is in two parts. The first lists those tools which
521 # are tested as part of the host's native tool-chain, and not
522 # tested in a cross configuration.
523 NATIVE_CHECK_MODULES
= \
527 CROSS_CHECK_MODULES
= \
549 $(start-sanitize-ide
) \
551 $(end-sanitize-ide
) \
558 $(start-sanitize-ide
) \
560 $(end-sanitize-ide
) \
583 $(start-sanitize-ide
) \
585 $(end-sanitize-ide
) \
588 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
590 # This is a list of the install targets for all of the modules which are
591 # compiled using $(FLAGS_TO_PASS).
592 # We put install-opcodes before install-binutils because the installed
593 # binutils might be on PATH, and they might need the shared opcodes
622 $(start-sanitize-ide
) \
624 $(end-sanitize-ide
) \
631 $(start-sanitize-ide
) \
633 $(end-sanitize-ide
) \
655 $(start-sanitize-ide
) \
657 $(end-sanitize-ide
) \
660 # This is a list of the targets for all of the modules which are compiled
661 # using $(X11_FLAGS_TO_PASS).
673 # This is a list of the check targets for all of the modules which are
674 # compiled using $(X11_FLAGS_TO_PASS).
675 CHECK_X11_MODULES
= \
685 # This is a list of the install targets for all the modules which are
686 # compiled using $(X11_FLAGS_TO_PASS).
687 INSTALL_X11_MODULES
= \
698 # This is a list of the targets for all of the modules which are compiled
699 # using $(TARGET_FLAGS_TO_PASS).
700 ALL_TARGET_MODULES
= \
702 all-target-libstdc
++ \
707 all-target-libgloss \
708 all-target-libiberty \
712 # This is a list of the configure targets for all of the modules which
713 # are compiled using the target tools.
714 CONFIGURE_TARGET_MODULES
= \
715 configure-target-libio \
716 configure-target-libstdc
++ \
717 configure-target-librx \
718 configure-target-libg
++ \
719 configure-target-newlib \
720 configure-target-winsup \
721 configure-target-libgloss \
722 configure-target-libiberty \
723 configure-target-gperf \
724 configure-target-examples
726 # This is a list of the check targets for all of the modules which are
727 # compiled using $(TARGET_FLAGS_TO_PASS).
728 CHECK_TARGET_MODULES
= \
730 check-target-libstdc
++ \
731 check-target-libg
++ \
732 check-target-newlib \
733 check-target-winsup \
734 check-target-libiberty \
737 # This is a list of the install targets for all of the modules which are
738 # compiled using $(TARGET_FLAGS_TO_PASS).
739 INSTALL_TARGET_MODULES
= \
740 install-target-libio \
741 install-target-libstdc
++ \
742 install-target-libg
++ \
743 install-target-newlib \
744 install-target-winsup \
745 install-target-libgloss \
746 install-target-libiberty \
749 # This is a list of the targets for which we can do a clean-{target}.
776 $(start-sanitize-ide
) \
778 $(end-sanitize-ide
) \
785 $(start-sanitize-ide
) \
787 $(end-sanitize-ide
) \
811 $(start-sanitize-ide
) \
813 $(end-sanitize-ide
) \
816 # All of the target modules that can be cleaned
817 CLEAN_TARGET_MODULES
= \
819 clean-target-libstdc
++ \
821 clean-target-libg
++ \
822 clean-target-newlib \
823 clean-target-winsup \
824 clean-target-libgloss \
825 clean-target-libiberty \
827 clean-target-examples
829 # All of the x11 modules that can be cleaned
830 CLEAN_X11_MODULES
= \
841 # The first rule in the file had better be this one. Don't put any above it.
845 # The target built for a native build.
850 $(ALL_TARGET_MODULES
) \
853 # Do a target for all the subdirectories. A ``make do-X'' will do a
854 # ``make X'' in all subdirectories (because, in general, there is a
855 # dependency (below) of X upon do-X, a ``make X'' will also do this,
856 # but it may do additional work as well).
857 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
858 # because it is so large that it can easily overflow the command line
859 # length limit on some systems.
868 do-maintainer-clean \
872 @target
=`echo $@ | sed -e 's/^do-//'`; \
874 s
=`cd $(srcdir); pwd`; export s
; \
876 for i in
$(SUBDIRS
) -dummy-
; do \
877 if
[ -f .
/$$i/Makefile
]; then \
880 for flag in
$(EXTRA_GCC_FLAGS
); do \
881 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
885 for flag in
$(EXTRA_HOST_FLAGS
); do \
886 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
890 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
892 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
893 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
894 "RANLIB=$${RANLIB}" \
895 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
897 then true
; else exit
1; fi
; \
900 @target
=`echo $@ | sed -e 's/^do-//'`; \
902 s
=`cd $(srcdir); pwd`; export s
; \
904 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
905 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
906 for flag in
$(EXTRA_TARGET_FLAGS
); do \
907 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
909 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
910 if
(cd
$(TARGET_SUBDIR
)/$$i; \
911 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
912 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
913 "RANLIB=$${RANLIB}" \
914 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
916 then true
; else exit
1; fi
; \
920 # Here are the targets which correspond to the do-X targets.
922 .PHONY
: info installcheck dvi install-info
923 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
924 .PHONY
: local-clean local-distclean local-maintainer-clean
926 installcheck: do-installcheck
929 # Make sure makeinfo is built before we do a `make info'.
932 install-info
: do-install-info
dir.
info
933 s
=`cd $(srcdir); pwd`; export s
; \
934 if
[ -f
dir.
info ] ; then \
935 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
939 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
942 -rm -f Makefile config.status config.cache
943 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
944 rm -rf
$(TARGET_SUBDIR
); \
947 local-maintainer-clean
:
948 @echo
"This command is intended for maintainers to use;"
949 @echo
"it deletes files that may require special tools to rebuild."
951 clean: do-clean local-clean
952 mostlyclean: do-mostlyclean local-clean
953 distclean: do-distclean local-clean local-distclean
954 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
955 maintainer-clean
: local-distclean
956 realclean: maintainer-clean
958 # This rule is used to clean specific modules.
959 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
960 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
961 @
dir=`echo $@ | sed -e 's/clean-//'`; \
962 if
[ -f .
/$${dir}/Makefile
] ; then \
964 s
=`cd $(srcdir); pwd`; export s
; \
966 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
971 .PHONY
: $(CLEAN_TARGET_MODULES
)
972 $(CLEAN_TARGET_MODULES
):
973 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
974 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
975 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
977 s
=`cd $(srcdir); pwd`; export s
; \
979 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
984 clean-target
: $(CLEAN_TARGET_MODULES
)
989 check: $(CHECK_MODULES
) \
990 $(CHECK_TARGET_MODULES
) \
991 $(CHECK_X11_MODULES
) \
994 # Installation targets.
996 .PHONY
: install uninstall source-vault binary-vault vault-install
997 install: $(INSTALL_TARGET
)
1000 @echo
"the uninstall target is not supported in this tree"
1003 $(MAKE
) -f .
/release
/Build-A-Release \
1004 host
=$(host_alias
) source-vault
1007 $(MAKE
) -f .
/release
/Build-A-Release \
1008 host
=$(host_alias
) target
=$(target_alias
)
1011 @if
[ -f .
/release
/vault-install
] ; then \
1012 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1018 install.
all: install-no-fixedincludes
1019 @if
[ -f .
/gcc
/Makefile
] ; then \
1020 r
=`pwd` ; export r
; \
1023 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1028 # inet-install is used because the I*Net wants DejaGNU installed but
1029 # not built. Similarly, gzip is built but not installed.
1031 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1033 # install-no-fixedincludes is used because Cygnus can not distribute
1034 # the fixed header files.
1035 .PHONY
: install-no-fixedincludes
1036 install-no-fixedincludes
: \
1038 $(INSTALL_MODULES
) \
1039 $(INSTALL_TARGET_MODULES
) \
1040 $(INSTALL_X11_MODULES
) \
1041 gcc-no-fixedincludes
1043 # Install the gcc headers files, but not the fixed include files,
1044 # which Cygnus is not allowed to distribute. This rule is very
1045 # dependent on the workings of the gcc Makefile.in.
1046 .PHONY
: gcc-no-fixedincludes
1047 gcc-no-fixedincludes
:
1048 @if
[ -f .
/gcc
/Makefile
]; then \
1049 rm -rf gcc
/tmp-include
; \
1050 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1051 mkdir gcc
/include; \
1052 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1053 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1054 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1055 r
=`pwd`; export r
; \
1056 s
=`cd $(srcdir); pwd` ; export s
; \
1059 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1060 rm -rf gcc
/include; \
1061 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1064 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1065 # build a target all-X means to cd to X and make all.
1067 # all-gui, and all-libproc are handled specially because
1068 # they are still experimental, and if they fail to build, that
1069 # shouldn't stop "make all".
1070 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1071 $(ALL_MODULES
) all-gui all-libproc
:
1072 @
dir=`echo $@ | sed -e 's/all-//'`; \
1073 if
[ -f .
/$${dir}/Makefile
] ; then \
1074 r
=`pwd`; export r
; \
1075 s
=`cd $(srcdir); pwd`; export s
; \
1077 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1082 # These rules are used to check the modules which use FLAGS_TO_PASS.
1083 # To build a target check-X means to cd to X and make check. Some
1084 # modules are only tested in a native toolchain.
1086 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1087 $(NATIVE_CHECK_MODULES
):
1088 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1089 dir=`echo $@ | sed -e 's/check-//'`; \
1090 if
[ -f .
/$${dir}/Makefile
] ; then \
1091 r
=`pwd`; export r
; \
1092 s
=`cd $(srcdir); pwd`; export s
; \
1094 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1100 $(CROSS_CHECK_MODULES
):
1101 @
dir=`echo $@ | sed -e 's/check-//'`; \
1102 if
[ -f .
/$${dir}/Makefile
] ; then \
1103 r
=`pwd`; export r
; \
1104 s
=`cd $(srcdir); pwd`; export s
; \
1106 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1111 # This rule is used to install the modules which use FLAGS_TO_PASS.
1112 # To build a target install-X means to cd to X and make install.
1113 .PHONY
: $(INSTALL_MODULES
)
1114 $(INSTALL_MODULES
): installdirs
1115 @
dir=`echo $@ | sed -e 's/install-//'`; \
1116 if
[ -f .
/$${dir}/Makefile
] ; then \
1117 r
=`pwd`; export r
; \
1118 s
=`cd $(srcdir); pwd`; export s
; \
1120 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1125 # This rule is used to configure the modules which are built with the
1127 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1128 $(CONFIGURE_TARGET_MODULES
):
1129 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1130 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1131 r
=`pwd`; export r
; \
1132 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1133 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1134 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1135 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1136 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1138 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1139 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1140 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1143 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1146 fi
; exit
0 # break command into two pieces
1147 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1148 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1150 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1152 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1153 if
[ -d
$(srcdir)/$${dir} ]; then \
1154 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1155 r
=`pwd`; export r
; \
1156 s
=`cd $(srcdir); pwd`; export s
; \
1158 AR
="$(AR_FOR_TARGET)"; export AR
; \
1159 AS
="$(AS_FOR_TARGET)"; export AS
; \
1160 CC
="$(CC_FOR_TARGET)"; export CC
; \
1161 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1162 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1163 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1164 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1165 LD
="$(LD_FOR_TARGET)"; export LD
; \
1166 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1167 NM
="$(NM_FOR_TARGET)"; export NM
; \
1168 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1169 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1170 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1171 cd
$(TARGET_SUBDIR
)/$${dir}; \
1174 topdir
=$(srcdir) ;; \
1176 case
"$(TARGET_SUBDIR)" in \
1177 .
) topdir
="../$(srcdir)" ;; \
1178 *) topdir
="../../$(srcdir)" ;; \
1181 if
[ "$(srcdir)" = "." ] ; then \
1182 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1183 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1184 if
[ -f Makefile
]; then \
1185 if
$(MAKE
) distclean; then \
1199 srcdiroption
="--srcdir=."; \
1202 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1203 libsrcdir
="$$s/$${dir}"; \
1205 if
[ -f
$${libsrcdir}/configure
] ; then \
1206 $(SHELL
) $${libsrcdir}/configure \
1207 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1208 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1210 $(SHELL
) $$s/configure \
1211 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1212 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1221 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1222 # To build a target all-X means to cd to X and make all.
1223 .PHONY
: $(ALL_TARGET_MODULES
)
1224 $(ALL_TARGET_MODULES
):
1225 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1226 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1227 r
=`pwd`; export r
; \
1228 s
=`cd $(srcdir); pwd`; export s
; \
1230 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1235 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1236 # To build a target install-X means to cd to X and make install.
1237 .PHONY
: $(CHECK_TARGET_MODULES
)
1238 $(CHECK_TARGET_MODULES
):
1239 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1240 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1241 r
=`pwd`; export r
; \
1242 s
=`cd $(srcdir); pwd`; export s
; \
1244 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1249 # This rule is used to install the modules which use
1250 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1252 .PHONY
: $(INSTALL_TARGET_MODULES
)
1253 $(INSTALL_TARGET_MODULES
): installdirs
1254 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1255 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1256 r
=`pwd`; export r
; \
1257 s
=`cd $(srcdir); pwd`; export s
; \
1259 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1260 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1265 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1266 # To build a target all-X means to cd to X and make all.
1267 .PHONY
: $(ALL_X11_MODULES
)
1269 @
dir=`echo $@ | sed -e 's/all-//'`; \
1270 if
[ -f .
/$${dir}/Makefile
] ; then \
1271 r
=`pwd`; export r
; \
1272 s
=`cd $(srcdir); pwd`; export s
; \
1275 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1280 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1281 # To build a target check-X means to cd to X and make all.
1282 .PHONY
: $(CHECK_X11_MODULES
)
1283 $(CHECK_X11_MODULES
):
1284 @
dir=`echo $@ | sed -e 's/check-//'`; \
1285 if
[ -f .
/$${dir}/Makefile
] ; then \
1286 r
=`pwd`; export r
; \
1287 s
=`cd $(srcdir); pwd`; export s
; \
1290 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1295 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1296 # To build a target install-X means to cd to X and make install.
1297 .PHONY
: $(INSTALL_X11_MODULES
)
1298 $(INSTALL_X11_MODULES
): installdirs
1299 @
dir=`echo $@ | sed -e 's/install-//'`; \
1300 if
[ -f .
/$${dir}/Makefile
] ; then \
1301 r
=`pwd`; export r
; \
1302 s
=`cd $(srcdir); pwd`; export s
; \
1305 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1310 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1313 @if
[ -f .
/gcc
/Makefile
] ; then \
1314 r
=`pwd`; export r
; \
1315 s
=`cd $(srcdir); pwd`; export s
; \
1317 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1322 .PHONY
: all-bootstrap
1324 @if
[ -f .
/gcc
/Makefile
] ; then \
1325 r
=`pwd`; export r
; \
1326 s
=`cd $(srcdir); pwd`; export s
; \
1328 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) bootstrap
); \
1335 @if
[ -f .
/gcc
/Makefile
] ; then \
1336 r
=`pwd`; export r
; \
1337 s
=`cd $(srcdir); pwd`; export s
; \
1339 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1346 @if
[ -f .
/gcc
/Makefile
] ; then \
1347 r
=`pwd`; export r
; \
1348 s
=`cd $(srcdir); pwd`; export s
; \
1350 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1356 # EXPERIMENTAL STUFF
1357 # This rule is used to install the modules which use FLAGS_TO_PASS.
1358 # To build a target install-X means to cd to X and make install.
1359 .PHONY
: install-dosrel
1360 install-dosrel
: installdirs info
1361 @
dir=`echo $@ | sed -e 's/install-//'`; \
1362 if
[ -f .
/$${dir}/Makefile
] ; then \
1363 r
=`pwd`; export r
; \
1364 s
=`cd $(srcdir); pwd`; export s
; \
1366 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1371 install-dosrel-fake
:
1374 # This is a list of inter-dependencies among modules.
1376 all-autoconf
: all-m4
1380 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-byacc
1384 all-dejagnu
: all-tcl all-expect all-tk
1385 all-diff
: all-libiberty
1387 all-emacs19
: all-byacc
1389 configure-target-examples
: $(ALL_GCC
)
1390 all-target-examples
: configure-target-examples
1391 all-expect
: all-tcl all-tk
1392 all-fileutils
: all-libiberty
1395 all-flex
: all-libiberty all-byacc
1396 all-gas
: all-libiberty all-opcodes all-bfd
1400 all-gcc
: all-byacc all-binutils all-gas all-ld
1401 all-bootstrap
: all-libiberty all-byacc all-binutils all-gas all-ld
1402 GDB_TK
= all-tk all-tcl all-itcl all-tix
1403 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1405 configure-target-gperf
: $(ALL_GCC
)
1406 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libg
++
1407 all-gprof
: all-libiberty all-bfd all-opcodes
1408 all-grep
: all-libiberty
1409 all-grez
: all-libiberty all-bfd all-opcodes
1410 all-gui
: all-gdb all-libproc all-target-librx
1412 all-gzip
: all-libiberty
1413 all-hello
: all-libiberty
1414 # start-sanitize-ide
1418 all-inet
: all-tcl all-send-pr all-perl
1419 all-ispell
: all-emacs19
1420 all-itcl
: all-tcl all-tk
1421 all-ld
: all-libiberty all-bfd all-opcodes all-byacc all-flex
1422 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1423 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
++
1424 configure-target-libgloss
: $(ALL_GCC
)
1425 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1426 configure-target-libio
: $(ALL_GCC
)
1427 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1429 # start-sanitize-ide
1430 all-libide
: all-tcl all-tk all-itcl all-ilu
1432 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1433 all-target-librx
: configure-target-librx
1434 configure-target-libstdc
++: $(ALL_GCC
)
1435 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1436 all-m4
: all-libiberty
1437 all-make
: all-libiberty
1439 configure-target-newlib
: $(ALL_GCC
)
1440 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1441 all-opcodes
: all-bfd all-libiberty
1442 all-patch
: all-libiberty
1444 all-prms
: all-libiberty
1447 all-recode
: all-libiberty
1448 all-sed
: all-libiberty
1449 all-send-pr
: all-prms
1451 all-sim
: all-libiberty all-bfd all-opcodes
1452 all-sn
: all-tcl all-tk all-itcl all-db all-grep
1453 all-tar
: all-libiberty
1455 all-tclX
: all-tcl all-tk
1457 all-texinfo
: all-libiberty
1459 all-tgas
: all-libiberty all-bfd all-opcodes
1461 all-tix
: all-tcl all-tk
1462 # start-sanitize-ide
1463 all-vmake
: all-tcl all-tk all-itcl all-libide
1466 all-target-winsup
: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1467 configure-target-winsup
: configure-target-newlib
1468 all-uudecode
: all-libiberty
1469 configure-target-libiberty
: $(ALL_GCC
)
1470 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1471 all-target
: $(ALL_TARGET_MODULES
)
1472 install-target
: $(INSTALL_TARGET_MODULES
)
1474 ### other supporting targets
1480 installdirs: mkinstalldirs
1481 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1483 dir.
info: do-install-info
1484 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1485 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1486 mv
-f
dir.
info.new
dir.
info ; \
1491 @echo
"Building a full distribution of this tree isn't done"
1492 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1496 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1497 # ability to use several tags files at once, so there is probably no need
1498 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1499 # (if we felt like it) have this Makefile write a piece of elisp which
1500 # the user could load to tell emacs19 where all the TAGS files we just
1504 # with the gnu make, this is done automatically.
1506 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
1507 $(SHELL
) .
/config.status
1510 # Support for building net releases
1512 # Files in devo used in any net release.
1513 # ChangeLog omitted because it may refer to files which are not in this
1514 # distribution (perhaps it would be better to include it anyway).
1515 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1516 config.guess config.sub config move-if-change \
1517 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1518 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1519 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1521 # Files in devo/etc used in any net release.
1522 # ChangeLog omitted because it may refer to files which are not in this
1523 # distribution (perhaps it would be better to include it anyway).
1524 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1525 make-stds.texi standards.
info*
1527 # When you use `make setup-dirs' or `make taz' you should always redefine
1529 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1533 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1534 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1535 # Take out texinfo from a few places; make simple BISON=bison line.
1536 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1537 -e
'/^ install-texinfo /d' \
1538 -e
'/^BISON = `if/,/^$$/d' \
1539 -e
'/^# BISON:/s/.*/BISON = $(DEFAULT_YACC)/' \
1541 mv
-f tmp Makefile.in
1543 $(start-sanitize-Sanitize
)
1544 @if
[ -f .Sanitize
] ; then echo
"RUN Sanitize FIRST!" ; false
; fi
;
1545 $(end-sanitize-Sanitize
)
1547 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1548 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1549 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1550 # Make links, and run "make diststuff" or "make info" when needed.
1551 rm -rf proto-toplev
; mkdir proto-toplev
1552 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1553 for d in
$$dirs ; do \
1554 if
[ -d
$$d ]; then \
1555 if
[ ! -f
$$d/Makefile
] ; then true
; \
1556 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1557 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1558 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1559 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1561 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1562 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1564 ln
-s ..
/$$d proto-toplev
/$$d ; \
1566 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1568 cd etc
; $(MAKE
) info
1571 mkdir proto-toplev
/etc
1572 (cd proto-toplev
/etc
; \
1573 for i in
$(ETC_SUPPORT
); do \
1574 ln
-s ..
/..
/etc
/$$i .
; \
1577 # Take out texinfo from configurable dirs
1578 rm proto-toplev
/configure.in
1579 sed
-e
'/^host_tools=/s/texinfo //' \
1580 <configure.in
>proto-toplev
/configure.in
1582 mkdir proto-toplev
/texinfo
1583 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1584 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1585 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1586 if
test -r texinfo
/util
/tex3patch
; then \
1587 mkdir proto-toplev
/texinfo
/util
&& \
1588 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1590 chmod og
=u
`find . -print`
1591 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) \
1592 VER
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`
1595 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1596 -rm -f
$(TOOL
)-$(VER
)
1597 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1598 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1599 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1601 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1602 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1605 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes setup.com makefile.vms
1606 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1607 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1608 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1610 # The FSF "binutils" release includes gprof and ld.
1611 .PHONY
: binutils.
tar.gz
1612 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof setup.com makefile.vms
1613 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1614 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1615 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1617 .PHONY
: gas
+binutils.
tar.gz
1618 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1619 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1620 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1621 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1623 .PHONY
: libg
++.
tar.gz
1624 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1625 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1626 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1627 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1629 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1630 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1631 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1632 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1635 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils
1636 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1637 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1638 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1639 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1641 .PHONY
: newlib.
tar.gz
1642 NEWLIB_SUPPORT_DIRS
=libgloss
1643 # taz configures for the sun4 target which won't configure newlib.
1644 # We need newlib configured so that the .info files are made.
1645 # Unfortunately, it is not enough to just configure newlib separately:
1646 # taz will build the .info files but since SUBDIRS won't contain newlib,
1647 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1648 # used in building the .info files, eg: *.def, *.ref).
1649 # The problem isn't solvable however without a lot of extra work because
1650 # target libraries are built in subdir $(target_alias) which gets nuked during
1651 # the make distclean. For now punt on the issue of shipping newlib info files
1652 # with newlib net releases and wait for a day when some native target (sun4?)
1653 # supports newlib (if only minimally).
1654 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1655 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1656 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1657 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1662 # start-sanitize-chill
1663 ## This is ugly, but I don't want GNU make to put these variables in
1664 ## the environment. Older makes will see this as a set of targets
1665 ## with no dependencies and no actions.
1666 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1667 # end-sanitize-chill
1669 # end of Makefile.in