Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8301753

AppendFile/WriteFile has differences between make 3.81 and 4+

XMLWordPrintable

    • b11

        When the AppendFile function in make/common/MakeIO.gmk [1] uses the printf shell function, it needs to append a new line (see attached 8301753.patch). That is what the GNU make file function[2] does:

        "When writing files, text will be written to the file. If text does not already end in a newline a final newline will be written (even if text is the empty string). If the text argument is not given at all, nothing will be written."

        Without this, the use of AppendFile in CreateNewSpec [3] results in a badly formatted spec file (i.e., everything on one line).

        [1] https://github.com/openjdk/jdk/blob/cf68d9fb8e55e461fa717f1443094300de8feacb/make/common/MakeIO.gmk#L270
        [2] https://www.gnu.org/software/make/manual/html_node/File-Function.html
        [3] https://github.com/openjdk/jdk/blob/cf68d9fb8e55e461fa717f1443094300de8feacb/make/RunTestsPrebuilt.gmk#L105

              ihse Magnus Ihse Bursie
              dnsimon Douglas Simon
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: