Makefile revision 166
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Copyright 2010 Sun Microsystems, Inc. All Rights Reserved.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# This code is free software; you can redistribute it and/or modify it
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# under the terms of the GNU General Public License version 2 only, as
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# published by the Free Software Foundation. Sun designates this
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# particular file as subject to the "Classpath" exception as provided
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# by Sun in the LICENSE file that accompanied this code.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# This code is distributed in the hope that it will be useful, but WITHOUT
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# version 2 for more details (a copy is included in the LICENSE file that
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# accompanied this code).
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# You should have received a copy of the GNU General Public License version
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# 2 along with this work; if not, write to the Free Software Foundation,
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# CA 95054 USA or visit www.sun.com if you need additional information or
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# have any questions.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Makefile to run tests from multiple sibling directories
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Root of the forest that was built
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncTOPDIR=..
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# This makefile depends on the availability of sibling directories.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncLANGTOOLS_DIR=$(TOPDIR)/langtools
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncJDK_DIR=$(TOPDIR)/jdk
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Macro to run a test target in a subdir
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncdefine SUBDIR_TEST # subdirectory target
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncif [ -d $1 ] ; then \
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync if [ -r $1/test/Makefile ] ; then \
echo "$(MAKE) -C $1/test $2" ; \
$(MAKE) -C $1/test $2 ; \
else \
echo "ERROR: File does not exist: $1/test/Makefile"; \
exit 1; \
fi; \
else \
echo "WARNING: No testing done, directory does not exist: $1"; \
fi
endef
# Test target list for langtools repository
LANGTOOLS_TEST_LIST = langtools_jtreg
# Test target list for jdk repository
JDK_TEST_LIST = \
jdk_awt \
jdk_beans jdk_beans1 jdk_beans2 jdk_beans3 \
jdk_io \
jdk_lang \
jdk_management jdk_management1 jdk_management2 \
jdk_math \
jdk_misc \
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)
################################################################