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
= $(SHELL
) $$s/install-sh
-c
49 INSTALL_PROGRAM
= $(INSTALL
)
50 INSTALL_DATA
= $(INSTALL
) -m
644
52 INSTALL_DOSREL
= install-dosrel-fake
59 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
60 # here so that they can be overridden by Makefile fragments.
61 HOST_CC
= $(CC_FOR_BUILD
)
63 HOST_PREFIX_1
= loser-
65 # These flag values are normally overridden by the configure script.
70 CFLAGS_FOR_TARGET
= $(CFLAGS
)
72 LIBCFLAGS_FOR_TARGET
= $(CFLAGS_FOR_TARGET
)
76 # start-sanitize-chill
77 CHILLFLAGS
= $(CFLAGS
)
82 # Use -O2 to stress test the compiler.
83 LIBCXXFLAGS
= $(CXXFLAGS
) -fno-implicit-templates
84 CXXFLAGS_FOR_TARGET
= $(CXXFLAGS
)
85 LIBCXXFLAGS_FOR_TARGET
= $(CXXFLAGS_FOR_TARGET
) -fno-implicit-templates
96 # Not plain GZIP, since gzip looks there for extra command-line options.
99 # These values are substituted by configure.
103 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
104 BISON
= `if [ -f $$r/byacc/byacc ] ; \
105 then echo $$r/byacc/byacc ; \
106 else echo ${DEFAULT_YACC} ; \
109 LEX
= `if [ -f $$r/flex/flex ] ; \
110 then echo $$r/flex/flex ; \
111 else echo ${DEFAULT_LEX} ; fi`
113 M4
= `if [ -f $$r/m4/m4 ] ; \
114 then echo $$r/m4/m4 ; \
117 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
118 then echo $$r/texinfo/makeinfo/makeinfo ; \
119 else echo makeinfo ; fi`
121 # This just becomes part of the MAKEINFO definition passed down to
122 # sub-makes. It lets flags be given on the command line while still
123 # using the makeinfo from the object tree.
126 EXPECT
= `if [ -f $$r/expect/expect ] ; \
127 then echo $$r/expect/expect ; \
128 else echo expect ; fi`
130 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
131 then echo $$s/dejagnu/runtest ; \
132 else echo runtest ; fi`
135 # compilers to use to create programs which must be run in the build
138 CXX_FOR_BUILD
= $(CXX
)
140 SUBDIRS
= "this is set via configure, don't edit this"
143 # This is set by the configure script to the list of directories which
144 # should be built using the target tools.
145 TARGET_CONFIGDIRS
= libiberty libgloss newlib libio librx libstdc
++ libg
++ winsup
147 # Target libraries are put under this directory:
148 # Changed by configure to $(target_alias) if cross.
151 # This is set by the configure script to the arguments passed to configure.
154 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
158 # This is the name of the environment variable used for the path to
159 # the libraries. This may be changed by configure.in.
160 RPATH_ENVVAR
= LD_LIBRARY_PATH
162 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
163 REALLY_SET_LIB_PATH
= \
164 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
165 export $(RPATH_ENVVAR
);
168 INSTALL_TARGET
= installdirs \
170 $(INSTALL_TARGET_MODULES
) \
171 $(INSTALL_X11_MODULES
) \
177 if [ -f $$r/gcc/xgcc ] ; then \
178 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
179 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
180 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; \
182 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
185 echo $$r/gcc/xgcc -B$$r/gcc/; \
188 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
191 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
195 # If CC_FOR_TARGET is not overriden on the command line, then this
196 # variable is passed down to the gcc Makefile, where it is used to
197 # build libgcc2.a. We define it here so that it can itself be
198 # overridden on the command line.
199 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/
201 # start-sanitize-chill
202 CHILL_FOR_TARGET
= ` \
203 if [ -f $$r/gcc/xgcc ] ; then \
204 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
206 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
209 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
216 if [ -f $$r/gcc/xgcc ] ; then \
217 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
218 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
219 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; \
221 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
224 echo $$r/gcc/xgcc -B$$r/gcc/; \
227 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
230 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
235 if [ -f $$r/gas/as.new ] ; then \
236 echo $$r/gas/as.new ; \
238 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
241 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
246 if [ -f $$r/ld/ld.new ] ; then \
247 echo $$r/ld/ld.new ; \
249 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
252 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
256 DLLTOOL_FOR_TARGET
= ` \
257 if [ -f $$r/binutils/dlltool ] ; then \
258 echo $$r/binutils/dlltool ; \
260 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
263 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
267 WINDRES_FOR_TARGET
= ` \
268 if [ -f $$r/binutils/windres ] ; then \
269 echo $$r/binutils/windres ; \
271 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
274 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
279 if [ -f $$r/binutils/ar ] ; then \
280 echo $$r/binutils/ar ; \
282 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
285 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
289 RANLIB_FOR_TARGET
= ` \
290 if [ -f $$r/binutils/ranlib ] ; then \
291 echo $$r/binutils/ranlib ; \
293 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
296 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
301 if [ -f $$r/binutils/nm.new ] ; then \
302 echo $$r/binutils/nm.new ; \
304 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
307 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
311 #### host and target specific makefile fragments come in here.
314 # Flags to pass down to all sub-makes.
315 # Please keep these in alphabetical order.
316 BASE_FLAGS_TO_PASS
= \
317 "AR_FLAGS=$(AR_FLAGS)" \
318 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
319 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
321 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
322 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
324 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
325 $(start-sanitize-chill
)\
326 "CHILLFLAGS=$(CHILLFLAGS)" \
327 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
328 "CHILL_LIB=$(CHILL_LIB)" \
329 $(end-sanitize-chill
)\
330 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
331 "CXXFLAGS=$(CXXFLAGS)" \
332 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
333 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
334 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
335 "INSTALL=$(INSTALL)" \
336 "INSTALL_DATA=$(INSTALL_DATA)" \
337 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
338 "LDFLAGS=$(LDFLAGS)" \
340 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
341 "LIBCFLAGS=$(LIBCFLAGS)" \
342 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
343 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
344 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
347 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
348 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
349 "PICFLAG=$(PICFLAG)" \
350 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
351 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
354 "RUNTEST=$(RUNTEST)" \
355 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
356 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
358 "exec_prefix=$(exec_prefix)" \
362 # Flags to pass down to most sub-makes, in which we're building with
363 # the host environment.
364 # If any variables are added here, they must be added to do-*, below.
370 'DLLTOOL=$(DLLTOOL)' \
376 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
378 # Flags that are concerned with the location of the X11 include files
381 # NOTE: until the top-level is getting the values via autoconf, it only
382 # causes problems to have this top-level Makefile overriding the autoconf-set
383 # values in child directories. Only variables that don't conflict with
384 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
386 X11_FLAGS_TO_PASS
= \
387 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
388 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
390 # Flags to pass down to makes which are built with the target environment.
391 # The double $ decreases the length of the command line; the variables
392 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
393 # If any variables are added here, they must be added to do-*, below.
394 EXTRA_TARGET_FLAGS
= \
395 'AR=$$(AR_FOR_TARGET)' \
396 'AS=$$(AS_FOR_TARGET)' \
397 'CC=$$(CC_FOR_TARGET)' \
398 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
399 'CXX=$$(CXX_FOR_TARGET)' \
400 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
401 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
402 'LD=$$(LD_FOR_TARGET)' \
403 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
404 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
405 'NM=$$(NM_FOR_TARGET)' \
406 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
407 'RANLIB=$$(RANLIB_FOR_TARGET)' \
408 'WINDRES=$$(WINDRES_FOR_TARGET)'
410 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
412 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
413 # unfortunately needs the native compiler and the target ar and
415 # If any variables are added here, they must be added to do-*, below.
416 # The HOST_* variables are a special case, which are used for the gcc
417 # cross-building scheme.
419 'AR=$$(AR_FOR_TARGET)' \
423 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
424 'HOST_CC=$(CC_FOR_BUILD)' \
425 'HOST_PREFIX=$(HOST_PREFIX)' \
426 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
428 'RANLIB=$$(RANLIB_FOR_TARGET)' \
429 'WINDRES=$$(WINDRES_FOR_TARGET)' \
430 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
431 `if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
432 `if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
433 `if test x"$(LIMITS_H_TEST)" != x; then echo "LIMITS_H_TEST=$(LIMITS_H_TEST)"; fi` \
434 `if test x"$(LIBGCC1_TEST)" != x; then echo "LIBGCC1_TEST=$(LIBGCC1_TEST)"; fi` \
435 `if test x"$(LIBGCC2_CFLAGS)" != x; then echo "LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)"; fi` \
436 `if test x"$(LIBGCC2_DEBUG_CFLAGS)" != x; then echo "LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)"; fi` \
437 `if test x"$(LIBGCC2_INCLUDES)" != x; then echo "LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)"; fi` \
438 `if test x"$(ENQUIRE)" != x; then echo "ENQUIRE=$(ENQUIRE)"; fi` \
439 `if test x"$(BOOT_CFLAGS)" != x; then echo "BOOT_CFLAGS=$(BOOT_CFLAGS)"; fi`
441 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
443 # This is a list of the targets for all of the modules which are compiled
444 # using $(FLAGS_TO_PASS).
471 $(start-sanitize-ide
) \
473 $(end-sanitize-ide
) \
480 $(start-sanitize-ide
) \
482 $(end-sanitize-ide
) \
506 $(start-sanitize-ide
) \
508 $(end-sanitize-ide
) \
511 # This is a list of the check targets for all of the modules which are
512 # compiled using $(FLAGS_TO_PASS).
514 # The list is in two parts. The first lists those tools which
515 # are tested as part of the host's native tool-chain, and not
516 # tested in a cross configuration.
517 NATIVE_CHECK_MODULES
= \
521 CROSS_CHECK_MODULES
= \
543 $(start-sanitize-ide
) \
545 $(end-sanitize-ide
) \
552 $(start-sanitize-ide
) \
554 $(end-sanitize-ide
) \
577 $(start-sanitize-ide
) \
579 $(end-sanitize-ide
) \
582 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
584 # This is a list of the install targets for all of the modules which are
585 # compiled using $(FLAGS_TO_PASS).
586 # We put install-opcodes before install-binutils because the installed
587 # binutils might be on PATH, and they might need the shared opcodes
616 $(start-sanitize-ide
) \
618 $(end-sanitize-ide
) \
625 $(start-sanitize-ide
) \
627 $(end-sanitize-ide
) \
649 $(start-sanitize-ide
) \
651 $(end-sanitize-ide
) \
654 # This is a list of the targets for all of the modules which are compiled
655 # using $(X11_FLAGS_TO_PASS).
666 # This is a list of the check targets for all of the modules which are
667 # compiled using $(X11_FLAGS_TO_PASS).
668 CHECK_X11_MODULES
= \
676 # This is a list of the install targets for all the modules which are
677 # compiled using $(X11_FLAGS_TO_PASS).
678 INSTALL_X11_MODULES
= \
688 # This is a list of the targets for all of the modules which are compiled
689 # using $(TARGET_FLAGS_TO_PASS).
690 ALL_TARGET_MODULES
= \
692 all-target-libstdc
++ \
697 all-target-libgloss \
698 all-target-libiberty \
702 # This is a list of the configure targets for all of the modules which
703 # are compiled using the target tools.
704 CONFIGURE_TARGET_MODULES
= \
705 configure-target-libio \
706 configure-target-libstdc
++ \
707 configure-target-librx \
708 configure-target-libg
++ \
709 configure-target-newlib \
710 configure-target-winsup \
711 configure-target-libgloss \
712 configure-target-libiberty \
713 configure-target-gperf \
714 configure-target-examples
716 # This is a list of the check targets for all of the modules which are
717 # compiled using $(TARGET_FLAGS_TO_PASS).
718 CHECK_TARGET_MODULES
= \
720 check-target-libstdc
++ \
721 check-target-libg
++ \
722 check-target-newlib \
723 check-target-winsup \
724 check-target-libiberty \
727 # This is a list of the install targets for all of the modules which are
728 # compiled using $(TARGET_FLAGS_TO_PASS).
729 INSTALL_TARGET_MODULES
= \
730 install-target-libio \
731 install-target-libstdc
++ \
732 install-target-libg
++ \
733 install-target-newlib \
734 install-target-winsup \
735 install-target-libgloss \
736 install-target-libiberty \
739 # This is a list of the targets for which we can do a clean-{target}.
766 $(start-sanitize-ide
) \
768 $(end-sanitize-ide
) \
775 $(start-sanitize-ide
) \
777 $(end-sanitize-ide
) \
801 $(start-sanitize-ide
) \
803 $(end-sanitize-ide
) \
806 # All of the target modules that can be cleaned
807 CLEAN_TARGET_MODULES
= \
809 clean-target-libstdc
++ \
811 clean-target-libg
++ \
812 clean-target-newlib \
813 clean-target-winsup \
814 clean-target-libgloss \
815 clean-target-libiberty \
817 clean-target-examples
819 # All of the x11 modules that can be cleaned
820 CLEAN_X11_MODULES
= \
830 # The first rule in the file had better be this one. Don't put any above it.
834 # The target built for a native build.
839 $(ALL_TARGET_MODULES
) \
842 # Do a target for all the subdirectories. A ``make do-X'' will do a
843 # ``make X'' in all subdirectories (because, in general, there is a
844 # dependency (below) of X upon do-X, a ``make X'' will also do this,
845 # but it may do additional work as well).
846 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
847 # because it is so large that it can easily overflow the command line
848 # length limit on some systems.
857 do-maintainer-clean \
861 @target
=`echo $@ | sed -e 's/^do-//'`; \
863 s
=`cd $(srcdir); pwd`; export s
; \
865 for i in
$(SUBDIRS
) -dummy-
; do \
866 if
[ -f .
/$$i/Makefile
]; then \
869 for flag in
$(EXTRA_GCC_FLAGS
); do \
870 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
874 for flag in
$(EXTRA_HOST_FLAGS
); do \
875 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
879 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
881 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
882 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
883 "RANLIB=$${RANLIB}" \
884 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
886 then true
; else exit
1; fi
; \
889 @target
=`echo $@ | sed -e 's/^do-//'`; \
891 s
=`cd $(srcdir); pwd`; export s
; \
893 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
894 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
895 for flag in
$(EXTRA_TARGET_FLAGS
); do \
896 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
898 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
899 if
(cd
$(TARGET_SUBDIR
)/$$i; \
900 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
901 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
902 "RANLIB=$${RANLIB}" \
903 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
905 then true
; else exit
1; fi
; \
909 # Here are the targets which correspond to the do-X targets.
911 .PHONY
: info installcheck dvi install-info
912 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
913 .PHONY
: local-clean local-distclean local-maintainer-clean
915 installcheck: do-installcheck
918 # Make sure makeinfo is built before we do a `make info'.
921 install-info
: do-install-info
dir.
info
922 s
=`cd $(srcdir); pwd`; export s
; \
923 if
[ -f
dir.
info ] ; then \
924 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
928 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
931 -rm -f Makefile config.status config.cache
932 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
933 rm -rf
$(TARGET_SUBDIR
); \
936 local-maintainer-clean
:
937 @echo
"This command is intended for maintainers to use;"
938 @echo
"it deletes files that may require special tools to rebuild."
940 clean: do-clean local-clean
941 mostlyclean: do-mostlyclean local-clean
942 distclean: do-distclean local-clean local-distclean
943 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
944 maintainer-clean
: local-distclean
945 realclean: maintainer-clean
947 # This rule is used to clean specific modules.
948 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
949 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
950 @
dir=`echo $@ | sed -e 's/clean-//'`; \
951 if
[ -f .
/$${dir}/Makefile
] ; then \
953 s
=`cd $(srcdir); pwd`; export s
; \
955 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
960 .PHONY
: $(CLEAN_TARGET_MODULES
)
961 $(CLEAN_TARGET_MODULES
):
962 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
963 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
964 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
966 s
=`cd $(srcdir); pwd`; export s
; \
968 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
973 clean-target
: $(CLEAN_TARGET_MODULES
)
978 check: $(CHECK_MODULES
) \
979 $(CHECK_TARGET_MODULES
) \
980 $(CHECK_X11_MODULES
) \
983 # Installation targets.
985 .PHONY
: install uninstall source-vault binary-vault vault-install
986 install: $(INSTALL_TARGET
)
989 @echo
"the uninstall target is not supported in this tree"
992 $(MAKE
) -f .
/release
/Build-A-Release \
993 host
=$(host_alias
) source-vault
996 $(MAKE
) -f .
/release
/Build-A-Release \
997 host
=$(host_alias
) target
=$(target_alias
)
1000 @if
[ -f .
/release
/vault-install
] ; then \
1001 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1007 install.
all: install-no-fixedincludes
1008 @if
[ -f .
/gcc
/Makefile
] ; then \
1009 r
=`pwd` ; export r
; \
1012 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1017 # inet-install is used because the I*Net wants DejaGNU installed but
1018 # not built. Similarly, gzip is built but not installed.
1020 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1022 # install-no-fixedincludes is used because Cygnus can not distribute
1023 # the fixed header files.
1024 .PHONY
: install-no-fixedincludes
1025 install-no-fixedincludes
: \
1027 $(INSTALL_MODULES
) \
1028 $(INSTALL_TARGET_MODULES
) \
1029 $(INSTALL_X11_MODULES
) \
1030 gcc-no-fixedincludes
1032 # Install the gcc headers files, but not the fixed include files,
1033 # which Cygnus is not allowed to distribute. This rule is very
1034 # dependent on the workings of the gcc Makefile.in.
1035 .PHONY
: gcc-no-fixedincludes
1036 gcc-no-fixedincludes
:
1037 @if
[ -f .
/gcc
/Makefile
]; then \
1038 rm -rf gcc
/tmp-include
; \
1039 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1040 mkdir gcc
/include; \
1041 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1042 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1043 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1044 r
=`pwd`; export r
; \
1045 s
=`cd $(srcdir); pwd` ; export s
; \
1048 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1049 rm -rf gcc
/include; \
1050 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1053 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1054 # build a target all-X means to cd to X and make all.
1056 # all-gui, and all-libproc are handled specially because
1057 # they are still experimental, and if they fail to build, that
1058 # shouldn't stop "make all".
1059 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1060 $(ALL_MODULES
) all-gui all-libproc
:
1061 @
dir=`echo $@ | sed -e 's/all-//'`; \
1062 if
[ -f .
/$${dir}/Makefile
] ; then \
1063 r
=`pwd`; export r
; \
1064 s
=`cd $(srcdir); pwd`; export s
; \
1066 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1071 # These rules are used to check the modules which use FLAGS_TO_PASS.
1072 # To build a target check-X means to cd to X and make check. Some
1073 # modules are only tested in a native toolchain.
1075 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1076 $(NATIVE_CHECK_MODULES
):
1077 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1078 dir=`echo $@ | sed -e 's/check-//'`; \
1079 if
[ -f .
/$${dir}/Makefile
] ; then \
1080 r
=`pwd`; export r
; \
1081 s
=`cd $(srcdir); pwd`; export s
; \
1083 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1089 $(CROSS_CHECK_MODULES
):
1090 @
dir=`echo $@ | sed -e 's/check-//'`; \
1091 if
[ -f .
/$${dir}/Makefile
] ; then \
1092 r
=`pwd`; export r
; \
1093 s
=`cd $(srcdir); pwd`; export s
; \
1095 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1100 # This rule is used to install the modules which use FLAGS_TO_PASS.
1101 # To build a target install-X means to cd to X and make install.
1102 .PHONY
: $(INSTALL_MODULES
)
1103 $(INSTALL_MODULES
): installdirs
1104 @
dir=`echo $@ | sed -e 's/install-//'`; \
1105 if
[ -f .
/$${dir}/Makefile
] ; then \
1106 r
=`pwd`; export r
; \
1107 s
=`cd $(srcdir); pwd`; export s
; \
1109 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1114 # This rule is used to configure the modules which are built with the
1116 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1117 $(CONFIGURE_TARGET_MODULES
):
1118 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1119 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1120 r
=`pwd`; export r
; \
1121 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1122 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1123 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1124 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1125 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1127 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1128 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1129 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1132 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1135 fi
; exit
0 # break command into two pieces
1136 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1137 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1139 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1141 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1142 if
[ -d
$(srcdir)/$${dir} ]; then \
1143 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1144 r
=`pwd`; export r
; \
1145 s
=`cd $(srcdir); pwd`; export s
; \
1147 AR
="$(AR_FOR_TARGET)"; export AR
; \
1148 AS
="$(AS_FOR_TARGET)"; export AS
; \
1149 CC
="$(CC_FOR_TARGET)"; export CC
; \
1150 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1151 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1152 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1153 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1154 LD
="$(LD_FOR_TARGET)"; export LD
; \
1155 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1156 NM
="$(NM_FOR_TARGET)"; export NM
; \
1157 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1158 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1159 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1160 cd
$(TARGET_SUBDIR
)/$${dir}; \
1163 topdir
=$(srcdir) ;; \
1165 case
"$(TARGET_SUBDIR)" in \
1166 .
) topdir
="../$(srcdir)" ;; \
1167 *) topdir
="../../$(srcdir)" ;; \
1170 if
[ "$(srcdir)" = "." ] ; then \
1171 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1172 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1173 if
[ -f Makefile
]; then \
1174 if
$(MAKE
) distclean; then \
1188 srcdiroption
="--srcdir=."; \
1191 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1192 libsrcdir
="$$s/$${dir}"; \
1194 if
[ -f
$${libsrcdir}/configure
] ; then \
1195 $(SHELL
) $${libsrcdir}/configure \
1196 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1197 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1199 $(SHELL
) $$s/configure \
1200 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1201 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1210 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1211 # To build a target all-X means to cd to X and make all.
1212 .PHONY
: $(ALL_TARGET_MODULES
)
1213 $(ALL_TARGET_MODULES
):
1214 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1215 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1216 r
=`pwd`; export r
; \
1217 s
=`cd $(srcdir); pwd`; export s
; \
1219 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1224 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1225 # To build a target install-X means to cd to X and make install.
1226 .PHONY
: $(CHECK_TARGET_MODULES
)
1227 $(CHECK_TARGET_MODULES
):
1228 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1229 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1230 r
=`pwd`; export r
; \
1231 s
=`cd $(srcdir); pwd`; export s
; \
1233 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1238 # This rule is used to install the modules which use
1239 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1241 .PHONY
: $(INSTALL_TARGET_MODULES
)
1242 $(INSTALL_TARGET_MODULES
): installdirs
1243 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1244 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1245 r
=`pwd`; export r
; \
1246 s
=`cd $(srcdir); pwd`; export s
; \
1248 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1249 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1254 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1255 # To build a target all-X means to cd to X and make all.
1256 .PHONY
: $(ALL_X11_MODULES
)
1258 @
dir=`echo $@ | sed -e 's/all-//'`; \
1259 if
[ -f .
/$${dir}/Makefile
] ; then \
1260 r
=`pwd`; export r
; \
1261 s
=`cd $(srcdir); pwd`; export s
; \
1264 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1269 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1270 # To build a target check-X means to cd to X and make all.
1271 .PHONY
: $(CHECK_X11_MODULES
)
1272 $(CHECK_X11_MODULES
):
1273 @
dir=`echo $@ | sed -e 's/check-//'`; \
1274 if
[ -f .
/$${dir}/Makefile
] ; then \
1275 r
=`pwd`; export r
; \
1276 s
=`cd $(srcdir); pwd`; export s
; \
1279 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1284 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1285 # To build a target install-X means to cd to X and make install.
1286 .PHONY
: $(INSTALL_X11_MODULES
)
1287 $(INSTALL_X11_MODULES
):
1288 @
dir=`echo $@ | sed -e 's/install-//'`; \
1289 if
[ -f .
/$${dir}/Makefile
] ; then \
1290 r
=`pwd`; export r
; \
1291 s
=`cd $(srcdir); pwd`; export s
; \
1294 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1299 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1302 @if
[ -f .
/gcc
/Makefile
] ; then \
1303 r
=`pwd`; export r
; \
1304 s
=`cd $(srcdir); pwd`; export s
; \
1306 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1311 .PHONY
: all-bootstrap
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
) 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
) check); \
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
) install); \
1345 # EXPERIMENTAL STUFF
1346 # This rule is used to install the modules which use FLAGS_TO_PASS.
1347 # To build a target install-X means to cd to X and make install.
1348 .PHONY
: install-dosrel
1349 install-dosrel
: installdirs info
1350 @
dir=`echo $@ | sed -e 's/install-//'`; \
1351 if
[ -f .
/$${dir}/Makefile
] ; then \
1352 r
=`pwd`; export r
; \
1353 s
=`cd $(srcdir); pwd`; export s
; \
1355 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1360 install-dosrel-fake
:
1363 # This is a list of inter-dependencies among modules.
1365 all-autoconf
: all-m4
1369 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-byacc
1373 all-dejagnu
: all-tcl all-expect all-tk
1374 all-diff
: all-libiberty
1376 all-emacs19
: all-byacc
1378 configure-target-examples
: $(ALL_GCC
)
1379 all-target-examples
: configure-target-examples
1380 all-expect
: all-tcl all-tk
1381 all-fileutils
: all-libiberty
1384 all-flex
: all-libiberty all-byacc
1385 all-gas
: all-libiberty all-opcodes all-bfd
1389 all-gcc
: all-byacc all-binutils all-gas all-ld
1390 all-bootstrap
: all-libiberty all-byacc all-binutils all-gas all-ld
1391 GDB_TK
= all-tk all-tcl
1392 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1394 configure-target-gperf
: $(ALL_GCC
)
1395 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libg
++
1396 all-gprof
: all-libiberty all-bfd all-opcodes
1397 all-grep
: all-libiberty
1398 all-grez
: all-libiberty all-bfd all-opcodes
1399 all-gui
: all-gdb all-libproc all-target-librx
1401 all-gzip
: all-libiberty
1402 all-hello
: all-libiberty
1403 # start-sanitize-ide
1407 all-inet
: all-tcl all-send-pr all-perl
1408 all-ispell
: all-emacs19
1409 all-itcl
: all-tcl all-tk
1410 all-ld
: all-libiberty all-bfd all-opcodes all-byacc all-flex
1411 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1412 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
++
1413 configure-target-libgloss
: $(ALL_GCC
)
1414 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1415 configure-target-libio
: $(ALL_GCC
)
1416 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1418 # start-sanitize-ide
1419 all-libide
: all-tcl all-tk all-itcl all-ilu
1421 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1422 all-target-librx
: configure-target-librx
1423 configure-target-libstdc
++: $(ALL_GCC
)
1424 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1425 all-m4
: all-libiberty
1426 all-make
: all-libiberty
1428 configure-target-newlib
: $(ALL_GCC
)
1429 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1430 all-opcodes
: all-bfd all-libiberty
1431 all-patch
: all-libiberty
1433 all-prms
: all-libiberty
1436 all-recode
: all-libiberty
1437 all-sed
: all-libiberty
1438 all-send-pr
: all-prms
1440 all-sim
: all-libiberty all-bfd all-opcodes
1441 all-sn
: all-tcl all-tk all-itcl all-db all-grep
1442 all-tar
: all-libiberty
1444 all-tclX
: all-tcl all-tk
1446 all-texinfo
: all-libiberty
1448 all-tgas
: all-libiberty all-bfd all-opcodes
1450 # start-sanitize-ide
1451 all-vmake
: all-tcl all-tk all-itcl all-libide
1454 all-target-winsup
: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1455 configure-target-winsup
: configure-target-newlib
1456 all-uudecode
: all-libiberty
1457 configure-target-libiberty
: $(ALL_GCC
)
1458 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1459 all-target
: $(ALL_TARGET_MODULES
)
1460 install-target
: $(INSTALL_TARGET_MODULES
)
1462 ### other supporting targets
1468 installdirs: mkinstalldirs
1469 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1471 dir.
info: do-install-info
1472 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1473 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1474 mv
-f
dir.
info.new
dir.
info ; \
1479 @echo
"Building a full distribution of this tree isn't done"
1480 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1484 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1485 # ability to use several tags files at once, so there is probably no need
1486 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1487 # (if we felt like it) have this Makefile write a piece of elisp which
1488 # the user could load to tell emacs19 where all the TAGS files we just
1492 # with the gnu make, this is done automatically.
1494 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
1495 $(SHELL
) .
/config.status
1498 # Support for building net releases
1500 # Files in devo used in any net release.
1501 # ChangeLog omitted because it may refer to files which are not in this
1502 # distribution (perhaps it would be better to include it anyway).
1503 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1504 config.guess config.sub config move-if-change \
1505 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1506 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1509 # Files in devo/etc used in any net release.
1510 # ChangeLog omitted because it may refer to files which are not in this
1511 # distribution (perhaps it would be better to include it anyway).
1512 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1513 make-stds.texi standards.
info*
1515 # When you use `make setup-dirs' or `make taz' you should always redefine
1517 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1521 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1522 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1523 # Take out texinfo from a few places; make simple BISON=bison line.
1524 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1525 -e
'/^ install-texinfo /d' \
1526 -e
'/^BISON = `if/,/^$$/d' \
1527 -e
'/^# BISON:/s/.*/BISON = $(DEFAULT_YACC)/' \
1529 mv
-f tmp Makefile.in
1531 $(start-sanitize-Sanitize
)
1532 @if
[ -f .Sanitize
] ; then echo
"RUN Sanitize FIRST!" ; false
; fi
;
1533 $(end-sanitize-Sanitize
)
1535 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1536 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1537 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1538 # Make links, and run "make diststuff" or "make info" when needed.
1539 rm -rf proto-toplev
; mkdir proto-toplev
1540 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1541 for d in
$$dirs ; do \
1542 if
[ -d
$$d ]; then \
1543 if
[ ! -f
$$d/Makefile
] ; then true
; \
1544 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1545 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1546 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1547 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1549 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1550 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1552 ln
-s ..
/$$d proto-toplev
/$$d ; \
1554 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1556 cd etc
; $(MAKE
) info
1559 mkdir proto-toplev
/etc
1560 (cd proto-toplev
/etc
; \
1561 for i in
$(ETC_SUPPORT
); do \
1562 ln
-s ..
/..
/etc
/$$i .
; \
1565 # Take out texinfo from configurable dirs
1566 rm proto-toplev
/configure.in
1567 sed
-e
'/^host_tools=/s/texinfo //' \
1568 <configure.in
>proto-toplev
/configure.in
1570 mkdir proto-toplev
/texinfo
1571 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1572 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1573 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1574 if
test -r texinfo
/util
/tex3patch
; then \
1575 mkdir proto-toplev
/texinfo
/util
&& \
1576 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1578 chmod og
=u
`find . -print`
1579 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) \
1580 VER
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`
1583 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1584 -rm -f
$(TOOL
)-$(VER
)
1585 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1586 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1587 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1589 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1590 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1593 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes setup.com makefile.vms
1594 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1595 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1596 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1598 # The FSF "binutils" release includes gprof and ld.
1599 .PHONY
: binutils.
tar.gz
1600 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof setup.com makefile.vms
1601 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1602 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1603 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1605 .PHONY
: gas
+binutils.
tar.gz
1606 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1607 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1608 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1609 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1611 .PHONY
: libg
++.
tar.gz
1612 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1613 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1614 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1615 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1617 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1618 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1619 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1620 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1623 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils
1624 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1625 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1626 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1627 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1629 .PHONY
: newlib.
tar.gz
1630 NEWLIB_SUPPORT_DIRS
=libgloss
1631 # taz configures for the sun4 target which won't configure newlib.
1632 # We need newlib configured so that the .info files are made.
1633 # Unfortunately, it is not enough to just configure newlib separately:
1634 # taz will build the .info files but since SUBDIRS won't contain newlib,
1635 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1636 # used in building the .info files, eg: *.def, *.ref).
1637 # The problem isn't solvable however without a lot of extra work because
1638 # target libraries are built in subdir $(target_alias) which gets nuked during
1639 # the make distclean. For now punt on the issue of shipping newlib info files
1640 # with newlib net releases and wait for a day when some native target (sun4?)
1641 # supports newlib (if only minimally).
1642 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1643 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1644 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1645 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1650 # start-sanitize-chill
1651 ## This is ugly, but I don't want GNU make to put these variables in
1652 ## the environment. Older makes will see this as a set of targets
1653 ## with no dependencies and no actions.
1654 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1655 # end-sanitize-chill
1657 # end of Makefile.in