* doc/c-alpha.texi: Fix typos.
[deliverable/binutils-gdb.git] / Makefile.tpl
index af547af6867a0c2ebb470db3a5b60d7dd2e659b8..d656c5065d5ad75389ac496569ce0adfe58a7efa 100644 (file)
@@ -112,7 +112,7 @@ INSTALL_DATA = $(INSTALL) -m 644
 AS = @AS@
 AR = @AR@
 AR_FLAGS = rc
-CC = cc
+CC = @CC@
 
 # Special variables passed down in EXTRA_GCC_FLAGS.  They are defined
 # here so that they can be overridden by Makefile fragments.
@@ -120,9 +120,8 @@ BUILD_CC = $(CC_FOR_BUILD)
 BUILD_PREFIX = @BUILD_PREFIX@
 BUILD_PREFIX_1 = @BUILD_PREFIX_1@
 
-# These flag values are normally overridden by the configure script.
-CFLAGS = -g
-CXXFLAGS = -g -O2
+CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
 
 LDFLAGS = 
 LIBCFLAGS = $(CFLAGS)
@@ -137,7 +136,7 @@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
 PICFLAG = 
 PICFLAG_FOR_TARGET = 
 
-CXX = c++
+CXX = @CXX@
 
 # Use -O2 to stress test the compiler.
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
@@ -259,7 +258,6 @@ REALLY_SET_LIB_PATH = \
 # Should be substed by configure.in
 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
 CC_FOR_TARGET = @CC_FOR_TARGET@
-BASE_CC_FOR_TARGET = @BASE_CC_FOR_TARGET@
 CXX_FOR_TARGET = @CXX_FOR_TARGET@
 RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
 CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
@@ -530,14 +528,8 @@ EXTRA_GCC_FLAGS = \
 
 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
 
