make/GenerateModuleDeps.gmk
author erikj
Sat, 16 Jan 2016 13:01:43 +0100
changeset 35008 ef0cd710989f
permissions -rw-r--r--
8146403: Windows build can be faster Reviewed-by: ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35008
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
     1
#
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
     2
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
     4
#
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    10
#
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    15
# accompanied this code).
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    16
#
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    20
#
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    23
# questions.
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    24
#
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    25
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    26
# This file is included from Main.gmk only.
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    27
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    28
include $(SRC_ROOT)/make/common/JavaCompilation.gmk
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    29
include $(SRC_ROOT)/make/common/SetupJavaCompilers.gmk
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    30
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    31
################################################################################
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    32
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    33
$(eval $(call SetupJavaCompilation, BUILD_GENMODULESLIST, \
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    34
    SETUP := BOOT_JAVAC, \
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    35
    SRC := $(JDK_TOPDIR)/make/src/classes, \
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    36
    INCLUDES := build/tools/module, \
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    37
    EXCLUDE_FILES := ImageBuilder.java ModuleArchive.java, \
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    38
    BIN := $(MAKESUPPORT_OUTPUTDIR)/bt_classes_moduleslist, \
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    39
    DISABLE_SJAVAC := true, \
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    40
))
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    41
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    42
TOOL_GENMODULESLIST = $(JAVA_SMALL) \
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    43
    -cp "$(MAKESUPPORT_OUTPUTDIR)/bt_classes_moduleslist" \
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    44
    build.tools.module.GenModulesList
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    45
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    46
MODULES_LIST_FILE := $(MAKESUPPORT_OUTPUTDIR)/modules.list
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    47
# The module deps makefile is used from make/common/Modules.gmk
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    48
MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    49
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    50
$(MODULES_LIST_FILE): $(SRC_ROOT)/modules.xml $(BUILD_GENMODULESLIST)
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    51
	$(TOOL_GENMODULESLIST) -o $@ $(filter %.xml, $^)
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    52
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    53
$(MODULE_DEPS_MAKEFILE): $(MODULES_LIST_FILE)
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    54
	$(CAT) $^ | $(SED) -e 's/^\([^:]*\):/DEPS_\1 :=/g' > $@
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    55
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    56
TARGETS += $(MODULE_DEPS_MAKEFILE)
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    57
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    58
################################################################################
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    59
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    60
# Hook to include the corresponding custom file, if present.
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    61
$(eval $(call IncludeCustomExtension, , GenerateModuleDeps.gmk))
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    62
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    63
# Trigger generation of this file and restart make if it changed.
ef0cd710989f 8146403: Windows build can be faster
erikj
parents:
diff changeset
    64
-include $(MODULE_DEPS_MAKEFILE)