make/ZipSource.gmk
author dlong
Wed, 21 Oct 2015 18:05:45 -0400
changeset 33459 9d377e6f0e4c
parent 28600 09dd1740f176
child 41658 14de1ab85d25
permissions -rw-r--r--
8140267: assert(is_native_ptr || alias_type->adr_type() == TypeOopPtr::BOTTOM || alias_type->field() != __null || alias_type->element() != __null) failed: field, array element or unknown Summary: back out 8136473 Reviewed-by: twisti
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     1
#
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     2
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     4
#
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    10
#
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    15
# accompanied this code).
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    16
#
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    20
#
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    23
# questions.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    24
#
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    25
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    26
default: all
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    27
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    28
include $(SPEC)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    29
include MakeBase.gmk
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    30
include JavaCompilation.gmk
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    31
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    32
# Hook to include the corresponding custom file, if present.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    33
$(eval $(call IncludeCustomExtension, , ZipSource.gmk))
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    34
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    35
################################################################################
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    36
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    37
# Use ?= to enable override in custom makefile
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    38
SRC_ZIP_INCLUDES ?= \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    39
    com \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    40
    java \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    41
    javax \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    42
    jdk \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    43
    org \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    44
    sun \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    45
    #
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    46
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    47
SRC_ZIP_EXCLUDES ?=
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    48
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    49
SRC_ZIP_SRCS += $(wildcard \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    50
    $(JDK_TOPDIR)/src/*/share/classes \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    51
    $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    52
    $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_API_DIR)/classes \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    53
    $(LANGTOOLS_TOPDIR)/src/*/share/classes \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    54
    $(CORBA_TOPDIR)/src/*/share/classes \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    55
    $(JAXP_TOPDIR)/src/*/share/classes \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    56
    $(JAXWS_TOPDIR)/src/*/share/classes \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    57
    $(SUPPORT_OUTPUTDIR)/gensrc/j* \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    58
    $(SUPPORT_OUTPUTDIR)/rmic/j* \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    59
    ) \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    60
    #
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    61
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    62
# Need to copy launcher src files into desired directory structure
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    63
# before zipping the sources.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    64
$(eval $(call SetupCopyFiles,COPY_LAUNCHER_SRC, \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    65
    SRC := $(JDK_TOPDIR)/src/java.base, \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    66
    DEST := $(SUPPORT_OUTPUTDIR)/src/launcher, \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    67
    FLATTEN := true, \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    68
    FILES := $(wildcard \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    69
        $(JDK_TOPDIR)/src/java.base/share/native/launcher/* \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    70
        $(JDK_TOPDIR)/src/java.base/share/native/libjli/* \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    71
        $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjli/java_md*)))
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    72
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    73
# This dir needs to exist before macro is evaluated to avoid warning from find.
28600
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 27560
diff changeset
    74
$(call MakeDir, $(SUPPORT_OUTPUTDIR)/src)
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    75
$(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    76
    SRC := $(SRC_ZIP_SRCS) $(SUPPORT_OUTPUTDIR)/src, \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    77
    INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    78
    EXCLUDES := $(SRC_ZIP_EXCLUDES), \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    79
    EXCLUDE_FILES := $(SRC_ZIP_EXCLUDE_FILES), \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    80
    SUFFIXES := .java .c .h, \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    81
    ZIP := $(SUPPORT_OUTPUTDIR)/src.zip, \
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    82
    EXTRA_DEPS := $(COPY_LAUNCHER_SRC)))
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    83
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    84
################################################################################
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    85
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    86
all: $(BUILD_SRC_ZIP)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    87
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    88
.PHONY: default all