-# This is a list of the configure targets for all of the modules which
-# are compiled using the target tools.
-CONFIGURE_TARGET_MODULES =[+
-    FOR target_modules +] \
-       configure-target-[+module+][+
-    ENDFOR target_modules +]
-
-configure-target: $(CONFIGURE_TARGET_MODULES)
+configure-host: @configure_host_modules@
+configure-target: @configure_target_modules@
 
 # This is a list of the targets for which we can do a clean-{target}.
 CLEAN_MODULES =[+
@@ -566,6 +558,7 @@ all.normal: @all_build_modules@ \
        @all_host_modules@ \
        @all_target_modules@
 
+all-host: @all_host_modules@
 all-target: @all_target_modules@
 
 # Do a target for all the subdirectories.  A ``make do-X'' will do a
@@ -634,8 +627,9 @@ info: do-info
 installcheck: do-installcheck
 dvi: do-dvi
 
-# Make sure makeinfo is built before we do a `make info'.
-do-info: all-texinfo
+# Make sure makeinfo is built before we do a `make info', if we're
+# in fact building texinfo.
+do-info: maybe-all-texinfo
 
 install-info: do-install-info dir.info
        s=`cd $(srcdir); ${PWD}`; export s; \
@@ -797,7 +791,7 @@ TAGS: do-TAGS
 .PHONY: configure-build-[+module+] maybe-configure-build-[+module+]
 maybe-configure-build-[+module+]:
 configure-build-[+module+]: $(BUILD_SUBDIR)/[+module+]/Makefile
-$(BUILD_SUBDIR)/[+module+]/Makefile: config.status
+@build_prefix@$(BUILD_SUBDIR)/[+module+]/Makefile: config.status
        @[ -d $(BUILD_SUBDIR)/[+module+] ] || mkdir $(BUILD_SUBDIR)/[+module+];\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
@@ -910,7 +904,7 @@ configure-[+module+]: [+module+]/Makefile
 
 .PHONY: all-[+module+] maybe-all-[+module+]
 maybe-all-[+module+]:
-all-[+module+]:
+all-[+module+]: configure-[+module+]
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
@@ -973,7 +967,9 @@ install-[+module+]: installdirs
 maybe-configure-target-[+module+]:
 configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/Makefile
 
-$(TARGET_SUBDIR)/[+module+]/multilib.out: $(BASE_CC_FOR_TARGET)
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/[+module+]/multilib.out: maybe-all-gcc
        @[ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\
        r=`${PWD}`; export r; \
        echo "Configuring multilibs for [+module+]"; \
@@ -1139,16 +1135,22 @@ gcc/Makefile: config.status
          $(HOST_CONFIGARGS) $${srcdiroption} \
          || exit 1
 
+# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that
+# causes trouble.  This wart will be fixed eventually by moving
+# the bootstrap behavior to this file.
 .PHONY: all-gcc maybe-all-gcc
 maybe-all-gcc:
-all-gcc:
-       @if [ -f ./gcc/Makefile ] ; then \
+all-gcc: configure-gcc
+       @if [ -f gcc/stage_last ] ; then \
          r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
+         (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
        else \
-         true; \
+         r=`${PWD}`; export r; \
+         s=`cd $(srcdir); ${PWD}`; export s; \
+         $(SET_LIB_PATH) \
+         (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
        fi
 
 # Building GCC uses some tools for rebuilding "source" files
@@ -1162,7 +1164,7 @@ all-gcc:
 # in parallel.
 #
 .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
-bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap: all-bootstrap
+bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap: all-bootstrap configure-gcc
        @r=`${PWD}`; export r; \
        s=`cd $(srcdir); ${PWD}`; export s; \
        $(SET_LIB_PATH) \
@@ -1215,17 +1217,19 @@ check-gcc:
          true; \
        fi
 
-.PHONY: check-c++
-check-c++:
+.PHONY: check-gcc-c++
+check-gcc-c++:
        @if [ -f ./gcc/Makefile ] ; then \
          r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
          (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
-         $(MAKE) check-target-libstdc++-v3; \
        else \
          true; \
-       fi 
+       fi
+
+.PHONY: check-c++
+check-c++: check-target-libstdc++-v3 check-gcc-c++
 
 .PHONY: install-gcc maybe-install-gcc
 maybe-install-gcc:
@@ -1273,7 +1277,7 @@ gcc-no-fixedincludes:
 
 # Host modules specific to gcc.
 # GCC needs to identify certain tools.
-gcc/Makefile: maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
+configure-gcc: maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
 all-gcc: maybe-all-libiberty maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
 # This is a slightly kludgy method of getting dependencies on 
 # all-build-libiberty correct; it would be better to build it every time.
@@ -1282,15 +1286,15 @@ all-bootstrap: maybe-all-libiberty maybe-all-texinfo maybe-all-bison maybe-all-b
 
 # Host modules specific to gdb.
 # GDB needs to know that the simulator is being built.
-gdb/Makefile: maybe-configure-tcl maybe-configure-tk maybe-configure-sim
+configure-gdb: maybe-configure-tcl maybe-configure-tk maybe-configure-sim
 GDB_TK = @GDB_TK@
 all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
 install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
-libgui/Makefile: maybe-configure-tcl maybe-configure-tk
+configure-libgui: maybe-configure-tcl maybe-configure-tk
 all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
 
 # Host modules specific to binutils.
-bfd/Makefile: configure-libiberty
+configure-bfd: configure-libiberty
 all-bfd: maybe-all-libiberty maybe-all-intl
 all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
 # We put install-opcodes before install-binutils because the installed
@@ -1304,19 +1308,19 @@ all-opcodes: maybe-all-bfd maybe-all-libiberty
 
 # Other host modules in the 'src' repository.
 all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
-expect/Makefile: maybe-configure-tcl maybe-configure-tk
+configure-expect: maybe-configure-tcl maybe-configure-tk
 all-expect: maybe-all-tcl maybe-all-tk
-itcl/Makefile: maybe-configure-tcl maybe-configure-tk
+configure-itcl: maybe-configure-tcl maybe-configure-tk
 all-itcl: maybe-all-tcl maybe-all-tk
 # We put install-tcl before install-itcl because itcl wants to run a
 # program on installation which uses the Tcl libraries.
 install-itcl: maybe-install-tcl
 all-sid: maybe-all-tcl maybe-all-tk
 install-sid: maybe-install-tcl maybe-install-tk
-all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline
-tk/Makefile: maybe-configure-tcl
+all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
+configure-tk: maybe-configure-tcl
 all-tk: maybe-all-tcl
-tix/Makefile: maybe-configure-tcl maybe-configure-tk
+configure-tix: maybe-configure-tcl maybe-configure-tk
 all-tix: maybe-all-tcl maybe-all-tk
 all-texinfo: maybe-all-libiberty
 
@@ -1340,7 +1344,6 @@ all-sed: maybe-all-libiberty
 all-send-pr: maybe-all-prms
 all-snavigator: maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-db maybe-all-grep maybe-all-libgui
 all-tar: maybe-all-libiberty
-all-tclX: maybe-all-tcl maybe-all-tk
 all-uudecode: maybe-all-libiberty
 
 ALL_GCC = maybe-all-gcc
@@ -1348,34 +1351,35 @@ ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
 ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
 
 # Target modules specific to gcc.
-$(TARGET_SUBDIR)/boehm-gc/Makefile: $(ALL_GCC_C) maybe-configure-target-qthreads
-$(TARGET_SUBDIR)/fastjar/Makefile: maybe-configure-target-zlib
+configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
+configure-target-fastjar: maybe-configure-target-zlib
 all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
-$(TARGET_SUBDIR)/libf2c/Makefile: $(ALL_GCC_C)
+configure-target-libf2c: $(ALL_GCC_C)
 all-target-libf2c: maybe-all-target-libiberty
-$(TARGET_SUBDIR)/libffi/Makefile: $(ALL_GCC_C) 
-$(TARGET_SUBDIR)/libjava/Makefile: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
+configure-target-libffi: $(ALL_GCC_C) 
+configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
 all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
-$(TARGET_SUBDIR)/libobjc/Makefile: $(ALL_GCC_C)
+configure-target-libobjc: $(ALL_GCC_C)
 all-target-libobjc: maybe-all-target-libiberty
-$(TARGET_SUBDIR)/libstdc++-v3/Makefile: $(ALL_GCC_C)
+configure-target-libstdc++-v3: $(ALL_GCC_C)
 all-target-libstdc++-v3: maybe-all-target-libiberty
-$(TARGET_SUBDIR)/zlib/Makefile: $(ALL_GCC_C)
+configure-target-zlib: $(ALL_GCC_C)
 
 # Target modules in the 'src' repository.
-$(TARGET_SUBDIR)/examples/Makefile: $(ALL_GCC_C)
-$(TARGET_SUBDIR)/libgloss/Makefile: $(ALL_GCC)
+configure-target-examples: $(ALL_GCC_C)
+configure-target-libgloss: $(ALL_GCC)
 all-target-libgloss: maybe-configure-target-newlib
-$(TARGET_SUBDIR)/libiberty/Makefile: $(ALL_GCC_C)
-$(TARGET_SUBDIR)/libtermcap/Makefile: $(ALL_GCC_C)
-$(TARGET_SUBDIR)/newlib/Makefile: $(ALL_GCC)
-$(TARGET_SUBDIR)/winsup/Makefile: $(ALL_GCC_C)
+configure-target-libiberty: $(ALL_GCC_C)
+configure-target-libtermcap: $(ALL_GCC_C)
+configure-target-newlib: $(ALL_GCC)
+configure-target-rda: $(ALL_GCC_C)
+configure-target-winsup: $(ALL_GCC_C)
 all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
 
 # Other target modules.  Warning, these are not well tested.
-$(TARGET_SUBDIR)/gperf/Makefile: $(ALL_GCC_CXX)
+configure-target-gperf: $(ALL_GCC_CXX)
 all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
-$(TARGET_SUBDIR)/qthreads/Makefile: $(ALL_GCC_C)
+configure-target-qthreads: $(ALL_GCC_C)
 
 # Dependencies of maybe-foo on foo.  These are used because, for example,
 # all-gcc only depends on all-gas if gas is present and being configured.
This page took 0.027208 seconds and 4 git commands to generate.