提交 855b2d51 编写于 作者: E erikj

8011687: Support correct dependencies from header files on windows and solaris

Reviewed-by: tbell
上级 d9476d56
...@@ -681,6 +681,7 @@ LIBRARY_PREFIX ...@@ -681,6 +681,7 @@ LIBRARY_PREFIX
STATIC_LIBRARY STATIC_LIBRARY
SHARED_LIBRARY SHARED_LIBRARY
OBJ_SUFFIX OBJ_SUFFIX
COMPILER_NAME
LIPO LIPO
ac_ct_OBJDUMP ac_ct_OBJDUMP
OBJDUMP OBJDUMP
...@@ -3774,7 +3775,7 @@ fi ...@@ -3774,7 +3775,7 @@ fi
#CUSTOM_AUTOCONF_INCLUDE #CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks: # Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1367502345 DATE_WHEN_GENERATED=1367502949
############################################################################### ###############################################################################
# #
...@@ -28805,6 +28806,7 @@ fi ...@@ -28805,6 +28806,7 @@ fi
# The (cross) compiler is now configured, we can now test capabilities # The (cross) compiler is now configured, we can now test capabilities
# of the target platform. # of the target platform.
...@@ -300,6 +300,7 @@ MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@ ...@@ -300,6 +300,7 @@ MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
# CC is gcc and others behaving reasonably similar. # CC is gcc and others behaving reasonably similar.
# CL is cl.exe only. # CL is cl.exe only.
COMPILER_TYPE:=@COMPILER_TYPE@ COMPILER_TYPE:=@COMPILER_TYPE@
COMPILER_NAME:=@COMPILER_NAME@
COMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@ COMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@
......
...@@ -573,6 +573,7 @@ else ...@@ -573,6 +573,7 @@ else
fi fi
fi fi
AC_SUBST(COMPILER_NAME)
AC_SUBST(OBJ_SUFFIX) AC_SUBST(OBJ_SUFFIX)
AC_SUBST(SHARED_LIBRARY) AC_SUBST(SHARED_LIBRARY)
AC_SUBST(STATIC_LIBRARY) AC_SUBST(STATIC_LIBRARY)
......
...@@ -95,10 +95,28 @@ define add_native_source ...@@ -95,10 +95,28 @@ define add_native_source
$$($1_$2_OBJ) : $2 $$($1_$2_OBJ) : $2
ifeq ($(COMPILER_TYPE),CC) ifeq ($(COMPILER_TYPE),CC)
$$(call COMPILING_MSG,$2,$$($1_TARGET)) $$(call COMPILING_MSG,$2,$$($1_TARGET))
# The Sun studio compiler doesn't output the full path to the object file in the
# generated deps files. Fixing it with sed. If compiling assembly, don't try this.
ifeq ($(COMPILER_NAME)$$(filter %.s,$2),ossc)
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP).tmp $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
$(SED) 's|^$$(@F):|$$@:|' $$($1_$2_DEP).tmp > $$($1_$2_DEP)
else
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
endif endif
endif
# The Visual Studio compiler lacks a feature for generating make dependencies, but by
# setting -showIncludes, all included files are printed. These are filtered out and
# parsed into make dependences.
ifeq ($(COMPILER_TYPE),CL) ifeq ($(COMPILER_TYPE),CL)
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEBUG_OUT_FLAGS) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 $$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 | $(TEE) $$($1_$2_DEP).raw | $(GREP) -v "^Note: including file:"
($(ECHO) $$@: \\ \
&& $(SED) -e '/^Note: including file:/!d' \
-e 's|Note: including file: *||' \
-e 's|\\|/|g' \
-e 's|^\([a-zA-Z]\):|/cygdrive/\1|g' \
-e '/$(subst /,\/,$(TOPDIR))/!d' \
-e 's|$$$$| \\|g' \
$$($1_$2_DEP).raw) > $$($1_$2_DEP)
endif endif
endif endif
endef endef
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册