OSDN Git Service

2008-08-06 Thomas Quinot <quinot@adacore.com>
[pf3gnuchains/gcc-fork.git] / libada / Makefile.in
index 5a7bfcc..01759f3 100644 (file)
@@ -21,6 +21,7 @@ all: gnatlib
 # Standard autoconf-set variables.
 SHELL = @SHELL@
 srcdir = @srcdir@
+libdir = @libdir@
 build = @build@
 target = @target@
 prefix = @prefix@
@@ -35,54 +36,42 @@ GNATLIBFLAGS= -W -Wall -gnatpg
 THREAD_KIND=native
 TRACE=no
 LDFLAGS=
-STAGE_PREFIX=
 
 # The tedious process of getting CFLAGS right.
 CFLAGS=-g
 LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-GCC_WARN_CFLAGS = $(LOOSE_WARN) $(NOCOMMON_FLAG)
-
-ADA_CFLAGS=
-T_ADA_CFLAGS=
-# HPPA is literally the only target which sets X_ADA_CFLAGS
-X_ADA_CFLAGS=@x_ada_cflags@
-ALL_ADA_CFLAGS=$(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
-
-# For finding the GCC build dir, which is used far too much
-GCC_DIR=../../$(HOST_SUBDIR)/gcc
-# Include fragment generated by GCC configure.
-include $(GCC_DIR)/libada-mk
+GCC_WARN_CFLAGS = $(LOOSE_WARN)
+WARN_CFLAGS = @warn_cflags@
 
 TARGET_LIBGCC2_CFLAGS=
 GNATLIBCFLAGS= -g -O2
-# Get target-specific overrides for TARGET_LIBGCC2_CFLAGS
-# and possibly GNATLIBCFLAGS.  Currently this uses files
-# in gcc/config.  The 'subst' call is used to rerelativize them
-# from their gcc locations.  This is hackery, but there isn't
-# yet a better way to do this.
-tmake_file=$(subst /config,/../gcc/config,$(gcc_tmake_file))
-ifneq ($(tmake_file),)
-include $(tmake_file)
-endif
 
+# Get target-specific overrides for TARGET_LIBGCC2_CFLAGS.
+host_subdir = @host_subdir@
+GCC_DIR=../../$(host_subdir)/gcc
+include $(GCC_DIR)/libgcc.mvars
+
+# exeext should not be used because it's the *host* exeext.  We're building
+# a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
+# definitions just in case something slips through the safety net provided
+# by recursive make invocations in gcc/ada/Makefile.in
 FLAGS_TO_PASS = \
         "MAKEOVERRIDES=" \
         "LDFLAGS=$(LDFLAGS)" \
         "LN_S=$(LN_S)" \
         "SHELL=$(SHELL)" \
-        "exeext=$(exeext)" \
         "objext=$(objext)" \
         "prefix=$(prefix)" \
-        "STAGE_PREFIX=$(STAGE_PREFIX)" \
-       "CC=$(host_cc_for_libada)" \
+        "exeext=.exeext.should.not.be.used " \
+       'CC=the.host.compiler.should.not.be.needed' \
        "GCC_FOR_TARGET=$(CC)" \
         "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
 
 # Rules to build gnatlib.
-.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared
+.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared oscons
 gnatlib: @default_gnatlib_target@
 
-gnatlib-plain: $(GCC_DIR)/ada/Makefile
+gnatlib-plain: oscons $(GCC_DIR)/ada/Makefile
        test -f stamp-libada || \
        $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
          GNATLIBFLAGS="$(GNATLIBFLAGS)" \
@@ -93,7 +82,7 @@ gnatlib-plain: $(GCC_DIR)/ada/Makefile
          gnatlib \
        && touch stamp-libada
 
-gnatlib-sjlj gnatlib-zcx gnatlib-shared: $(GCC_DIR)/ada/Makefile
+gnatlib-sjlj gnatlib-zcx gnatlib-shared: oscons $(GCC_DIR)/ada/Makefile
        test -f stamp-libada || \
        $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
          GNATLIBFLAGS="$(GNATLIBFLAGS)" \
@@ -104,6 +93,10 @@ gnatlib-sjlj gnatlib-zcx gnatlib-shared: $(GCC_DIR)/ada/Makefile
          $@ \
        && touch stamp-libada
 
+oscons:
+       $(MAKE) -C $(GCC_DIR) THREAD_KIND="$(THREAD_KIND)" \
+         $(FLAGS_TO_PASS) ada/s-oscons.ads
+
 # Check uninstalled version.
 check:
 
@@ -130,6 +123,8 @@ install:
 
 install-info:
 
+install-pdf:
+
 install-html:
 
 # Cleaning rules.
@@ -151,7 +146,8 @@ Makefile: $(srcdir)/Makefile.in config.status
 config.status: $(srcdir)/configure
        $(SHELL) ./config.status --recheck
 
-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac \
+       $(srcdir)/../config/acx.m4 $(srcdir)/../config/override.m4
        cd $(srcdir) && autoconf
 
 # Don't export variables to the environment, in order to not confuse