Makefile revision 328
337fc9e235877b459e389f54daf9833bbc645439anish#
337fc9e235877b459e389f54daf9833bbc645439anish# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
337fc9e235877b459e389f54daf9833bbc645439anish# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
337fc9e235877b459e389f54daf9833bbc645439anish#
337fc9e235877b459e389f54daf9833bbc645439anish# This code is free software; you can redistribute it and/or modify it
337fc9e235877b459e389f54daf9833bbc645439anish# under the terms of the GNU General Public License version 2 only, as
337fc9e235877b459e389f54daf9833bbc645439anish# published by the Free Software Foundation. Oracle designates this
337fc9e235877b459e389f54daf9833bbc645439anish# particular file as subject to the "Classpath" exception as provided
337fc9e235877b459e389f54daf9833bbc645439anish# by Oracle in the LICENSE file that accompanied this code.
337fc9e235877b459e389f54daf9833bbc645439anish#
337fc9e235877b459e389f54daf9833bbc645439anish# This code is distributed in the hope that it will be useful, but WITHOUT
337fc9e235877b459e389f54daf9833bbc645439anish# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
337fc9e235877b459e389f54daf9833bbc645439anish# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
337fc9e235877b459e389f54daf9833bbc645439anish# version 2 for more details (a copy is included in the LICENSE file that
337fc9e235877b459e389f54daf9833bbc645439anish# accompanied this code).
337fc9e235877b459e389f54daf9833bbc645439anish#
337fc9e235877b459e389f54daf9833bbc645439anish# You should have received a copy of the GNU General Public License version
337fc9e235877b459e389f54daf9833bbc645439anish# 2 along with this work; if not, write to the Free Software Foundation,
337fc9e235877b459e389f54daf9833bbc645439anish# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
337fc9e235877b459e389f54daf9833bbc645439anish#
337fc9e235877b459e389f54daf9833bbc645439anish# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
337fc9e235877b459e389f54daf9833bbc645439anish# or visit www.oracle.com if you need additional information or have any
337fc9e235877b459e389f54daf9833bbc645439anish# questions.
fc51f9bbbff02dbd8c3adf640b1a184ceeb58fa5Krishna Elango#
337fc9e235877b459e389f54daf9833bbc645439anish
337fc9e235877b459e389f54daf9833bbc645439anish#
337fc9e235877b459e389f54daf9833bbc645439anish# Makefile to run tests from multiple sibling directories
337fc9e235877b459e389f54daf9833bbc645439anish#
337fc9e235877b459e389f54daf9833bbc645439anish
337fc9e235877b459e389f54daf9833bbc645439anish# Root of the forest that was built
337fc9e235877b459e389f54daf9833bbc645439anishTOPDIR=..
337fc9e235877b459e389f54daf9833bbc645439anish
337fc9e235877b459e389f54daf9833bbc645439anish# This makefile depends on the availability of sibling directories.
337fc9e235877b459e389f54daf9833bbc645439anishLANGTOOLS_DIR=$(TOPDIR)/langtools
337fc9e235877b459e389f54daf9833bbc645439anishJDK_DIR=$(TOPDIR)/jdk
337fc9e235877b459e389f54daf9833bbc645439anish
337fc9e235877b459e389f54daf9833bbc645439anish# Macro to run a test target in a subdir
337fc9e235877b459e389f54daf9833bbc645439anishdefine SUBDIR_TEST # subdirectory target
337fc9e235877b459e389f54daf9833bbc645439anishif [ -d $1 ] ; then \
337fc9e235877b459e389f54daf9833bbc645439anish if [ -r $1/test/Makefile ] ; then \
337fc9e235877b459e389f54daf9833bbc645439anish echo "$(MAKE) -C $1/test $2" ; \
337fc9e235877b459e389f54daf9833bbc645439anish $(MAKE) -C $1/test $2 ; \
269473047d747f7815af570197e4ef7322d3632cEvan Yan else \
269473047d747f7815af570197e4ef7322d3632cEvan Yan echo "ERROR: File does not exist: $1/test/Makefile"; \
269473047d747f7815af570197e4ef7322d3632cEvan Yan exit 1; \
269473047d747f7815af570197e4ef7322d3632cEvan Yan fi; \
337fc9e235877b459e389f54daf9833bbc645439anishelse \
337fc9e235877b459e389f54daf9833bbc645439anish echo "WARNING: No testing done, directory does not exist: $1"; \
337fc9e235877b459e389f54daf9833bbc645439anishfi
337fc9e235877b459e389f54daf9833bbc645439anishendef
337fc9e235877b459e389f54daf9833bbc645439anish
337fc9e235877b459e389f54daf9833bbc645439anish# Test target list for langtools repository
337fc9e235877b459e389f54daf9833bbc645439anishLANGTOOLS_TEST_LIST = langtools_jtreg
269473047d747f7815af570197e4ef7322d3632cEvan Yan
269473047d747f7815af570197e4ef7322d3632cEvan Yan# Test target list for jdk repository
269473047d747f7815af570197e4ef7322d3632cEvan YanJDK_TEST_LIST = \
269473047d747f7815af570197e4ef7322d3632cEvan Yan jdk_beans1 jdk_beans2 jdk_beans3 \
fc51f9bbbff02dbd8c3adf640b1a184ceeb58fa5Krishna Elango jdk_io \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_lang \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_management1 jdk_management2 \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_math \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_misc \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_net \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_nio1 jdk_nio2 jdk_nio3 \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_security1 jdk_security2 jdk_security3 \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_text \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_tools1 jdk_tools2 \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_util
337fc9e235877b459e389f54daf9833bbc645439anish
337fc9e235877b459e389f54daf9833bbc645439anish# These tests need a DISPLAY and can create window interaction complications
337fc9e235877b459e389f54daf9833bbc645439anishJDK_TEST_LIST2 = \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_awt \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_rmi \
337fc9e235877b459e389f54daf9833bbc645439anish jdk_swing
337fc9e235877b459e389f54daf9833bbc645439anish
337fc9e235877b459e389f54daf9833bbc645439anish# Default test target (everything)
337fc9e235877b459e389f54daf9833bbc645439anishall: $(JDK_TEST_LIST) $(LANGTOOLS_TEST_LIST)
337fc9e235877b459e389f54daf9833bbc645439anish
337fc9e235877b459e389f54daf9833bbc645439anish# Test targets
337fc9e235877b459e389f54daf9833bbc645439anish$(LANGTOOLS_TEST_LIST):
337fc9e235877b459e389f54daf9833bbc645439anish @$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), $(subst langtools_,,$@))
337fc9e235877b459e389f54daf9833bbc645439anish$(JDK_TEST_LIST) $(JDK_TEST_LIST2):
337fc9e235877b459e389f54daf9833bbc645439anish @$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), $@)
337fc9e235877b459e389f54daf9833bbc645439anish
337fc9e235877b459e389f54daf9833bbc645439anishclean:
337fc9e235877b459e389f54daf9833bbc645439anish
337fc9e235877b459e389f54daf9833bbc645439anish################################################################
337fc9e235877b459e389f54daf9833bbc645439anish
337fc9e235877b459e389f54daf9833bbc645439anish# Phony targets (e.g. these are not filenames)
337fc9e235877b459e389f54daf9833bbc645439anish.PHONY: all clean $(JDK_TEST_LIST) $(LANGTOOLS_TEST_LIST)
################################################################