--- old/make/common/Defs.gmk 2012-09-06 09:37:39.000000000 -0700 +++ new/make/common/Defs.gmk 2012-09-06 09:37:39.000000000 -0700 @@ -542,6 +542,21 @@ CXXFLAGS_$(VARIANT)/BYFILE = $(CXXFLAGS_$(VARIANT)/$(@F)) \ $(CXXFLAGS_$(VARIANT)$(CXXFLAGS_$(VARIANT)/$(@F))) +# Command line define to provide basename of file being compiled to source. +# The C macro THIS_FILE can replace the use of __FILE__ in the source +# files for the current filename being compiled. +# The value of the __FILE__ macro is unpredictable and can be anything +# from a relative path to a full path, THIS_FILE will be more consistent.. +# The THIS_FILE macro will always be just the basename of the file being +# compiled. +# Different string literals in the the object files makes it difficult to +# compare shared libraries from different builds. +# +# NOTE: If the THIS_FILE macro is actually expanded while in an included +# source file, it will not return the name of the included file. +# +CPP_THIS_FILE = -DTHIS_FILE='"$(