diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d2ac0b4 --- /dev/null +++ b/Makefile @@ -0,0 +1,82 @@ +# 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 + +SNAPSHOT_NAME = openjdk8-aarch64-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-tests hotspot-tests + +jdk-tests: + -make -C $(SNAPSHOT_NAME)/jdk/test jdk_default + +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 |