Makefile revision 1057:2be489f272fc
14Srgrimes# 24Srgrimes# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 34Srgrimes# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 44Srgrimes# 54Srgrimes# This code is free software; you can redistribute it and/or modify it 64Srgrimes# under the terms of the GNU General Public License version 2 only, as 74Srgrimes# published by the Free Software Foundation. Oracle designates this 84Srgrimes# particular file as subject to the "Classpath" exception as provided 94Srgrimes# by Oracle in the LICENSE file that accompanied this code. 104Srgrimes# 114Srgrimes# This code is distributed in the hope that it will be useful, but WITHOUT 124Srgrimes# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 134Srgrimes# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 144Srgrimes# version 2 for more details (a copy is included in the LICENSE file that 154Srgrimes# accompanied this code). 164Srgrimes# 174Srgrimes# You should have received a copy of the GNU General Public License version 184Srgrimes# 2 along with this work; if not, write to the Free Software Foundation, 194Srgrimes# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 204Srgrimes# 214Srgrimes# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 224Srgrimes# or visit www.oracle.com if you need additional information or have any 234Srgrimes# questions. 244Srgrimes# 254Srgrimes 264Srgrimes# 274Srgrimes# Makefile to run tests from multiple sibling directories 284Srgrimes# 294Srgrimes 304Srgrimes# Root of the forest that was built 314SrgrimesTOPDIR=.. 324Srgrimes 334Srgrimes# This makefile depends on the availability of sibling directories. 344SrgrimesLANGTOOLS_DIR=$(TOPDIR)/langtools 354SrgrimesJDK_DIR=$(TOPDIR)/jdk 36619SrgrimesHOTSPOT_DIR=$(TOPDIR)/hotspot 3750477Speter 384Srgrimes# Macro to run a test target in a subdir 394Srgrimesdefine SUBDIR_TEST # subdirectory target 403185Ssosif [ -d $1 ] ; then \ 4119173Sbde if [ -r $1/test/Makefile ] ; then \ 4219173Sbde echo "$(MAKE) -k -C $1/test $2" ; \ 4319173Sbde $(MAKE) -k -C $1/test $2 ; \ 4419173Sbde else \ 453185Ssos echo "ERROR: File does not exist: $1/test/Makefile"; \ 463185Ssos exit 1; \ 473185Ssos fi; \ 483185Ssoselse \ 492913Sache echo "WARNING: No testing done, directory does not exist: $1"; \ 502913Sachefi 5116299Spstendef 5213228Swollman 532056Swollman# Default test target (core) 54110039Sphkdefault: jdk_core langtools_jtreg 552056Swollman 562056Swollman# All testing 5758377Sphkall: jdk_all langtools_all 582056Swollman 5915508Sbde# Test targets 6085835Siwasakilangtools_% : 614180Sbde @$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), JT_JAVA=$(PRODUCT_HOME) JTREG_HOME=$(JT_HOME) TEST="$(subst langtools_,,$@)" $(subst langtools_,,$@)) 6232054Sphk 6332054Sphkjdk_% core_%s svc_%: 6415508Sbde @$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), TEST="$@" $@) 65110039Sphk 66110370Sphkhotspot_%: 67110370Sphk @$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), TEST="$@" $@) 681390Ssos 6992765Salfred################################################################ 7017353Sbde 7140610Sphk# Phony targets (e.g. these are not filenames) 7233690Sphk.PHONY: all clean 7336741Sphk 7436198Sphk################################################################ 7533690Sphk