Makefile revision 163
012a352f4b26cfd874db8d06debc495c2303e8b2Bob Halley#
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# Copyright 2010 Sun Microsystems, Inc. All Rights Reserved.
70e5a7403f0e0a3bd292b8287c5fed5772c15270Automatic Updater# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# This code is free software; you can redistribute it and/or modify it
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# under the terms of the GNU General Public License version 2 only, as
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# published by the Free Software Foundation. Sun designates this
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# particular file as subject to the "Classpath" exception as provided
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# by Sun in the LICENSE file that accompanied this code.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# This code is distributed in the hope that it will be useful, but WITHOUT
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# version 2 for more details (a copy is included in the LICENSE file that
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# accompanied this code).
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# You should have received a copy of the GNU General Public License version
b616f6ed69209ab4c87f610b472aeb20760652f2Mark Andrews# 2 along with this work; if not, write to the Free Software Foundation,
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# CA 95054 USA or visit www.sun.com if you need additional information or
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence# have any questions.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# Makefile to run tests from multiple sibling directories
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# Root of the forest that was built
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyTOPDIR=..
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# This makefile depends on the availability of sibling directories.
b897c52f865b2fc4e220e2110b874e59c716456bBob HalleyLANGTOOLS_DIR=$(TOPDIR)/langtools
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceJDK_DIR=$(TOPDIR)/jdk
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence# Macro to run a test target in a subdir
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleydefine SUBDIR_TEST # subdirectory target
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyif [ -d $1 ] ; then \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence if [ -r $1/test/Makefile ] ; then \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence echo "$(MAKE) -C $1/test $2" ; \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence $(MAKE) -C $1/test $2 ; \
fcb54ce0a4f7377486df5bec83b3aa4711bf4131Mark Andrews else \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence echo "ERROR: File does not exist: $1/test/Makefile"; \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence fi; \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrenceelse \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence echo "WARNING: No testing done, directory does not exist: $1"; \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrencefi
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyendef
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence# Test target list for langtools repository
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceLANGTOOLS_TEST_LIST = langtools_jtreg
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews# Test target list for jdk repository
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark AndrewsJDK_TEST_LIST = \
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews jdk_awt \
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews jdk_beans jdk_beans1 jdk_beans2 jdk_beans3 \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley jdk_io \
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence jdk_lang \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence jdk_management jdk_management1 jdk_management2 \
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence jdk_math \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence jdk_misc \
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence jdk_net \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence jdk_nio jdk_nio1 jdk_nio2 jdk_nio3 \
596912ee9ca8eb14d30707ec286ab5d28bd39b3eMark Andrews jdk_rmi \
8319af16557b81eba3277ee67215285f0823b587Mark Andrews jdk_security jdk_security1 jdk_security2 jdk_security3 \
8319af16557b81eba3277ee67215285f0823b587Mark Andrews jdk_swing \
aee5e9cbacd8f88325840b8a498876f4319b0890Mark Andrews jdk_text \
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence jdk_tools jdk_tools1 jdk_tools2 \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence jdk_util
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence# Default test target (everything)
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrenceall: $(JDK_TEST_LIST) $(LANGTOOLS_TEST_LIST)
c32b87bc54abacf95fb3b063d72b7d1855c1643bMichael Graff
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence# Test targets
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence$(LANGTOOLS_TEST_LIST):
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence @$(call SUBDIR_TEST, $(LANGTOOLS_DIR), $(subst langtools_,,$@))
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence$(JDK_TEST_LIST):
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence @$(call SUBDIR_TEST, $(JDK_DIR), $@)
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
b616f6ed69209ab4c87f610b472aeb20760652f2Mark Andrewsclean:
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
2320f230995995595438a9d9301d84931fd266ceMark Andrews################################################################
c427260a8678f2e99a2337fb95ec98d9c9ee8c05Mark Andrews
6dcb47e37f9f0cdb94bdabc3fa157ff07983c590Mark Andrews# Phony targets (e.g. these are not filenames)
6dcb47e37f9f0cdb94bdabc3fa157ff07983c590Mark Andrews.PHONY: all clean $(JDK_TEST_LIST) $(LANGTOOLS_TEST_LIST)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley################################################################
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley