JDK-6717128 : Using relative path for ALT_OUTPUTDIR does not work properly
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs14
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: generic
  • Submitted: 2008-06-20
  • Updated: 2012-10-08
  • Resolved: 2008-07-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u14Fixed 7Fixed hs14Fixed
Related Reports
Relates :  
Description
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.

Comments
EVALUATION Couple things got fixed. 1. Pass the absolute output directory when launching make using os specific makefiles. 2. Don't include defs.make in rules.make to avoid re-evaluation of GAMMADIR, this is to support the incremental build.
2008-06-25