jdk/makefiles/GenerateClasses.gmk
author ihse
Thu, 10 Oct 2013 15:06:21 +0200
changeset 20547 453837141fac
parent 14231 a0c23c1c010f
child 20884 66f924cdfeb9
permissions -rw-r--r--
8001931: The new build system whitespace cleanup Reviewed-by: tbell, simonis, erikj
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     2
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     4
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    10
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    15
# accompanied this code).
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    16
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    20
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    23
# questions.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    24
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    25
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    26
default: all
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    27
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    28
include $(SPEC)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    29
include MakeBase.gmk
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    30
include RMICompilation.gmk
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    31
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    32
# To ensure the latest stub generator files are picked up from corba repo
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    33
# when available, we need to run with latest rmic version available.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    34
ifneq ($(COMPILE_TYPE), cross)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    35
  RMIC := $(FIXPATH) $(JDK_OUTPUTDIR)/bin/rmic
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    36
endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    37
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    38
CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    39
# NOTE: If the smart javac dependency management is reintroduced, these classes risk
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    40
# interfering with the dependency checking. In that case they will need to be kept separate.
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    41
STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    42
RMIC_GENSRC_DIR := $(JDK_OUTPUTDIR)/gendocsrc_rmic
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    43
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    44
GENCLASSES := 
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    45
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    46
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    47
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    48
# Generate RMI stubs
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    49
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    50
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    51
$(eval $(call SetupRMICompilation,RMI_12, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    52
    CLASSES := sun.rmi.server.Activation$$$$ActivationSystemImpl \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    53
        java.rmi.activation.ActivationGroup \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    54
        com.sun.jndi.rmi.registry.ReferenceWrapper, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    55
    CLASSES_DIR := $(CLASSES_DIR), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    56
    STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    57
    RUN_V12 := true))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    58
GENCLASSES += $(RMI_12)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    59
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    60
$(eval $(call SetupRMICompilation,RMI_11, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    61
    CLASSES := sun.rmi.registry.RegistryImpl \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    62
        sun.rmi.transport.DGCImpl, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    63
    CLASSES_DIR := $(CLASSES_DIR), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    64
    STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    65
    RUN_V11 := true))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    66
GENCLASSES += $(RMI_11)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    67
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    68
# For RMI/IIOP call rmic a second time with -standardPackage option
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    69
# so that *_tie classes are generated in package without the prefix
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    70
# org.omg.stub (6375696)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    71
JMAN_RMI_CLASSES := javax.management.remote.rmi.RMIConnectionImpl \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    72
    javax.management.remote.rmi.RMIServerImpl
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    73
$(eval $(call SetupRMICompilation,RMI_IIOP, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    74
    CLASSES := $(JMAN_RMI_CLASSES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    75
    CLASSES_DIR := $(CLASSES_DIR), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    76
    STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    77
    RUN_V12 := true, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    78
    RUN_IIOP := true, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    79
    RUN_IIOP_STDPKG := true))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    80
GENCLASSES += $(RMI_IIOP)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    81
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    82
# Keep generated RMI/JRMP Stub source files and copy them to RMIC_GENSRC_DIR
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    83
# so that javadoc can include them in the API (4997471)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    84
$(eval $(call SetupRMICompilation,RMI_SRC, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    85
    CLASSES := $(JMAN_RMI_CLASSES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    86
    CLASSES_DIR := $(CLASSES_DIR), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    87
    STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    88
    RUN_V12 := true, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    89
    KEEP_GENERATED := true))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    90
GENCLASSES += $(filter %.java, $(RMI_SRC))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    91
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    92
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    93
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    94
$(RMIC_GENSRC_DIR)/_the.classes.removed: $(GENCLASSES)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    95
	$(FIND) $(RMIC_GENSRC_DIR) -name "*.class" $(FIND_DELETE)
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    96
	$(TOUCH) $@
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    97
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    98
all: $(RMIC_GENSRC_DIR)/_the.classes.removed $(GENCLASSES)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    99
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   100
.PHONY: all