# HG changeset patch # User mchung # Date 1409334381 25200 # Node ID 11df1233e1e8cd96f4e1f0e7196e2faa0ac8188f # Parent 311b5e288cf59a0c380b7e38c13c273d64507d6c 8055856: checkdeps build target doesn't work for cross-compilation builds 8056113: [build] tools.jar missing modules.xml Reviewed-by: ihse, erikj diff -r 311b5e288cf5 -r 11df1233e1e8 make/CheckModules.gmk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/CheckModules.gmk Fri Aug 29 10:46:21 2014 -0700 @@ -0,0 +1,46 @@ +# +# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Default target declared first +default: all + +include $(SPEC) +include MakeBase.gmk + +JDEPS_MODULES_XML := $(JDK_OUTPUTDIR)/modules/jdk.dev/com/sun/tools/jdeps/resources/jdeps-modules.xml + +# +# Verify access across module boundaries +# +checkdeps: + $(ECHO) "Checking dependencies across JDK modules" + $(JAVA) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \ + -Djdeps.modules.xml=$(JDEPS_MODULES_XML) \ + com.sun.tools.jdeps.Main \ + -verify:access -mp $(JDK_OUTPUTDIR)/modules + +all: checkdeps + +.PHONY: all diff -r 311b5e288cf5 -r 11df1233e1e8 make/Main.gmk --- a/make/Main.gmk Fri Aug 29 13:30:42 2014 +0200 +++ b/make/Main.gmk Fri Aug 29 10:46:21 2014 -0700 @@ -297,14 +297,10 @@ ################################################################################ # Verification targets -# generate modules.xml in the exploded image -modules-xml: - +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ModulesXml.gmk gen-modules-xml) +verify-modules: + +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CheckModules.gmk) -verify-modules: - +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ModulesXml.gmk checkdeps) - -ALL_TARGETS += modules-xml verify-modules +ALL_TARGETS += verify-modules ################################################################################ # Install targets @@ -389,6 +385,8 @@ # Explicitly add dependencies for special targets java.base-java: unpack-sec + jdk.dev-gendata: java rmic + security-jars: java nashorn-jar: jdk.scripting.nashorn-java @@ -421,9 +419,7 @@ test: exploded-image - modules-xml: build-tools-jdk java - - verify-modules: exploded-image modules-xml + verify-modules: exploded-image endif @@ -460,7 +456,7 @@ ALL_MODULE_TARGETS := $(sort $(GENSRC_MODULES) $(JAVA_MODULES) \ $(GENDATA_MODULES) $(LIB_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES)) -exploded-image: $(ALL_MODULE_TARGETS) modules-xml +exploded-image: $(ALL_MODULE_TARGETS) # The old 'jdk' target most closely matches the new exploded-image. Keep an # alias for ease of use. jdk: exploded-image