Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
2171cce1
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2171cce1
编写于
3月 20, 2013
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8006965: remove test_gamma and add dedicated test_* targets instead
Reviewed-by: kvn, jcoomes
上级
3c0bc693
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
45 addition
and
512 deletion
+45
-512
make/Makefile
make/Makefile
+33
-0
make/bsd/Makefile
make/bsd/Makefile
+0
-21
make/bsd/makefiles/buildtree.make
make/bsd/makefiles/buildtree.make
+3
-121
make/defs.make
make/defs.make
+1
-4
make/linux/Makefile
make/linux/Makefile
+0
-21
make/linux/makefiles/buildtree.make
make/linux/makefiles/buildtree.make
+3
-121
make/solaris/Makefile
make/solaris/Makefile
+0
-12
make/solaris/makefiles/buildtree.make
make/solaris/makefiles/buildtree.make
+5
-126
make/test/Queens.java
make/test/Queens.java
+0
-86
未找到文件。
make/Makefile
浏览文件 @
2171cce1
...
...
@@ -532,6 +532,39 @@ $(JDK_IMAGE_DIR)/jre/lib/rt.jar:
$(TAR)
-cf
-
*
)
|
\
(
$(CD)
$(JDK_IMAGE_DIR)
&&
$(TAR)
-xf
-
)
# Testing the built JVM
RUN_JVM
=
JAVA_HOME
=
$(JDK_IMPORT_PATH)
$(JDK_IMPORT_PATH)
/bin/java
-d
$(ARCH_DATA_MODEL)
-Dsun
.java.launcher
=
gamma
generic_test
:
@
$(ECHO)
"Running with:
$(ALTJVM_DIR)
"
@
$(RUN_JVM)
-XXaltjvm
=
$(ALTJVM_DIR)
-Xinternalversion
@
$(RUN_JVM)
-XXaltjvm
=
$(ALTJVM_DIR)
-showversion
-help
# C2 test targets
test_product test_optimized test_fastdebug test_jvmg
:
@
$(MAKE)
generic_test
ALTJVM_DIR
=
"
$(C2_DIR)
/
$
(@:test_%=%)"
# C1 test targets
test_product1 test_optimized1 test_fastdebug1 test_jvmg1
:
ifeq
($(ARCH_DATA_MODEL), 32)
@$(MAKE) generic_test ALTJVM_DIR="$(C1_DIR)/$(@
:
test_%1=%)"
else
@$(ECHO) "No compiler1 ($(@
:
test_%=%)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
endif
# Zero test targets
test_productzero test_optimizedzero test_fastdebugzero test_jvmgzero
:
@
$(MAKE)
generic_test
ALTJVM_DIR
=
"
$(ZERO_DIR)
/
$
(@:test_%zero=%)"
# Shark test targets
test_productshark test_optimizedshark test_fastdebugshark test_jvmgshark
:
@
$(MAKE)
generic_test
ALTJVM_DIR
=
"
$(SHARK_DIR)
/
$
(@:test_%shark=%)"
# Minimal1 test targets
test_productminimal1 test_optimizedminimal1 test_fastdebugminimal1 test_jvmgminimal1
:
@
$(MAKE)
generic_test
ALTJVM_DIR
=
"
$(MINIMAL1_DIR)
/
$
(@:test_%minimal1=%)"
test_jdk
:
ifeq
($(JVM_VARIANT_CLIENT), true)
$(JDK_IMAGE_DIR)/bin/java
-d$(ARCH_DATA_MODEL)
-client
-Xinternalversion
...
...
make/bsd/Makefile
浏览文件 @
2171cce1
...
...
@@ -299,63 +299,42 @@ platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in
$(TARGETS_C2)
:
$(SUBDIRS_C2)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler2/
$@
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler2/
$@
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler2/
$@
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_TIERED)
:
$(SUBDIRS_TIERED)
cd
$(OSNAME)
_
$(BUILDARCH)
_tiered/
$(
patsubst
%tiered,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_tiered/
$(
patsubst
%tiered,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_tiered/
$(
patsubst
%tiered,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_C1)
:
$(SUBDIRS_C1)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler1/
$(
patsubst
%1,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler1/
$(
patsubst
%1,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler1/
$(
patsubst
%1,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_CORE)
:
$(SUBDIRS_CORE)
cd
$(OSNAME)
_
$(BUILDARCH)
_core/
$(
patsubst
%core,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_core/
$(
patsubst
%core,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_core/
$(
patsubst
%core,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_ZERO)
:
$(SUBDIRS_ZERO)
cd
$(OSNAME)
_
$(VARIANTARCH)
_zero/
$(
patsubst
%zero,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(VARIANTARCH)
_zero/
$(
patsubst
%zero,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(VARIANTARCH)
_zero/
$(
patsubst
%zero,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_SHARK)
:
$(SUBDIRS_SHARK)
cd
$(OSNAME)
_
$(VARIANTARCH)
_shark/
$(
patsubst
%shark,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(VARIANTARCH)
_shark/
$(
patsubst
%shark,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(VARIANTARCH)
_shark/
$(
patsubst
%shark,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_MINIMAL1)
:
$(SUBDIRS_MINIMAL1)
cd
$(OSNAME)
_
$(BUILDARCH)
_minimal1/
$(
patsubst
%minimal1,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_minimal1/
$(
patsubst
%minimal1,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_minimal1/
$(
patsubst
%minimal1,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
...
...
make/bsd/makefiles/buildtree.make
浏览文件 @
2171cce1
...
...
@@ -50,7 +50,6 @@
# jvmti.make - generate JVMTI bindings from the spec (JSR-163)
# sa.make - generate SA jar file and natives
# env.[ck]sh - environment settings
# test_gamma - script to run the Queens program
#
# The makefiles are split this way so that "make foo" will run faster by not
# having to read the dependency files for the vm.
...
...
@@ -67,9 +66,6 @@ include $(GAMMADIR)/make/altsrc.make
# 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
QUIETLY$(MAKE_VERBOSE)
=
@
# For now, until the compiler is less wobbly:
TESTFLAGS
=
-Xbatch
-showversion
ifeq
($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
PLATFORM_FILE
=
$(
shell
dirname
$(
shell
dirname
$(
shell
pwd
)))
/platform_zero
else
...
...
@@ -135,7 +131,7 @@ BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
# dtrace.make is used on BSD versions that implement Dtrace (like MacOS X)
BUILDTREE_TARGETS
=
Makefile flags.make flags_vm.make vm.make adlc.make
\
jvmti.make sa.make dtrace.make
\
env.sh env.csh jdkpath.sh
.dbxrc test_gamma
env.sh env.csh jdkpath.sh
BUILDTREE_VARS
=
GAMMADIR
=
$(GAMMADIR)
OS_FAMILY
=
$(OS_FAMILY)
\
SRCARCH
=
$(SRCARCH)
BUILDARCH
=
$(BUILDARCH)
LIBARCH
=
$(LIBARCH)
VARIANT
=
$(VARIANT)
...
...
@@ -352,7 +348,7 @@ env.sh: $(BUILDTREE_MAKE)
@
echo
Creating
$@
...
$(QUIETLY)
(
\
$(BUILDTREE_COMMENT)
;
\
[
-n
"
$$
JAVA_HOME"
]
&&
{
echo
":
\$
${
JAVA_HOME
:
=
$
${JAVA_HOME}
}
"
;
}
;
\
{
echo
"JAVA_HOME=
$(JDK_IMPORT_PATH)
"
;
}
;
\
{
\
echo
"CLASSPATH=
$
${
CLASSPATH
:+
$$CLASSPATH
:
}
.:
\$
${JAVA_HOME}
/jre/lib/rt.jar:
\$
${JAVA_HOME}
/jre/lib/i18n.jar"
;
\
}
|
sed
s:
$
${
JAVA_HOME
:-
-------
}
:
\$
${JAVA_HOME}
:g
;
\
...
...
@@ -364,8 +360,7 @@ env.csh: env.sh
@
echo
Creating
$@
...
$(QUIETLY)
(
\
$(BUILDTREE_COMMENT)
;
\
[
-n
"
$$
JAVA_HOME"
]
&&
\
{
echo
"if (!
\$
$?
JAVA_HOME) setenv JAVA_HOME
\"
$$
JAVA_HOME
\"
"
;
}
;
\
{
echo
"setenv JAVA_HOME
\"
$(JDK_IMPORT_PATH)
\"
"
;
}
;
\
sed
-n
's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p'
$?
;
\
)
>
$@
...
...
@@ -376,119 +371,6 @@ jdkpath.sh: $(BUILDTREE_MAKE)
echo
"JDK=
${JAVA_HOME}
"
;
\
)
>
$@
.dbxrc
:
$(BUILDTREE_MAKE)
@
echo
Creating
$@
...
$(QUIETLY)
(
\
echo
"echo '# Loading
$(PLATFORM_DIR)
/
$(TARGET)
/.dbxrc'"
;
\
echo
"if [ -f
\"\$
${HOTSPOT_DBXWARE}
\"
]"
;
\
echo
"then"
;
\
echo
" source
\"\$
${HOTSPOT_DBXWARE}
\"
"
;
\
echo
"elif [ -f
\"\$
$HOME
/.dbxrc
\"
]"
;
\
echo
"then"
;
\
echo
" source
\"\$
$HOME
/.dbxrc
\"
"
;
\
echo
"fi"
;
\
)
>
$@
# Skip the test for product builds (which only work when installed in a JDK), to
# avoid exiting with an error and causing make to halt.
NO_TEST_MSG
=
\
echo
"
$@
: skipping the test--this build must be tested in a JDK."
NO_JAVA_HOME_MSG
=
\
echo
"JAVA_HOME must be set to run this test."
DATA_MODE
=
$
(
DATA_MODE/
$(BUILDARCH)
)
JAVA_FLAG
=
$
(
JAVA_FLAG/
$(DATA_MODE)
)
DATA_MODE/
i486
=
32
DATA_MODE/
sparc
=
32
DATA_MODE/
sparcv9
=
64
DATA_MODE/
amd64
=
64
DATA_MODE/
ia64
=
64
DATA_MODE/
zero
=
$(ARCH_DATA_MODEL)
JAVA_FLAG/
32
=
-d32
JAVA_FLAG/
64
=
-d64
WRONG_DATA_MODE_MSG
=
\
echo
"JAVA_HOME must point to a
$(DATA_MODE)
-bit OpenJDK."
CROSS_COMPILING_MSG
=
\
echo
"Cross compiling for ARCH
$(CROSS_COMPILE_ARCH)
, skipping gamma run."
test_gamma
:
$(BUILDTREE_MAKE) $(GAMMADIR)/make/test/Queens.java
@
echo
Creating
$@
...
$(QUIETLY)
(
\
echo
"#!/bin/sh"
;
\
echo
""
;
\
$(BUILDTREE_COMMENT)
;
\
echo
""
;
\
echo
"# Include environment settings for gamma run"
;
\
echo
""
;
\
echo
". ./env.sh"
;
\
echo
""
;
\
echo
"# Do not run gamma test for cross compiles"
;
\
echo
""
;
\
echo
"if [ -n
\"
$(CROSS_COMPILE_ARCH)
\"
]; then "
;
\
echo
"
$(CROSS_COMPILING_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Make sure JAVA_HOME is set as it is required for gamma"
;
\
echo
""
;
\
echo
"if [ -z
\"\$
${JAVA_HOME}
\"
]; then "
;
\
echo
"
$(NO_JAVA_HOME_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Check JAVA_HOME version to be used for the test"
;
\
echo
""
;
\
echo
"
\$
${JAVA_HOME}
/bin/java
$(JAVA_FLAG)
-fullversion > /dev/null 2>&1"
;
\
echo
"if [
\$
$?
-ne 0 ]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"GAMMA_PROG=gamma"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" # Ensure architecture for gamma and JAVA_HOME is the same."
;
\
echo
" # NOTE: gamma assumes the OpenJDK directory layout."
;
\
echo
""
;
\
echo
" GAMMA_ARCH=
\"\`
file
\$
${GAMMA_PROG}
| awk '{print
\$
$NF
}'
\`\"
"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
]; then"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/
$
${LIBARCH}
/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" fi"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
] || [ -z
\"\`
file
\$
${JVM_LIB}
| grep
\$
${GAMMA_ARCH}
\`\"
]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
" fi"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Compile Queens program for test"
;
\
echo
""
;
\
echo
"rm -f Queens.class"
;
\
echo
"
\$
${JAVA_HOME}
/bin/javac -d .
$(GAMMADIR)
/make/test/Queens.java"
;
\
echo
""
;
\
echo
"# Set library path solely for gamma launcher test run"
;
\
echo
""
;
\
echo
"LD_LIBRARY_PATH=.:
$
${
LD_LIBRARY_PATH
:+
$$LD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
"export LD_LIBRARY_PATH"
;
\
echo
"unset LD_LIBRARY_PATH_32"
;
\
echo
"unset LD_LIBRARY_PATH_64"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" DYLD_LIBRARY_PATH=.:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/native_threads:
\$
${JAVA_HOME}
/jre/lib:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
" export DYLD_LIBRARY_PATH"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Use the gamma launcher and JAVA_HOME to run the test"
;
\
echo
""
;
\
echo
"./
\$
${GAMMA_PROG}
$(TESTFLAGS)
Queens < /dev/null"
;
\
)
>
$@
$(QUIETLY)
chmod
+x
$@
FORCE
:
.PHONY
:
all FORCE
make/defs.make
浏览文件 @
2171cce1
...
...
@@ -302,7 +302,7 @@ ifneq ($(OSNAME),windows)
endif
# Required make macro settings for all platforms
MAKE_ARGS
+=
JAVA_HOME
=
$(ABS_BOOTDIR)
MAKE_ARGS
+=
BOOTDIR
=
$(ABS_BOOTDIR)
MAKE_ARGS
+=
OUTPUTDIR=
$(ABS_OUTPUTDIR)
MAKE_ARGS
+=
GAMMADIR=
$(ABS_GAMMADIR)
MAKE_ARGS
+=
MAKE_VERBOSE=
$(MAKE_VERBOSE)
...
...
@@ -337,9 +337,6 @@ EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jni.h
EXPORT_LIST
+=
$(EXPORT_INCLUDE_DIR)
/
$(JDK_INCLUDE_SUBDIR)
/jni_md.h
EXPORT_LIST
+=
$(EXPORT_INCLUDE_DIR)
/jmm.h
# By default, run Queens test after building
TEST_IN_BUILD
?=
true
ifndef
JAVASE_EMBEDDED
EXPORT_LIST
+=
$(EXPORT_INCLUDE_DIR)
/jfr.h
endif
...
...
make/linux/Makefile
浏览文件 @
2171cce1
...
...
@@ -300,63 +300,42 @@ platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in
$(TARGETS_C2)
:
$(SUBDIRS_C2)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler2/
$@
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler2/
$@
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler2/
$@
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_TIERED)
:
$(SUBDIRS_TIERED)
cd
$(OSNAME)
_
$(BUILDARCH)
_tiered/
$(
patsubst
%tiered,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_tiered/
$(
patsubst
%tiered,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_tiered/
$(
patsubst
%tiered,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_C1)
:
$(SUBDIRS_C1)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler1/
$(
patsubst
%1,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler1/
$(
patsubst
%1,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler1/
$(
patsubst
%1,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_CORE)
:
$(SUBDIRS_CORE)
cd
$(OSNAME)
_
$(BUILDARCH)
_core/
$(
patsubst
%core,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_core/
$(
patsubst
%core,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_core/
$(
patsubst
%core,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_ZERO)
:
$(SUBDIRS_ZERO)
cd
$(OSNAME)
_
$(VARIANTARCH)
_zero/
$(
patsubst
%zero,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(VARIANTARCH)
_zero/
$(
patsubst
%zero,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(VARIANTARCH)
_zero/
$(
patsubst
%zero,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_SHARK)
:
$(SUBDIRS_SHARK)
cd
$(OSNAME)
_
$(VARIANTARCH)
_shark/
$(
patsubst
%shark,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(VARIANTARCH)
_shark/
$(
patsubst
%shark,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(VARIANTARCH)
_shark/
$(
patsubst
%shark,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_MINIMAL1)
:
$(SUBDIRS_MINIMAL1)
cd
$(OSNAME)
_
$(BUILDARCH)
_minimal1/
$(
patsubst
%minimal1,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_minimal1/
$(
patsubst
%minimal1,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_minimal1/
$(
patsubst
%minimal1,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
...
...
make/linux/makefiles/buildtree.make
浏览文件 @
2171cce1
...
...
@@ -50,7 +50,6 @@
# jvmti.make - generate JVMTI bindings from the spec (JSR-163)
# sa.make - generate SA jar file and natives
# env.[ck]sh - environment settings
# test_gamma - script to run the Queens program
#
# The makefiles are split this way so that "make foo" will run faster by not
# having to read the dependency files for the vm.
...
...
@@ -64,9 +63,6 @@ include $(GAMMADIR)/make/altsrc.make
# 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
QUIETLY$(MAKE_VERBOSE)
=
@
# For now, until the compiler is less wobbly:
TESTFLAGS
=
-Xbatch
-showversion
ifeq
($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
PLATFORM_FILE
=
$(
shell
dirname
$(
shell
dirname
$(
shell
pwd
)))
/platform_zero
else
...
...
@@ -128,7 +124,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
BUILDTREE_MAKE
=
$(GAMMADIR)
/make/
$(OS_FAMILY)
/makefiles/buildtree.make
BUILDTREE_TARGETS
=
Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make
\
env.sh env.csh jdkpath.sh
.dbxrc test_gamma
env.sh env.csh jdkpath.sh
BUILDTREE_VARS
=
GAMMADIR
=
$(GAMMADIR)
OS_FAMILY
=
$(OS_FAMILY)
\
SRCARCH
=
$(SRCARCH)
BUILDARCH
=
$(BUILDARCH)
LIBARCH
=
$(LIBARCH)
VARIANT
=
$(VARIANT)
...
...
@@ -345,7 +341,7 @@ env.sh: $(BUILDTREE_MAKE)
@
echo
Creating
$@
...
$(QUIETLY)
(
\
$(BUILDTREE_COMMENT)
;
\
[
-n
"
$$
JAVA_HOME"
]
&&
{
echo
":
\$
${
JAVA_HOME
:
=
$
${JAVA_HOME}
}
"
;
}
;
\
{
echo
"JAVA_HOME=
$(JDK_IMPORT_PATH)
"
;
}
;
\
{
\
echo
"CLASSPATH=
$
${
CLASSPATH
:+
$$CLASSPATH
:
}
.:
\$
${JAVA_HOME}
/jre/lib/rt.jar:
\$
${JAVA_HOME}
/jre/lib/i18n.jar"
;
\
}
|
sed
s:
$
${
JAVA_HOME
:-
-------
}
:
\$
${JAVA_HOME}
:g
;
\
...
...
@@ -357,8 +353,7 @@ env.csh: env.sh
@
echo
Creating
$@
...
$(QUIETLY)
(
\
$(BUILDTREE_COMMENT)
;
\
[
-n
"
$$
JAVA_HOME"
]
&&
\
{
echo
"if (!
\$
$?
JAVA_HOME) setenv JAVA_HOME
\"
$$
JAVA_HOME
\"
"
;
}
;
\
{
echo
"setenv JAVA_HOME
\"
$(JDK_IMPORT_PATH)
\"
"
;
}
;
\
sed
-n
's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p'
$?
;
\
)
>
$@
...
...
@@ -369,119 +364,6 @@ jdkpath.sh: $(BUILDTREE_MAKE)
echo
"JDK=
${JAVA_HOME}
"
;
\
)
>
$@
.dbxrc
:
$(BUILDTREE_MAKE)
@
echo
Creating
$@
...
$(QUIETLY)
(
\
echo
"echo '# Loading
$(PLATFORM_DIR)
/
$(TARGET)
/.dbxrc'"
;
\
echo
"if [ -f
\"\$
${HOTSPOT_DBXWARE}
\"
]"
;
\
echo
"then"
;
\
echo
" source
\"\$
${HOTSPOT_DBXWARE}
\"
"
;
\
echo
"elif [ -f
\"\$
$HOME
/.dbxrc
\"
]"
;
\
echo
"then"
;
\
echo
" source
\"\$
$HOME
/.dbxrc
\"
"
;
\
echo
"fi"
;
\
)
>
$@
# Skip the test for product builds (which only work when installed in a JDK), to
# avoid exiting with an error and causing make to halt.
NO_TEST_MSG
=
\
echo
"
$@
: skipping the test--this build must be tested in a JDK."
NO_JAVA_HOME_MSG
=
\
echo
"JAVA_HOME must be set to run this test."
DATA_MODE
=
$
(
DATA_MODE/
$(BUILDARCH)
)
JAVA_FLAG
=
$
(
JAVA_FLAG/
$(DATA_MODE)
)
DATA_MODE/
i486
=
32
DATA_MODE/
sparc
=
32
DATA_MODE/
sparcv9
=
64
DATA_MODE/
amd64
=
64
DATA_MODE/
ia64
=
64
DATA_MODE/
zero
=
$(ARCH_DATA_MODEL)
JAVA_FLAG/
32
=
-d32
JAVA_FLAG/
64
=
-d64
WRONG_DATA_MODE_MSG
=
\
echo
"JAVA_HOME must point to a
$(DATA_MODE)
-bit OpenJDK."
CROSS_COMPILING_MSG
=
\
echo
"Cross compiling for ARCH
$(CROSS_COMPILE_ARCH)
, skipping gamma run."
test_gamma
:
$(BUILDTREE_MAKE) $(GAMMADIR)/make/test/Queens.java
@
echo
Creating
$@
...
$(QUIETLY)
(
\
echo
"#!/bin/sh"
;
\
echo
""
;
\
$(BUILDTREE_COMMENT)
;
\
echo
""
;
\
echo
"# Include environment settings for gamma run"
;
\
echo
""
;
\
echo
". ./env.sh"
;
\
echo
""
;
\
echo
"# Do not run gamma test for cross compiles"
;
\
echo
""
;
\
echo
"if [ -n
\"
$(CROSS_COMPILE_ARCH)
\"
]; then "
;
\
echo
"
$(CROSS_COMPILING_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Make sure JAVA_HOME is set as it is required for gamma"
;
\
echo
""
;
\
echo
"if [ -z
\"\$
${JAVA_HOME}
\"
]; then "
;
\
echo
"
$(NO_JAVA_HOME_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Check JAVA_HOME version to be used for the test"
;
\
echo
""
;
\
echo
"
\$
${JAVA_HOME}
/bin/java
$(JAVA_FLAG)
-fullversion > /dev/null 2>&1"
;
\
echo
"if [
\$
$?
-ne 0 ]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"GAMMA_PROG=gamma"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" # Ensure architecture for gamma and JAVA_HOME is the same."
;
\
echo
" # NOTE: gamma assumes the OpenJDK directory layout."
;
\
echo
""
;
\
echo
" GAMMA_ARCH=
\"\`
file
\$
${GAMMA_PROG}
| awk '{print
\$
$NF
}'
\`\"
"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
]; then"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/
$
${LIBARCH}
/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" fi"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
] || [ -z
\"\`
file
\$
${JVM_LIB}
| grep
\$
${GAMMA_ARCH}
\`\"
]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
" fi"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Compile Queens program for test"
;
\
echo
""
;
\
echo
"rm -f Queens.class"
;
\
echo
"
\$
${JAVA_HOME}
/bin/javac -d .
$(GAMMADIR)
/make/test/Queens.java"
;
\
echo
""
;
\
echo
"# Set library path solely for gamma launcher test run"
;
\
echo
""
;
\
echo
"LD_LIBRARY_PATH=.:
$
${
LD_LIBRARY_PATH
:+
$$LD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
"export LD_LIBRARY_PATH"
;
\
echo
"unset LD_LIBRARY_PATH_32"
;
\
echo
"unset LD_LIBRARY_PATH_64"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" DYLD_LIBRARY_PATH=.:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/native_threads:
\$
${JAVA_HOME}
/jre/lib:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
" export DYLD_LIBRARY_PATH"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Use the gamma launcher and JAVA_HOME to run the test"
;
\
echo
""
;
\
echo
"./
\$
${GAMMA_PROG}
$(TESTFLAGS)
Queens < /dev/null"
;
\
)
>
$@
$(QUIETLY)
chmod
+x
$@
FORCE
:
.PHONY
:
all FORCE
make/solaris/Makefile
浏览文件 @
2171cce1
...
...
@@ -231,36 +231,24 @@ $(SUBDIRS_CORE): $(BUILDTREE_MAKE)
$(TARGETS_C2)
:
$(SUBDIRS_C2)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler2/
$@
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler2/
$@
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler2/
$@
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_TIERED)
:
$(SUBDIRS_TIERED)
cd
$(OSNAME)
_
$(BUILDARCH)
_tiered/
$(
patsubst
%tiered,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_tiered/
$(
patsubst
%tiered,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_tiered/
$(
patsubst
%tiered,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_C1)
:
$(SUBDIRS_C1)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler1/
$(
patsubst
%1,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler1/
$(
patsubst
%1,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_compiler1/
$(
patsubst
%1,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
$(TARGETS_CORE)
:
$(SUBDIRS_CORE)
cd
$(OSNAME)
_
$(BUILDARCH)
_core/
$(
patsubst
%core,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
ifeq
($(TEST_IN_BUILD),true)
cd
$(OSNAME)
_
$(BUILDARCH)
_core/
$(
patsubst
%core,%,
$@
)
&&
./test_gamma
endif
ifdef
INSTALL
cd
$(OSNAME)
_
$(BUILDARCH)
_core/
$(
patsubst
%core,%,
$@
)
&&
$(MAKE)
$(MFLAGS)
install
endif
...
...
make/solaris/makefiles/buildtree.make
浏览文件 @
2171cce1
...
...
@@ -50,21 +50,19 @@
# jvmti.make - generate JVMTI bindings from the spec (JSR-163)
# sa.make - generate SA jar file and natives
# env.[ck]sh - environment settings
# test_gamma - script to run the Queens program
#
# The makefiles are split this way so that "make foo" will run faster by not
# having to read the dependency files for the vm.
-include
$(SPEC)
include
$(GAMMADIR)/make/scm.make
include
$(GAMMADIR)/make/defs.make
include
$(GAMMADIR)/make/altsrc.make
# 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
QUIETLY$(MAKE_VERBOSE)
=
@
# For now, until the compiler is less wobbly:
TESTFLAGS
=
-Xbatch
-Xmx32m
-showversion
### maye ARCH_XXX instead?
ifdef
USE_GCC
PLATFORM_FILE
=
$(GAMMADIR)
/make/
$(OS_FAMILY)
/platform_
$(BUILDARCH)
.gcc
...
...
@@ -119,7 +117,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
BUILDTREE_MAKE
=
$(GAMMADIR)
/make/
$(OS_FAMILY)
/makefiles/buildtree.make
BUILDTREE_TARGETS
=
Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make
\
env.sh env.csh jdkpath.sh
.dbxrc test_gamma
env.sh env.csh jdkpath.sh
BUILDTREE_VARS
=
GAMMADIR
=
$(GAMMADIR)
OS_FAMILY
=
$(OS_FAMILY)
\
ARCH
=
$(ARCH)
BUILDARCH
=
$(BUILDARCH)
LIBARCH
=
$(LIBARCH)
VARIANT
=
$(VARIANT)
...
...
@@ -334,7 +332,7 @@ env.sh: $(BUILDTREE_MAKE)
@
echo
Creating
$@
...
$(QUIETLY)
(
\
$(BUILDTREE_COMMENT)
;
\
[
-n
"
$$
JAVA_HOME"
]
&&
{
echo
":
\$
${
JAVA_HOME
:
=
$
${JAVA_HOME}
}
"
;
}
;
\
{
echo
"JAVA_HOME=
$(JDK_IMPORT_PATH)
"
;
}
;
\
{
\
echo
"CLASSPATH=
$
${
CLASSPATH
:+
$$CLASSPATH
:
}
.:
\$
${JAVA_HOME}
/jre/lib/rt.jar:
\$
${JAVA_HOME}
/jre/lib/i18n.jar"
;
\
}
|
sed
s:
$
${
JAVA_HOME
:-
-------
}
:
\$
${JAVA_HOME}
:g
;
\
...
...
@@ -346,8 +344,7 @@ env.csh: env.sh
@
echo
Creating
$@
...
$(QUIETLY)
(
\
$(BUILDTREE_COMMENT)
;
\
[
-n
"
$$
JAVA_HOME"
]
&&
\
{
echo
"if (!
\$
$?
JAVA_HOME) setenv JAVA_HOME
\"
$$
JAVA_HOME
\"
"
;
}
;
\
{
echo
"setenv JAVA_HOME
\"
$(JDK_IMPORT_PATH)
\"
"
;
}
;
\
sed
-n
's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p'
$?
;
\
)
>
$@
...
...
@@ -358,124 +355,6 @@ jdkpath.sh: $(BUILDTREE_MAKE)
echo
"JDK=
${JAVA_HOME}
"
;
\
)
>
$@
.dbxrc
:
$(BUILDTREE_MAKE)
@
echo
Creating
$@
...
$(QUIETLY)
(
\
echo
"echo '# Loading
$(PLATFORM_DIR)
/
$(TARGET)
/.dbxrc'"
;
\
echo
"if [ -f
\"\$
${HOTSPOT_DBXWARE}
\"
]"
;
\
echo
"then"
;
\
echo
" source
\"\$
${HOTSPOT_DBXWARE}
\"
"
;
\
echo
"elif [ -f
\"\$
$HOME
/.dbxrc
\"
]"
;
\
echo
"then"
;
\
echo
" source
\"\$
$HOME
/.dbxrc
\"
"
;
\
echo
"fi"
;
\
)
>
$@
# Skip the test for product builds (which only work when installed in a JDK), to
# avoid exiting with an error and causing make to halt.
NO_TEST_MSG
=
\
echo
"
$@
: skipping the test--this build must be tested in a JDK."
NO_JAVA_HOME_MSG
=
\
echo
"JAVA_HOME must be set to run this test."
DATA_MODE
=
$
(
DATA_MODE/
$(BUILDARCH)
)
JAVA_FLAG
=
$
(
JAVA_FLAG/
$(DATA_MODE)
)
DATA_MODE/
i486
=
32
DATA_MODE/
sparc
=
32
DATA_MODE/
sparcv9
=
64
DATA_MODE/
amd64
=
64
DATA_MODE/
ia64
=
64
# This bit is needed to enable local rebuilds.
# Unless the makefile itself sets LP64, any environmental
# setting of LP64 will interfere with the build.
LP64_SETTING/
32
=
LP64
=
\#
empty
LP64_SETTING/
64
=
LP64
=
1
JAVA_FLAG/
32
=
-d32
JAVA_FLAG/
64
=
-d64
WRONG_DATA_MODE_MSG
=
\
echo
"JAVA_HOME must point to a
$(DATA_MODE)
-bit OpenJDK."
CROSS_COMPILING_MSG
=
\
echo
"Cross compiling for ARCH
$(CROSS_COMPILE_ARCH)
, skipping gamma run."
test_gamma
:
$(BUILDTREE_MAKE) $(GAMMADIR)/make/test/Queens.java
@
echo
Creating
$@
...
$(QUIETLY)
(
\
echo
"#!/bin/sh"
;
\
echo
""
;
\
$(BUILDTREE_COMMENT)
;
\
echo
""
;
\
echo
"# Include environment settings for gamma run"
;
\
echo
""
;
\
echo
". ./env.sh"
;
\
echo
""
;
\
echo
"# Do not run gamma test for cross compiles"
;
\
echo
""
;
\
echo
"if [ -n
\"
$(CROSS_COMPILE_ARCH)
\"
]; then "
;
\
echo
"
$(CROSS_COMPILING_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Make sure JAVA_HOME is set as it is required for gamma"
;
\
echo
""
;
\
echo
"if [ -z
\"\$
${JAVA_HOME}
\"
]; then "
;
\
echo
"
$(NO_JAVA_HOME_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Check JAVA_HOME version to be used for the test"
;
\
echo
""
;
\
echo
"
\$
${JAVA_HOME}
/bin/java
$(JAVA_FLAG)
-fullversion > /dev/null 2>&1"
;
\
echo
"if [
\$
$?
-ne 0 ]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"GAMMA_PROG=gamma"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" # Ensure architecture for gamma and JAVA_HOME is the same."
;
\
echo
" # NOTE: gamma assumes the OpenJDK directory layout."
;
\
echo
""
;
\
echo
" GAMMA_ARCH=
\"\`
file
\$
${GAMMA_PROG}
| awk '{print
\$
$NF
}'
\`\"
"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
]; then"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/
$
${LIBARCH}
/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" fi"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
] || [ -z
\"\`
file
\$
${JVM_LIB}
| grep
\$
${GAMMA_ARCH}
\`\"
]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
" fi"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Compile Queens program for test"
;
\
echo
""
;
\
echo
"rm -f Queens.class"
;
\
echo
"
\$
${JAVA_HOME}
/bin/javac -d .
$(GAMMADIR)
/make/test/Queens.java"
;
\
echo
""
;
\
echo
"# Set library path solely for gamma launcher test run"
;
\
echo
""
;
\
echo
"LD_LIBRARY_PATH=.:
$
${
LD_LIBRARY_PATH
:+
$$LD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
"export LD_LIBRARY_PATH"
;
\
echo
"unset LD_LIBRARY_PATH_32"
;
\
echo
"unset LD_LIBRARY_PATH_64"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" DYLD_LIBRARY_PATH=.:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/native_threads:
\$
${JAVA_HOME}
/jre/lib:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
" export DYLD_LIBRARY_PATH"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Use the gamma launcher and JAVA_HOME to run the test"
;
\
echo
""
;
\
echo
"./
\$
${GAMMA_PROG}
$(TESTFLAGS)
Queens < /dev/null"
;
\
)
>
$@
$(QUIETLY)
chmod
+x
$@
FORCE
:
.PHONY
:
all FORCE
make/test/Queens.java
已删除
100644 → 0
浏览文件 @
3c0bc693
/*
* Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
import
java.util.*
;
// Copyright 1996, Animorphic Systems
// gri 28 Aug 92 / 15 Jan 93 / 8 Dec 95
class
Queens
{
static
void
try_i
(
boolean
a
[],
boolean
b
[],
boolean
c
[],
int
x
[],
int
i
)
{
int
adj
=
7
;
for
(
int
j
=
1
;
j
<=
8
;
j
++)
{
if
(
b
[
j
]
&&
a
[
i
+
j
]
&&
c
[
adj
+
i
-
j
])
{
x
[
i
]
=
j
;
b
[
j
]
=
false
;
a
[
i
+
j
]
=
false
;
c
[
adj
+
i
-
j
]
=
false
;
if
(
i
<
8
)
try_i
(
a
,
b
,
c
,
x
,
i
+
1
);
else
print
(
x
);
b
[
j
]
=
true
;
a
[
i
+
j
]
=
true
;
c
[
adj
+
i
-
j
]
=
true
;
}
}
}
public
static
void
main
(
String
s
[])
{
boolean
a
[]
=
new
boolean
[
16
+
1
];
boolean
b
[]
=
new
boolean
[
8
+
1
];
boolean
c
[]
=
new
boolean
[
14
+
1
];
int
x
[]
=
new
int
[
8
+
1
];
int
adj
=
7
;
for
(
int
i
=
-
7
;
i
<=
16
;
i
++)
{
if
(
i
>=
1
&&
i
<=
8
)
b
[
i
]
=
true
;
if
(
i
>=
2
)
a
[
i
]
=
true
;
if
(
i
<=
7
)
c
[
adj
+
i
]
=
true
;
}
x
[
0
]
=
0
;
// solution counter
try_i
(
a
,
b
,
c
,
x
,
1
);
}
static
void
print
(
int
x
[])
{
// first correct solution: A1 B5 C8 D6 E3 F7 G2 H4
char
LF
=
(
char
)
0xA
;
char
CR
=
(
char
)
0xD
;
x
[
0
]++;
if
(
x
[
0
]
<
10
)
System
.
out
.
print
(
" "
);
System
.
out
.
print
(
x
[
0
]
+
". "
);
for
(
int
i
=
1
;
i
<=
8
;
i
++)
{
char
p
=
(
char
)(
'A'
+
i
-
1
);
System
.
out
.
print
(
p
);
System
.
out
.
print
(
x
[
i
]
+
" "
);
}
System
.
out
.
println
();
}
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录