author | lana |
Fri, 20 Jun 2014 10:15:30 -0700 | |
changeset 24988 | 8c82c02495e7 |
parent 24411 | 54baaf3fa2ca |
child 25708 | 7ef7f2129ede |
permissions | -rw-r--r-- |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
1 |
# |
20047
daafff583fd7
8023495: [infra] create 64-bit solaris bits with symlinks
ksrini
parents:
17667
diff
changeset
|
2 |
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
4 |
# |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
10 |
# |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
15 |
# accompanied this code). |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
16 |
# |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
20 |
# |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
23 |
# questions. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
24 |
# |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
25 |
|
24411
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
26 |
# This file contains targets and utilities needed by JPRT. |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
27 |
|
24411
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
28 |
# Cygpath is only defined when running on Cygwin |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
29 |
ifneq ($(CYGPATH), ) |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
30 |
# If we get JPRT_ARCHIVE_*BUNDLE externally, make sure they have /cygdrive |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
31 |
# style paths |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
32 |
ifdef JPRT_ARCHIVE_BUNDLE |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
33 |
override JPRT_ARCHIVE_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_BUNDLE)) |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
34 |
endif |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
35 |
ifdef JPRT_ARCHIVE_INSTALL_BUNDLE |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
36 |
override JPRT_ARCHIVE_INSTALL_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_INSTALL_BUNDLE)) |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
37 |
endif |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
38 |
endif |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
39 |
|
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
40 |
# When running in JPRT these will be provided. Need defaults so that this makefile |
54baaf3fa2ca
8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents:
22031
diff
changeset
|
41 |
# is valid anyway. |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
42 |
ifndef JPRT_ARCHIVE_BUNDLE |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
43 |
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
44 |
endif |
15083
0d22bc048353
8006797: build-infra JPRT builds need JPRT_ARCHIVE_INSTALL_BUNDLE in common/makefiles/Jprt.gmk
tbell
parents:
15082
diff
changeset
|
45 |
ifndef JPRT_ARCHIVE_INSTALL_BUNDLE |
20363 | 46 |
JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip |
15083
0d22bc048353
8006797: build-infra JPRT builds need JPRT_ARCHIVE_INSTALL_BUNDLE in common/makefiles/Jprt.gmk
tbell
parents:
15082
diff
changeset
|
47 |
endif |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
48 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
49 |
# This target must be called in the context of a SPEC file |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
50 |
jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
51 |
@$(call CheckIfMakeAtEnd) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
52 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
53 |
# This target must be called in the context of a SPEC file |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
54 |
$(JPRT_ARCHIVE_BUNDLE): bundles |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
55 |
$(MKDIR) -p $(@D) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
56 |
$(RM) $@ |
15396 | 57 |
$(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@ |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
58 |
|
20047
daafff583fd7
8023495: [infra] create 64-bit solaris bits with symlinks
ksrini
parents:
17667
diff
changeset
|
59 |
SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR) |
daafff583fd7
8023495: [infra] create 64-bit solaris bits with symlinks
ksrini
parents:
17667
diff
changeset
|
60 |
SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR) |
15396 | 61 |
SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR) |
62 |
SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR) |
|
63 |
||
64 |
# Bundle up the images |
|
65 |
bundles: all bundles-only |
|
66 |
bundles-only: start-make |
|
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
67 |
@$(call TargetEnter) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
68 |
$(MKDIR) -p $(BUILD_OUTPUT)/bundles |
20047
daafff583fd7
8023495: [infra] create 64-bit solaris bits with symlinks
ksrini
parents:
17667
diff
changeset
|
69 |
$(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip . |
daafff583fd7
8023495: [infra] create 64-bit solaris bits with symlinks
ksrini
parents:
17667
diff
changeset
|
70 |
$(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip . |
20363 | 71 |
if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \ |
72 |
$(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \ |
|
73 |
fi |
|
15396 | 74 |
@$(call TargetExit) |
75 |
||
76 |
# Copy images to one unified location regardless of platform etc. |
|
77 |
final-images: all final-images-only |
|
78 |
final-images-only: start-make |
|
79 |
@$(call TargetEnter) |
|
80 |
$(RM) -r $(BUILD_OUTPUT)/final-images |
|
81 |
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR) |
|
82 |
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR) |
|
83 |
$(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/ |
|
84 |
$(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/ |
|
20363 | 85 |
ifeq ($(OPENJDK_TARGET_OS),macosx) |
86 |
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR) |
|
87 |
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR) |
|
88 |
$(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/ |
|
89 |
$(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/ |
|
90 |
endif |
|
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
91 |
@$(call TargetExit) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
92 |
|
15396 | 93 |
|
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
94 |
########################################################################### |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
95 |
# Phony targets |
22031 | 96 |
.PHONY: jprt_bundle bundles bundles-only final-images final-images-only |