Problems with ALT_OUTPUTDIR in debug build
volker.simonis at gmail.com
Thu Jan 10 10:44:17 UTC 2008
there seems to be a problem with the handling of ALT_OUTPUTDIR for debug and
fastdebug builds. The top-level makefile contains the following definitions:
@$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'`
$(MAKE) $(COMMON_DEBUG_FLAGS) setup build
@$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'`
As you can see, it always sets the value of ALT_OUTPUTDIR to
"$(_OUTPUTDIR)-$(DEBUG_NAME)" where _OUTPUTDIR is the default value of the
output directory which is defined in "jdk/make/common/shared/Defs-control.gmk"
as follows (i.e. "linux-i586" on x86/Linux):
# Default output directory
Shouldn't COMMON_DEBUG_FLAGS use $(OUTPUTDIR) instead of $(_OUTPUTDIR) or
am I missing something.
It is also quite confusing that the build always creates
$(OUTPUTDIR)-fastdebug subdirectories, no matter if we do a fastdebug build or
not. I think that only the directories should be created which are used later
on for the build. If I do for example "make debug_build" without specifying
"ALT_OUTPUT_DIR", make will create four output directories as follows:
in the build directory, while the output only goes to "linux-i586-debug".
What are the "-fastdebug"-directories (especially
"linux-i586-debug-fastdebug") good for?
If I do "make debug_build ALT_OUTPUTDIR=/build/xxx" the build creates:
but the output goes to "linux-i586-debug" as in the previous case.
If we fix the top-level Makefile as suggested above, we'll get:
with all the output going to "xxx-debug". That seems much better, but
still we have three unused directories!
In my eyes, the cleanest solution would be if ALT_OUTPUTDIR would be honoured
"as is", as the output directory for everything we built, without anything
appended to it. So the developer should be free to choose whatever he wants as
the output directory. And there should be no additional directories created.
More information about the build-dev