EscapeHash macro fails with GNU make 4.3 and 4.4

XMLWordPrintable

    • master

        One of the vardep tests is failing when running with GNU make 4.3. I'm not sure if this has any actual consequences for the build, but this behavioral change needs to be investigated and understood. The failing part of the test was originally added in JDK-8169860, so it seems like this was relevant for the docs build.

        Here is the output:

        TestMakeBase.gmk:392:
        *** Wrong contents in vardep file. Stop.

        FAILURE: Wrong contents in vardep file

        Expected: >foo '""' "''" bar \$ORIGIN &#x00a9<

        Actual: >foo '""' "''" bar \$ORIGIN &<

        make[4]: *** [TestMake.gmk:30: make-base] Error 2

        A bit more investigation shows that the contents of the vardep file differ depending on which make version this is run with:

        < VARDEP_TEST_VAR3_old := foo '""' "''" bar \$$ORIGIN &\#x00a9
        ---

        > VARDEP_TEST_VAR3_old := foo '""' "''" bar \$$ORIGIN &#x00a9

        With 4.3, the backslash escape of the # character is lost.

              Assignee:
              Erik Joelsson
              Reporter:
              Erik Joelsson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: