annotate make/common/RMICompilation.gmk @ 51872:0ce279d8c9cd

8207941: javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java fails on machines without Arial font [testbug] Reviewed-by: goetz, psadhukhan
author mbaesken
date Tue, 24 Jul 2018 09:27:42 +0200
parents e0a88439f971
children dd5c64326027
rev   line source
erikj@13133 1 #
ihse@27592 2 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
erikj@13133 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
erikj@13133 4 #
erikj@13133 5 # This code is free software; you can redistribute it and/or modify it
erikj@13133 6 # under the terms of the GNU General Public License version 2 only, as
erikj@13133 7 # published by the Free Software Foundation. Oracle designates this
erikj@13133 8 # particular file as subject to the "Classpath" exception as provided
erikj@13133 9 # by Oracle in the LICENSE file that accompanied this code.
erikj@13133 10 #
erikj@13133 11 # This code is distributed in the hope that it will be useful, but WITHOUT
erikj@13133 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
erikj@13133 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
erikj@13133 14 # version 2 for more details (a copy is included in the LICENSE file that
erikj@13133 15 # accompanied this code).
erikj@13133 16 #
erikj@13133 17 # You should have received a copy of the GNU General Public License version
erikj@13133 18 # 2 along with this work; if not, write to the Free Software Foundation,
erikj@13133 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
erikj@13133 20 #
erikj@13133 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
erikj@13133 22 # or visit www.oracle.com if you need additional information or have any
erikj@13133 23 # questions.
erikj@13133 24 #
erikj@13133 25
ihse@27592 26 # Setup make rules for creating an RMI compilation.
ihse@27592 27 #
ihse@27592 28 # Parameter 1 is the name of the rule. This name is used as variable prefix,
ihse@27592 29 # and the targets generated are listed in a variable by that name.
ihse@27592 30 #
ihse@27592 31 # Remaining parameters are named arguments. These include:
ihse@27592 32 # CLASSES:=List of classes to generate stubs for
ihse@27592 33 # CLASSES_DIR:=Directory where to look for classes
ihse@27592 34 # STUB_CLASSES_DIR:=Directory in where to put stub classes
ihse@27592 35 # RUN_V11:=Set to run rmic with -v1.1
ihse@27592 36 # RUN_V12:=Set to run rmic with -v1.2
ihse@27592 37 # KEEP_GENERATED:=Set to keep generated sources around
erikj@29312 38 SetupRMICompilation = $(NamedParamsMacroTemplate)
erikj@29312 39 define SetupRMICompilationBody
erikj@13133 40
erikj@20636 41 $1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/_the.$1_rmic.generated
erikj@13133 42
ihse@20363 43 $1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES))
ihse@20363 44 $1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH)))
ihse@20363 45 $1_STUB_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Stub.class,$$($1_CLASSES_SLASH)))
ihse@20363 46 $1_TARGETS := $$($1_STUB_FILES)
ihse@20363 47 $1_ARGS :=
ihse@20363 48 ifneq (,$$($1_RUN_V11))
ihse@20363 49 $1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH)))
ihse@20363 50 $1_TARGETS += $$($1_SKEL_FILES)
ihse@20363 51 $1_ARGS += -v1.1
ihse@20363 52 endif
ihse@20363 53 ifneq (,$$($1_RUN_V12))
ihse@20363 54 $1_ARGS += -v1.2
ihse@20363 55 endif
erikj@13133 56
ihse@20363 57 $1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f))
ihse@20363 58 $1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
ihse@20363 59 $1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
erikj@13133 60
ihse@20363 61 ifneq (,$$($1_KEEP_GENERATED))
ihse@20363 62 $1_ARGS += -keepgenerated
ihse@20363 63 $1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
ihse@20363 64 endif
erikj@13133 65
ihse@20363 66 $1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES))
erikj@13133 67
ihse@20363 68 $$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES)
erikj@13133 69
ihse@20363 70 $$($1_DEP_FILE): $$($1_CLASS_FILES)
erikj@35008 71 $$(call LogInfo, Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES))
erikj@35008 72 $$(call MakeDir, $$($1_STUB_CLASSES_DIR))
ihse@27595 73 $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
ihse@27595 74 -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
erikj@13133 75 if [ "x$$($1_ARGS2)" != "x" ]; then \
ihse@20363 76 $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \
ihse@20363 77 $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
ihse@20363 78 -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
erikj@35008 79 fi; \
erikj@20636 80 $(TOUCH) $$@
erikj@13133 81
erikj@13133 82
erikj@20636 83 $1 := $$($1_TARGETS) $$($1_DEP_FILE)
erikj@13133 84
erikj@13133 85 endef