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

Using relative path for ALT_OUTPUTDIR does not work properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • hs14
    • hs14
    • hotspot
    • b01
    • generic
    • solaris

        When using relative path to specify ALT_OUTPUTDIR which contains where you want the generated files go, it will generate a redudant directory which contains nothing. This is because $(hotspot workspace)/make/defs.make is included twice, one is in the top level Makefile and the other is included in the os specific Makefile. When it is included in the os level Makefile, the working directory is the real ALT_OUTPUTDIR and there is a statement in defs.make to find out the absolute output directory (ABS_OUTPUTDIR) which makes OUTPUTDIR directory if OUTPUTDIR is still relative path.

        The fix is to pass OUTPUTDIR=$(ABS_OUTPUTDIR) to MAKE_ARGS when launching make with the os level makefile. That will fix it.

        Alone with the above fix, we should also avoid including defs.make from rules.make which will break the build when doing incremental build under the output directory. This is also due to the way we define GAMMADIR in defs.make. Unless GAMMADIR is specified in the make command which is true when building from the make directory, it will be re-evaluated by traversing the directory to find src directory. This of course will not work when building from the output directory.

              xlu Xiaobin Lu (Inactive)
              xlu Xiaobin Lu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: