2014-08-21 10:22:42 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
|
|
|
ifndef _MODULES_GMK
|
|
|
|
_MODULES_GMK := 1
|
|
|
|
|
2015-11-24 11:18:24 +00:00
|
|
|
################################################################################
|
|
|
|
# Some platforms don't have the serviceability agent
|
|
|
|
ifeq ($(INCLUDE_SA), false)
|
|
|
|
MODULES_FILTER += jdk.hotspot.agent
|
|
|
|
endif
|
|
|
|
|
2014-08-21 10:22:42 +00:00
|
|
|
################################################################################
|
|
|
|
# Module list macros
|
|
|
|
|
|
|
|
ALL_TOP_SRC_DIRS := \
|
2015-10-08 21:31:14 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/src \
|
2014-08-21 10:22:42 +00:00
|
|
|
$(JDK_TOPDIR)/src \
|
|
|
|
$(LANGTOOLS_TOPDIR)/src \
|
|
|
|
$(CORBA_TOPDIR)/src \
|
|
|
|
$(JAXP_TOPDIR)/src \
|
|
|
|
$(JAXWS_TOPDIR)/src \
|
|
|
|
$(NASHORN_TOPDIR)/src \
|
|
|
|
#
|
|
|
|
|
|
|
|
# Find all modules with java sources by looking in the source dirs
|
|
|
|
define FindJavaModules
|
2015-05-06 09:15:27 +00:00
|
|
|
$(filter-out $(MODULES_FILTER), $(sort $(notdir \
|
2014-08-21 10:22:42 +00:00
|
|
|
$(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir \
|
|
|
|
$(wildcard $(patsubst %,%/*/share/classes/*, $(ALL_TOP_SRC_DIRS)) \
|
2014-11-21 15:05:46 +00:00
|
|
|
$(patsubst %,%/*/$(OPENJDK_TARGET_OS)/classes/*, $(ALL_TOP_SRC_DIRS)) \
|
2015-12-23 10:12:12 +00:00
|
|
|
$(patsubst %,%/*/$(OPENJDK_TARGET_OS_TYPE)/classes/*, $(ALL_TOP_SRC_DIRS))))))))))))
|
2014-08-21 10:22:42 +00:00
|
|
|
endef
|
|
|
|
|
2014-09-16 10:08:04 +00:00
|
|
|
# Find all modules with source for the target platform.
|
|
|
|
define FindAllModules
|
2015-05-06 09:15:27 +00:00
|
|
|
$(sort $(filter-out $(MODULES_FILTER) closed demo sample, \
|
|
|
|
$(notdir $(patsubst %/,%, $(dir \
|
2014-09-16 10:08:04 +00:00
|
|
|
$(wildcard $(patsubst %, %/*/share, $(ALL_TOP_SRC_DIRS)) \
|
|
|
|
$(patsubst %, %/*/$(OPENJDK_TARGET_OS), $(ALL_TOP_SRC_DIRS)) \
|
2015-12-23 10:12:12 +00:00
|
|
|
$(patsubst %, %/*/$(OPENJDK_TARGET_OS_TYPE), $(ALL_TOP_SRC_DIRS))))))))
|
2014-09-16 10:08:04 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
################################################################################
|
2016-01-16 12:01:43 +00:00
|
|
|
# The module deps makefile is generated in make/GenerateModuleDeps.gmk
|
2014-09-16 10:08:04 +00:00
|
|
|
MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk
|
2014-08-21 10:22:42 +00:00
|
|
|
-include $(MODULE_DEPS_MAKEFILE)
|
|
|
|
|
|
|
|
# Param 1: Module to find deps for
|
|
|
|
define FindDepsForModule
|
|
|
|
$(DEPS_$(strip $1))
|
|
|
|
endef
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# Hook to include the corresponding custom file, if present.
|
|
|
|
$(eval $(call IncludeCustomExtension, , common/Modules.gmk))
|
|
|
|
|
|
|
|
endif # _MODULES_GMK
|