Skip to content
Permalink
Browse files
8256810: Incremental rebuild broken on Macosx
Reviewed-by: mikael, ihse
  • Loading branch information
erikj79 committed Nov 30, 2020
1 parent 02ba519 commit 4c86e46
Showing 1 changed file with 8 additions and 3 deletions.
@@ -237,10 +237,15 @@ ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)-$(FILE_MACRO_CFLAGS), false-)
) \
)

# When compiling with relative paths, the deps file comes out with relative
# paths.
# When compiling with relative paths, the deps file may come out with relative
# paths, and that path may start with './'. First remove any leading ./, then
# add WORKSPACE_ROOT to any line not starting with /, while allowing for
# leading spaces.
define fix-deps-file
$(SED) -e 's|^\([ ]*\)|\1$(WORKSPACE_ROOT)|' $1.tmp > $1
$(SED) \
-e 's|^\([ ]*\)\./|\1|' \
-e '/^[ ]*[^/ ]/s|^\([ ]*\)|\1$(WORKSPACE_ROOT)/|' \
$1.tmp > $1
endef
else
# By default the MakeCommandRelative macro does nothing.

1 comment on commit 4c86e46

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.