diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-10-04 16:22:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-10-04 16:22:37 +0000 |
commit | ca2ce3b317d2a38bfacca0de136ab4d776448230 (patch) | |
tree | f504d7ff8bdcb3fa7aed0bb0c1571adbb9ce0b9b /Makefile.in | |
parent | 243b35d7a17bda288ac7dadfcbbddf1dbdf299c5 (diff) | |
download | gdb-ca2ce3b317d2a38bfacca0de136ab4d776448230.zip gdb-ca2ce3b317d2a38bfacca0de136ab4d776448230.tar.gz gdb-ca2ce3b317d2a38bfacca0de136ab4d776448230.tar.bz2 |
* configure: If CC and CXX are not set in the environment, set
them, based on either an existing Makefile or on searching for gcc
in PATH. Substitute for CC and CXX in Makefile.
* configure.in: Remove libm from target_libs. Separate
target_configdirs from configdirs. If CC is not set in
environment, try to get it from a host Makefile fragment. Rewrite
changes of configdirs to use skipdirs instead. A few minor
tweaks. Take directories out of target_configdirs as they are
taken out of configdirs. Remove existing Makefile files from
subdirectories. Substitute for TARGET_CONFIGDIRS and
CONFIG_ARGUMENTS in Makefile.
* Makefile.in (TARGET_CONFIGDIRS): New variable, automatically set
by configure.in.
(CONFIG_ARGUMENTS): Likewise.
(CONFIGURE_TARGET_MODULES): New variable.
($(DO_X)): Loop over TARGET_CONFIGDIRS as well as SUBDIRS.
($(CONFIGURE_TARGET_MODULES)): New target.
(configure-libg++, configure-libio): New targets.
(all-libg++): Depend upon configure-libg++.
(all-libio): Depend upon configure-libio.
(configure-libgloss, all-libgloss): New targets.
(configure-libstdc++): New target.
(all-libstdc++): Depend upon configure-libstdc++.
(configure-librx, all-librx): New targets.
(configure-newlib): New target.
(all-newlib): Depend upon configure-newlib
(configure-xiberty): New target.
(all-xiberty): Depend upon configure-xiberty.
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 95 |
1 files changed, 70 insertions, 25 deletions
diff --git a/Makefile.in b/Makefile.in index 07bc681..96d5f30 100644 --- a/Makefile.in +++ b/Makefile.in @@ -133,6 +133,13 @@ CXX_FOR_BUILD = $(CXX) SUBDIRS = "this is set via configure, don't edit this" OTHERS = +# This is set by the configure script to the list of directories which +# should be built using the target tools. +TARGET_CONFIGDIRS = xiberty libgloss newlib libio librx libstdc++ libg++ + +# This is set by the configure script to the arguments passed to configure. +CONFIG_ARGUMENTS = + ALL = all.normal INSTALL_TARGET = install-dirs \ $(INSTALL_MODULES) \ @@ -536,9 +543,6 @@ INSTALL_X11_MODULES = \ # This is a list of the targets for all of the modules which are compiled # using $(TARGET_FLAGS_TO_PASS). ALL_TARGET_MODULES = \ - $(start-sanitize-chill) \ - all-chillrt \ - $(end-sanitize-chill) \ all-libio \ all-libstdc++ \ all-librx \ @@ -547,12 +551,20 @@ ALL_TARGET_MODULES = \ all-libgloss \ all-xiberty +# This is a list of the configure targets for all of the modules which +# are compiled using the target tools. +CONFIGURE_TARGET_MODULES = \ + configure-libio \ + configure-libstdc++ \ + configure-librx \ + configure-libg++ \ + configure-newlib \ + configure-libgloss \ + configure-xiberty + # This is a list of the check targets for all of the modules which are # compiled using $(TARGET_FLAGS_TO_PASS). CHECK_TARGET_MODULES = \ - $(start-sanitize-chill) \ - check-chillrt \ - $(end-sanitize-chill) \ check-libio \ check-libstdc++ \ check-libg++ \ @@ -562,9 +574,6 @@ CHECK_TARGET_MODULES = \ # This is a list of the install targets for all of the modules which are # compiled using $(TARGET_FLAGS_TO_PASS). INSTALL_TARGET_MODULES = \ - $(start-sanitize-chill) \ - install-chillrt \ - $(end-sanitize-chill) \ install-libio \ install-libstdc++ \ install-libg++ \ @@ -575,9 +584,6 @@ INSTALL_TARGET_MODULES = \ # This is a shell case of all modules which are compiled using # $(TARGET_FLAGS_TO_PASS), used in the do-X rule. TARGET_LIBS = libio | libstdc++ | librx | libg++ | newlib | xiberty -# start-sanitize-chill -TARGET_LIBS = chillrt | libio | libstdc++ | librx | libg++ | newlib | xiberty -# end-sanitize-chill # The first rule in the file had better be this one. Don't put any above it. all: all.normal @@ -606,14 +612,14 @@ DO_X = \ do-install-info \ do-installcheck \ do-mostlyclean \ - do-realclean \ + do-maintainer-clean \ do-TAGS .PHONY: $(DO_X) $(DO_X): @target=`echo $@ | sed -e 's/^do-//'`; \ r=`pwd`; export r; \ srcroot=`cd $(srcdir); pwd`; export srcroot; \ - for i in $(SUBDIRS); do \ + for i in $(SUBDIRS) $(TARGET_CONFIGDIRS); do \ if [ -f ./$$i/Makefile ]; then \ case $$i in \ $(TARGET_LIBS) ) \ @@ -645,7 +651,8 @@ $(DO_X): # Here are the targets which correspond to the do-X targets. .PHONY: info installcheck dvi install-info -.PHONY: clean distclean mostlyclean realclean local-clean local-distclean +.PHONY: clean distclean mostlyclean maintainer-clean realclean +.PHONY: local-clean local-distclean local-maintainer-clean info: do-info installcheck: do-installcheck dvi: do-dvi @@ -662,10 +669,16 @@ local-clean: local-distclean: -rm -f Makefile config.status +local-maintainer-clean: + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + clean: do-clean local-clean mostlyclean: do-mostlyclean local-clean distclean: do-distclean local-clean local-distclean -realclean: do-realclean local-clean local-distclean +maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean +maintainer-clean: local-distclean +realclean: maintainer-clean # Check target. @@ -795,6 +808,31 @@ $(INSTALL_MODULES): install-dirs true; \ fi +# This rule is used to configure the modules which are built with the +# target tools. +.PHONY: $(CONFIGURE_TARGET_MODULES) +$(CONFIGURE_TARGET_MODULES): + @dir=`echo $@ | sed -e 's/configure-//'`; \ + if [ -f ./$${dir}/Makefile ] ; then \ + true; \ + elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ + if [ -d ./$${dir} ]; then true; else mkdir $${dir}; fi; \ + r=`pwd`; export r; \ + srcroot=`cd $(srcdir); pwd`; export srcroot; \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + cd $${dir}; \ + $${srcroot}/configure $(CONFIG_ARGUMENTS) --srcdir=$${srcroot}/$${dir}; \ + else \ + true; \ + fi + # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS. # To build a target all-X means to cd to X and make all. .PHONY: $(ALL_TARGET_MODULES) @@ -931,9 +969,6 @@ all-autoconf: all-m4 all-bfd: all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc all-byacc: -# start-sanitize-chill -all-chillrt: all-binutils all-gas all-gcc all-newlib -# end-sanitize-chill all-cvs: all-dejagnu: all-tcl all-expect all-tk all-diff: all-libiberty @@ -957,14 +992,22 @@ all-hello: all-libiberty all-indent: all-ispell: all-emacs19 all-ld: all-libiberty all-bfd all-byacc all-flex -all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio all-librx all-libstdc++ -all-libio: all-gas all-ld all-gcc all-xiberty all-newlib +configure-libg++: all-gcc +all-libg++: configure-libg++ all-gas all-ld all-gcc all-xiberty all-newlib all-libio all-librx all-libstdc++ +configure-libgloss: all-gcc +all-libgloss: configure-libgloss +configure-libio: all-gcc +all-libio: configure-libio all-gas all-ld all-gcc all-xiberty all-newlib all-libiberty: -all-libstdc++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio +configure-librx: all-gcc all-newlib +all-librx: configure-librx +configure-libstdc++: all-gcc +all-libstdc++: configure-libstdc++ all-gas all-ld all-gcc all-xiberty all-newlib all-libio all-m4: all-libiberty all-make: all-libiberty all-mmalloc: -all-newlib: all-binutils all-gas all-gcc +configure-newlib: all-gcc +all-newlib: configure-newlib all-binutils all-gas all-gcc all-opcodes: all-bfd all-patch: all-prms: all-libiberty @@ -985,7 +1028,8 @@ all-tgas: all-libiberty all-bfd all-time: all-wdiff: all-uudecode: all-libiberty -all-xiberty: all-gcc all-ld all-newlib +configure-xiberty: all-gcc +all-xiberty: configure-xiberty all-gcc all-ld all-newlib ### other supporting targets @@ -1178,9 +1222,10 @@ gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats .PHONY: gdb.tar.gz GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils +GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi` gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb $(MAKE) -f Makefile.in taz TOOL=gdb \ - SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" + SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)" .PHONY: newlib.tar.gz NEWLIB_SUPPORT_DIRS=libgloss |