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

DependOnVariable macro fails on empty value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 16
    • 16
    • infrastructure
    • None
    • b07

      The DependOnVariable macro fails if the variable is empty. The failure is rather non intuitive as it complains that the vardeps file doesn't exist and is needed for the target.

      DependOnVariable works by creating a file that contains the value of a variable, and only recreates the file if it either doesn't exist yet, or the value of the variable has changed since last time. This makes it possible to have make targets depend on this file and so get rebuilt if a variable value has changed.

      The problem here is that the macro doesn't handle empty variable values gracefully.

      Another issue discovered while investigating this is that the automatically generated file name for the vardeps file is using TOPDIR instead of WORKSPACE_ROOT to rewrite a path from absolute to relative. This causes custom makefile extensions using this macro to potentially generate very strange and deep file paths.

            erikj Erik Joelsson
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: