United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6717128 Using relative path for ALT_OUTPUTDIR does not work properly
JDK-6717128 : Using relative path for ALT_OUTPUTDIR does not work properly

Details
Type:
Bug
Submit Date:
2008-06-20
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2008-07-15
Component:
hotspot
OS:
solaris
Sub-Component:
runtime
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs14
Fixed Versions:
hs14 (b01)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

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



Hardware and Software, Engineered to Work Together