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

Introduce SetupTarget in Main.gmk



    • Enhancement
    • Resolution: Fixed
    • P3
    • 15
    • 15
    • infrastructure
    • b23


      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.


        Issue Links



              ihse Magnus Ihse Bursie
              ihse Magnus Ihse Bursie
              0 Vote for this issue
              1 Start watching this issue