blob: 9be94ac0ae925d1ce6f9a4111dc68303d74371a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# Copyright (C) 2013, Linaro Limited.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program 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 for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
#
SHELL = /bin/bash
# The choices for VERSION are mainly:
#
# 'aarch64-port' or 'jdk8'
#
# The latter getting the tip of x86 development.
VERSION ?= aarch64-port
SNAPSHOT_NAME = openjdk8-$(VERSION)-snapshot
SNAPSHOT_URL = http://snapshots.linaro.org/openembedded/sources
SNAPSHOT_TAR_ARCHIVE = $(SNAPSHOT_NAME).tar.bz2
SNAPSHOT_CLASSES_ARCHIVE = $(SNAPSHOT_NAME)-prebuilt-classes.tar.bz2
CLASSES = $(shell shopt -s globstar; echo $(SNAPSHOT_NAME)/**/JTwork/classes)
PRODUCT_HOME=$(PWD)/$(SNAPSHOT_NAME)/build/linux-x86_64-normal-server-release/images/j2sdk-image
export PRODUCT_HOME
JT_HOME=$(PWD)/jtreg-bin/jtreg
export JT_HOME
.PHONY: download explode configure build
all:
@echo "be more explicit"
$(SNAPSHOT_TAR_ARCHIVE):
wget --quiet $(SNAPSHOT_URL)/$(SNAPSHOT_TAR_ARCHIVE)
download: $(SNAPSHOT_TAR_ARCHIVE)
explode:
tar axf $(SNAPSHOT_TAR_ARCHIVE)
configure:
(cd $(SNAPSHOT_NAME); sh configure)
build:
make -C $(SNAPSHOT_NAME) images
clean:
make -C $(SNAPSHOT_NAME) clean
mrproper:
$(RM) -r $(SNAPSHOT_NAME) $(SNAPSHOT_TAR_ARCHIVE) $(SNAPSHOT_CLASSES_ARCHIVE)
test: jdk-default-tests hotspot-tests
jdk-default-tests:
-make -C $(SNAPSHOT_NAME)/jdk/test jdk_beans1
-make -C $(SNAPSHOT_NAME)/jdk/test jdk_io
-make -C $(SNAPSHOT_NAME)/jdk/test jdk_lang
-make -C $(SNAPSHOT_NAME)/jdk/test jdk_math
-make -C $(SNAPSHOT_NAME)/jdk/test jdk_net
-make -C $(SNAPSHOT_NAME)/jdk/test jdk_other
-make -C $(SNAPSHOT_NAME)/jdk/test jdk_security1
-make -C $(SNAPSHOT_NAME)/jdk/test jdk_text
-make -C $(SNAPSHOT_NAME)/jdk/test jdk_time
-make -C $(SNAPSHOT_NAME)/jdk/test jdk_util
hotspot-tests:
-make -C $(SNAPSHOT_NAME)/hotspot/test JT_HOME=$(JT_HOME) TESTDIRS="compiler runtime gc sanity serviceability testlibrary"
.PHONY: archive $(SNAPSHOT_CLASSES_ARCHIVE)
archive:
$(RM) $(SNAPSHOT_CLASSES_ARCHIVE)
$(MAKE) $(SNAPSHOT_CLASSES_ARCHIVE)
$(SNAPSHOT_CLASSES_ARCHIVE):
@echo "Adding class files to $@ from" $(CLASSES)
@(for i in $(CLASSES); do \
tar -uf $@ $$i --transform='s!.*JTwork!$(SNAPSHOT_NAME)/JTwork!' --show-transformed-names; \
done)
@(echo `tar atf $@ | wc -l` "classes archived")
#
# Convenience rule for Jenkins job.
#
it-so: download explode configure build test archive
|