Erik:
Please review this small fix to property cleaning. We normally build
on Solaris (11.1) machines with gnu tools installed, including gnu sed
so this has not affected official Oracle builds or JPRT. However, we
cannot rely on gnu sed always being present so the build should be
correct even with Solaris sed. The problem in this case is that
Solaris sed ignores the last input line unless it is terminated by a
newline character. The fix is to add an empty echo after the cat. The
sed expression is already filtering out empty lines so the final
output will not be changed.
I have verified that the affected lines no longer disappears when
using Solaris sed.
Looks good to me.
Tim
Bug: https://bugs.openjdk.java.net/browse/JDK-8072950
Patch inline:
diff --git a/make/common/JavaCompilation.gmk
b/make/common/JavaCompilation.gmk
--- a/make/common/JavaCompilation.gmk
+++ b/make/common/JavaCompilation.gmk
@@ -362,6 +362,10 @@
# This is the new clean standard. Though it is to be superseded by
# a standard annotation processor from with sjavac.
#
+# An empty echo ensures that the input to sed always ends with a
newline.
+# Certain implementations (e.g. Solaris) will skip the last line without
+# it.
+#
# The sed expression does this:
# 1. Add a backslash before any :, = or ! that do not have a
backslash already.
# 2. Apply the file unicode2x.sed which does a whole bunch of \u00XX
to \xXX
@@ -384,7 +388,7 @@
# Now we can setup the depency that will trigger the copying.
$$($1_BIN)$$($2_TARGET) : $2
$(MKDIR) -p $$(@D)
- export LC_ALL=C ; $(CAT) $$< \
+ export LC_ALL=C ; ( $(CAT) $$< && $(ECHO) "" ) \
| $(SED) -e 's/\([^\\]\):/\1\\:/g' -e
's/\([^\\]\)=/\1\\=/g' \
-e 's/\([^\\]\)!/\1\\!/g' -e 's/#.*/#/g' \
| $(SED) -f "$(SRC_ROOT)/make/common/support/unicode2x.sed" \