make/CompileInterimLangtools.gmk
author sundar
Wed, 27 Sep 2017 18:40:37 +0530
changeset 47277 69c3639a49a6
parent 47217 72e3ae9a25eb
child 47364 6b3389375f31
permissions -rw-r--r--
8188023: Avoid -source and -target javac options in nashorn ant compilation Reviewed-by: jlaskey, hannesw
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     1
#
44457
0cca46f400f7 8177484: The old standard doclet should be deprecated for removal.
jjg
parents: 41448
diff changeset
     2
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     4
#
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    10
#
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    15
# accompanied this code).
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    16
#
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    20
#
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    23
# questions.
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    24
#
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    25
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    26
# This must be the first rule
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    27
default: all
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    28
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    29
include $(SPEC)
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    30
include MakeBase.gmk
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    31
include JavaCompilation.gmk
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    32
include SetupJavaCompilers.gmk
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    33
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    34
################################################################################
40596
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents: 36526
diff changeset
    35
# Setup the rules to build interim langtools, which is compiled by the boot
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    36
# javac and can be run on the boot jdk. This will be used to compile
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    37
# the rest of the product. Each module is compiled separately to allow a modular
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    38
# boot jdk to override system classes using -Xoverride:.
14270
520b95b5d99d 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    39
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    40
# Param 1 - Name of module to compile
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    41
# Param 2 - Name of modules to depend on
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    42
define SetupInterimModule
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    43
  $$(eval $$(call SetupJavaCompilation,BUILD_INTERIM_$(strip $1), \
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    44
      SETUP := BOOT_JAVAC, \
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    45
      DISABLE_SJAVAC := true, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    46
      SRC := $(TOPDIR)/src/$(strip $1)/share/classes \
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    47
          $$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)), \
40596
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents: 36526
diff changeset
    48
      EXCLUDES := sun com/sun/tools/jdeps com/sun/tools/javap \
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents: 36526
diff changeset
    49
          com/sun/tools/jdeprscan, \
44457
0cca46f400f7 8177484: The old standard doclet should be deprecated for removal.
jjg
parents: 41448
diff changeset
    50
      EXCLUDE_FILES := module-info.java JavacToolProvider.java \
0cca46f400f7 8177484: The old standard doclet should be deprecated for removal.
jjg
parents: 41448
diff changeset
    51
	  JavadocToolProvider.java Standard.java, \
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    52
      COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    53
      BIN := $(BUILDTOOLS_OUTPUTDIR)/override_modules/$(strip $1), \
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    54
      ADD_JAVAC_FLAGS := -Xbootclasspath/p:$$(call PathList, \
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    55
          $$(foreach m, $2, $(BUILDTOOLS_OUTPUTDIR)/override_modules/$$m)), \
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    56
  ))
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    57
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    58
  $$(BUILD_INTERIM_$(strip $1)): $$(foreach m, $2, $$(BUILD_INTERIM_$(strip $$m)))
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    59
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    60
  TARGETS += $$(BUILD_INTERIM_$(strip $1))
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    61
endef
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    62
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    63
$(eval $(call SetupInterimModule, java.compiler))
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    64
$(eval $(call SetupInterimModule, jdk.compiler, java.compiler))
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    65
$(eval $(call SetupInterimModule, jdk.jdeps, jdk.compiler java.compiler))
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    66
$(eval $(call SetupInterimModule, jdk.javadoc, java.compiler jdk.compiler))
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    67
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    68
all: $(TARGETS)