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