Mon, 06 Jul 2009 15:02:27 -0400
Merge
1 #
2 # Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Sun designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Sun in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 # CA 95054 USA or visit www.sun.com if you need additional information or
23 # have any questions.
24 #
26 ################################################################
27 # DEPLOY TARGETS
28 ################################################################
30 deploy: deploy-build
32 DEPLOY = deploy
34 BUILD_DEPLOY=true
36 ifeq ($(ARCH), ia64)
37 BUILD_DEPLOY=false
38 endif
40 ifeq ($(ARCH), sparcv9)
41 BUILD_DEPLOY=false;
42 endif
44 ifeq ($(ARCH), amd64)
45 ifeq ($(PLATFORM), solaris)
46 BUILD_DEPLOY=false
47 endif
48 endif
51 # put the generated bundles in their own place in OUTPUTDIR
52 DEPLOY_OUTPUTDIR = $(ABS_OUTPUTDIR)
54 # NO_IMAGES may be set in conjunction with DEV_ONLY
55 ifdef NO_IMAGES
56 IMAGES_TARGET =
57 else
58 IMAGES_TARGET = images
59 endif
61 DEPLOY_BUILD_TARGETS = sanity javaws-all plugin-all
62 # Only build 7-Zip LZMA file compression if it is available
63 # Enable 7-Zip LZMA file (de)compression for Java Kernel if it is available
64 ifeq ($(ARCH_DATA_MODEL), 32)
65 ifeq ($(PLATFORM), windows)
66 ifneq ($(KERNEL), off)
67 EC_TMP = $(shell if [ -d $(DEPLOY_TOPDIR)/make/lzma ] ; then \
68 $(ECHO) true ; \
69 else \
70 $(ECHO) false ; \
71 fi )
72 ifeq ($(EC_TMP), true)
73 DEPLOY_BUILD_TARGETS += extra-comp-all
74 endif
75 endif
76 endif
77 endif
79 ifneq ($(JQS), off)
80 ifeq ($(ARCH_DATA_MODEL), 32)
81 ifeq ($(PLATFORM), windows)
82 DEPLOY_BUILD_TARGETS += jqs-all
83 endif
84 endif
85 endif
87 ifneq ($(KERNEL), off)
88 ifeq ($(ARCH_DATA_MODEL), 32)
89 ifeq ($(PLATFORM), windows)
90 # Only set up to use UPX compression if it is available
91 UP_TMP = $(shell if [ -d $(DEPLOY_TOPDIR)/make/upx ] ; then \
92 $(ECHO) true ; \
93 else \
94 $(ECHO) false ; \
95 fi )
96 ifeq ($(UP_TMP), true)
97 DEPLOY_BUILD_TARGETS += cmd-comp-all
98 endif
99 DEPLOY_BUILD_TARGETS += kernel-all
100 endif
101 endif
102 endif
106 ifndef DEV_ONLY
107 DEPLOY_BUILD_TARGETS += images
108 else
109 DEPLOY_BUILD_TARGETS += $(IMAGES_TARGET)
110 endif
112 DEPLOY_BUILD_ARGUMENTS = $(COMMON_BUILD_ARGUMENTS) \
113 ALT_OUTPUTDIR=$(DEPLOY_OUTPUTDIR)
115 ifeq ($(BUILD_LANGTOOLS), true)
116 DEPLOY_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
117 endif
119 ifdef ALT_IMAGE_DIR
120 DEPLOY_BUILD_ARGUMENTS += ALT_IMAGE_DIR=$(ALT_IMAGE_DIR)
121 endif
123 ifdef ALT_BUNDLE_DATE
124 DEPLOY_BUILD_ARGUMENTS += ALT_BUNDLE_DATE=$(ALT_BUNDLE_DATE)
125 endif
127 ifdef ALT_JAVAWS_BOOTDIR
128 DEPLOY_BUILD_ARGUMENTS += ALT_JAVAWS_BOOTDIR=$(ALT_JAVAWS_BOOTDIR)
129 endif
131 ifdef CERT
132 DEPLOY_BUILD_ARGUMENTS += CERT=$(CERT)
133 endif
135 ifdef PKEY
136 DEPLOY_BUILD_ARGUMENTS += PKEY=$(PKEY)
137 endif
139 deploy-build:
140 ifeq ($(BUILD_DEPLOY), true)
141 ($(CD) $(DEPLOY_TOPDIR)/make && \
142 $(MAKE) $(DEPLOY_BUILD_TARGETS) $(DEPLOY_BUILD_ARGUMENTS))
143 endif
145 deploy-clobber::
146 ifeq ($(BUILD_DEPLOY), true)
147 ($(CD) $(DEPLOY_TOPDIR)/make && \
148 $(MAKE) clobber $(DEPLOY_BUILD_ARGUMENTS))
149 endif
151 deploy-sanity::
152 ifeq ($(BUILD_DEPLOY), true)
153 ($(CD) $(DEPLOY_TOPDIR)/make && \
154 $(MAKE) sanity $(DEPLOY_BUILD_ARGUMENTS))
155 endif
157 .PHONY: deploy deploy-build deploy-clobber deploy-sanity