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

Introduce SetupTarget in Main.gmk

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: infrastructure
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b23

      Description

      To be able to support JDK-8244410, we need to have a better way to handle dependencies. For this reason, the macro SetupTarget is introduced. It will take as input everything that is needed to create a top-level target in Main.gmk.

      As a positive side-effect, it will finally once again be possible to list the dependencies for a rule together with the recipe, fixing a shortcoming that has plagues Main.gmk for a long time.

      In this patch, I create a trivial version of SetupTarget, and switch trivial recipes to use this function. By this, I mean recipes that just delegate to another makefile, possible setting a specific target and/or make arguments. Specifically, this excludes generated target patterns, as for the module phases.

      Trivial dependencies are also moved into this function. By this, I mean "literal" dependencies. Dependencies that are calculated using variables or macros might change if they are moved around in the file, and need a more thorough analysis before they can be moved.

      My intention is to contine moving targets in Main.gmk into the scope of SetupTarget, but to avoid regressions and difficult code reviews, I will do this step by step.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ihse Magnus Ihse Bursie
              Reporter:
              ihse Magnus Ihse Bursie
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: