On 15/02/2013 6:24 PM, Mani Sarkar wrote:
Hi David,
Thanks for coming back with a response. My apologies for not being very
clear on what I'm trying to achieve here.
Basically my goal is to be able to populate an environment variable in
any OS say in linux, that gives me the location of the any artefact
under the build folder. For our case I'll select Hotspot, which would
look like the below:
export
HOTSPOT_BINARY_LOC=$TL_FOREST_FOLDER/build/$OPENJDK_RELEASE_NAME/hotspot/$OS_PLATFORM_COMPILER_FOLDER/$BUILD_TYPE
As you can see we have a number of variables here, I have the value of
the first one, i.e. $TL_FOREST_FOLDER, how do I determine the values for
the four other parts of the path
$OPENJDK_RELEASE_NAME
$OS_PLATFORM_COMPILER_FOLDER
$BUILD_TYPE
In my case a typical build path looks like
/home/openjdk/sources/jdk8_tl/build/*linux-x86_64-normal-server-release*/hotspot/*linux_amd64_compiler2*/*product*/
So I have three variables which I would like to determine after running
configure but before building any project using the make command.
Does this make it any clearer? Basically I wish to access the
environment variables you create (if it works that way) after the
configure command.
The configure command doesn't create environment variables it sets make
variables (into spec.gmk and hotspot-spec.gmk, and the path you list
consists of pieces that come from many different places:
> $OPENJDK_RELEASE_NAME
Simplest thing is for you to define this by naming the configuration or
running configure from that directory.
> $OS_PLATFORM_COMPILER_FOLDER
You would have to create this the same was as hotspot by building it up
from OS, architecture and whether doing client/server/minimal VM build.
This is non-trivial in general but maybe easier depending on your
platform. The VM part is hard because depending on the make target
invoked, or the value of JVM_VARIANTS, different VMs will be built. But
as you will have used --with-jvm-variants as a configure arg you should
know what to look for: client=compiler1, server=compiler2 etc
> $BUILD_TYPE
Partially inferrable from --with-debug-level=XXX:
- release -> product
- debug -> debug
- fastdebug -> fastdebug
but I don't think the other variants are exposed at the configure level.
HTH
David
Thanks.
Cheers,
Mani
On Fri, Feb 15, 2013 at 7:06 AM, David Holmes <david.hol...@oracle.com
<mailto:david.hol...@oracle.com>> wrote:
On 15/02/2013 10:55 AM, Mani Sarkar wrote:
Hi all again,
I did some searching in the OpenJDK folders and found the below
notations:
*$(CONF_NAME)* in the below line in one of the make files:
@$(PRINTF) "Building $(PRODUCT_NAME) for target '$(call
GetRealTarget)' in
configuration '$(CONF_NAME)'\n\n"
You can name a configuration anything you want. There is a configure
option for it --with-conf-name
And the below from another one:
*$(OSNAME)_$(BUILDARCH)___compiler2*
*$(OUTPUTDIR)/$(VM_PLATFORM)___compiler2*
How could we parse these outside the make file to get some value
that I
could use (provided we have run configure). Do these flags
expect other
flags to be set before they can be parsed?
I'm not quite sure what you are asking.
David
Thanks.
Cheers,
mani
On Thu, Feb 14, 2013 at 7:09 PM, Mani Sarkar
<sadhak...@gmail.com <mailto:sadhak...@gmail.com>> wrote:
Hi,
I had asked a query [1] long ago in line with the different
builds types
when build the OpenJDK project or sub-projects. I have
another query
related to it - i.e. is there a way to determine what type
of build you are
currently configured for? Is there an OS environment
variable that contains
one of the following after we run configure:
debug
fastdebug
generated
jvmg
optimized
product
profiles
My other query with regards to the folder '*
linux-x86_64-normal-server-__release*/' under the main
/build folder. The
naming is OS, CPU and other factors dependant, is there a
way to determine
through an OS environment variable or through calling a
script what name
the folder would get when a build was successful?
Any suggestions leading to answers to the above would be highly
appreciated.
Thanks.
Cheers
mani
[1]
http://www.mail-archive.com/__build-dev@openjdk.java.net/__msg07325.html
<http://www.mail-archive.com/build-dev@openjdk.java.net/msg07325.html>
--
*Twitter:* @theNeomatrix369
*Blog:* http://neomatrix369.wordpress.__com
<http://neomatrix369.wordpress.com>
*JUG activity:* LJC Advocate
*Meet-a-Project:* https://github.com/__MutabilityDetector
<https://github.com/MutabilityDetector>
*Come to Devoxx UK 2013:*
http://www.devoxx.com/display/__UK13/Home
<http://www.devoxx.com/display/UK13/Home>
*Don't chase success, rather aim for "Excellence", and
success will come
chasing after you!*
--
*Twitter:* @theNeomatrix369
*Blog:* http://neomatrix369.wordpress.com
*JUG activity:* LJC Advocate
*Meet-a-Project:* https://github.com/MutabilityDetector
*Come to Devoxx UK 2013:* http://www.devoxx.com/display/UK13/Home
*/Don't chase success, rather aim for "Excellence", and success will
come chasing after you!/*