summaryrefslogtreecommitdiffstats
path: root/gcc/Makefile.in
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-25 15:55:01 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-25 15:55:01 +0000
commitb8bd120bd21885d1054cb062e04d0ce48e0fe849 (patch)
tree95d4aaec90834c8e0f73a3ee21377e79db80fc48 /gcc/Makefile.in
parentea38f4be892b22b61a540a102bed374ddb381b9a (diff)
downloadppe42-gcc-b8bd120bd21885d1054cb062e04d0ce48e0fe849.tar.gz
ppe42-gcc-b8bd120bd21885d1054cb062e04d0ce48e0fe849.zip
(clh 9)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202895 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r--gcc/Makefile.in32
1 files changed, 31 insertions, 1 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 8f99a6cfa0b..c1480a4704f 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -308,6 +308,11 @@ write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \
# UNSORTED
# --------
+# Dependency tracking stuff.
+CCDEPMODE = @CCDEPMODE@
+DEPDIR = @DEPDIR@
+depcomp = $(SHELL) $(srcdir)/../depcomp
+
# Some compilers can't handle cc -c blah.c -o foo/blah.o.
# In stage2 and beyond, we force this to "-o $@" since we know we're using gcc.
OUTPUT_OPTION = @OUTPUT_OPTION@
@@ -1071,8 +1076,23 @@ INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
$(CPPINC) $(GMPINC) $(DECNUMINC) $(BACKTRACEINC) \
$(CLOOGINC) $(ISLINC)
+COMPILE.base = $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) -o $@
+ifeq ($(CCDEPMODE),depmode=gcc3)
+# Note a subtlety here: we use $(@D) for the directory part, to make
+# things like the go/%.o rule work properly; but we use $(*F) for the
+# file part, as we just want the file part of the stem, not the entire
+# file name.
+COMPILE = $(COMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(*F).TPo
+POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(*F).TPo $(@D)/$(DEPDIR)/$(*F).Po
+else
+COMPILE = source='$<' object='$@' libtool=no \
+ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) $(COMPILE.base)
+POSTCOMPILE =
+endif
+
.cc.o .c.o:
- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION)
+ $(COMPILE) $<
+ $(POSTCOMPILE)
#
# Support for additional languages (other than C).
@@ -5387,7 +5407,17 @@ po/gcc.pot: force
AWK=$(AWK) $(SHELL) $(srcdir)/po/exgettext \
$(XGETTEXT) gcc $(srcdir)
+#
+
+# Dependency information.
+
# In order for parallel make to really start compiling the expensive
# objects from $(OBJS) as early as possible, build all their
# prerequisites strictly before all objects.
$(ALL_HOST_OBJS) : | $(generated_files)
+
+# Include the auto-generated dependencies for all host objects.
+DEPFILES = \
+ $(foreach obj,$(ALL_HOST_OBJS),\
+ $(dir $(obj))$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $(obj))))
+-include $(DEPFILES)
OpenPOWER on IntegriCloud