| [2] | 1 | # | 
|---|
|  | 2 | # Copyright 1995-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 | # | 
|---|
|  | 25 |  | 
|---|
|  | 26 | BUILD_PARENT_DIRECTORY=. | 
|---|
|  | 27 |  | 
|---|
|  | 28 | ifndef TOPDIR | 
|---|
|  | 29 | TOPDIR:=$(shell \ | 
|---|
|  | 30 | if [ -r ./j2se/make/Makefile -o -r ./jdk/make/Makefile ]; then \ | 
|---|
|  | 31 | echo "."; \ | 
|---|
|  | 32 | else \ | 
|---|
|  | 33 | echo "../.."; \ | 
|---|
|  | 34 | fi) | 
|---|
|  | 35 | endif | 
|---|
|  | 36 |  | 
|---|
|  | 37 | ifndef CONTROL_TOPDIR | 
|---|
|  | 38 | CONTROL_TOPDIR=$(TOPDIR)/control | 
|---|
|  | 39 | CONTROL_TOPDIR:=$(shell \ | 
|---|
|  | 40 | if [ -r $(TOPDIR)/control/make/Makefile ]; then \ | 
|---|
|  | 41 | echo "$(TOPDIR)/control"; \ | 
|---|
|  | 42 | else \ | 
|---|
|  | 43 | echo "$(TOPDIR)"; \ | 
|---|
|  | 44 | fi) | 
|---|
|  | 45 | endif | 
|---|
|  | 46 |  | 
|---|
|  | 47 | # Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true) | 
|---|
|  | 48 | OPENJDK_SOURCETREE=$(TOPDIR)/openjdk | 
|---|
|  | 49 | OPENJDK_BUILDDIR:=$(shell \ | 
|---|
|  | 50 | if [ -r $(OPENJDK_SOURCETREE)/control/make/Makefile ]; then \ | 
|---|
|  | 51 | echo "$(OPENJDK_SOURCETREE)/control/make"; \ | 
|---|
|  | 52 | elif [ -r $(OPENJDK_SOURCETREE)/Makefile ]; then \ | 
|---|
|  | 53 | echo "$(OPENJDK_SOURCETREE)"; \ | 
|---|
|  | 54 | else \ | 
|---|
|  | 55 | echo "."; \ | 
|---|
|  | 56 | fi) | 
|---|
|  | 57 |  | 
|---|
|  | 58 | ifndef JDK_TOPDIR | 
|---|
|  | 59 | JDK_TOPDIR=$(TOPDIR)/jdk | 
|---|
|  | 60 | endif | 
|---|
|  | 61 | ifndef JDK_MAKE_SHARED_DIR | 
|---|
|  | 62 | JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared | 
|---|
|  | 63 | endif | 
|---|
|  | 64 |  | 
|---|
|  | 65 | include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk | 
|---|
|  | 66 |  | 
|---|
|  | 67 | include ./make/Defs-internal.gmk | 
|---|
|  | 68 |  | 
|---|
| [111] | 69 | ifndef TARGETS | 
|---|
|  | 70 | TARGETS:=setup build | 
|---|
|  | 71 | endif | 
|---|
|  | 72 |  | 
|---|
| [2] | 73 | all:: | 
|---|
|  | 74 | @$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'` | 
|---|
|  | 75 | $(MKDIR) -p $(OUTPUTDIR) | 
|---|
|  | 76 |  | 
|---|
|  | 77 | # Rules for sanity checks | 
|---|
|  | 78 | include ./make/sanity-rules.gmk | 
|---|
|  | 79 |  | 
|---|
|  | 80 | dev : dev-build | 
|---|
|  | 81 |  | 
|---|
|  | 82 | dev-build: | 
|---|
|  | 83 | $(MAKE) DEV_ONLY=true all | 
|---|
|  | 84 | dev-sanity: | 
|---|
|  | 85 | $(MAKE) DEV_ONLY=true sanity | 
|---|
|  | 86 | dev-clobber: | 
|---|
|  | 87 | $(MAKE) DEV_ONLY=true clobber | 
|---|
|  | 88 |  | 
|---|
|  | 89 | # Rules for various components | 
|---|
|  | 90 | include ./make/hotspot-rules.gmk | 
|---|
|  | 91 | include ./make/motif-rules.gmk | 
|---|
|  | 92 | include ./make/langtools-rules.gmk | 
|---|
|  | 93 | include ./make/corba-rules.gmk | 
|---|
|  | 94 | include ./make/jaxp-rules.gmk | 
|---|
|  | 95 | include ./make/jaxws-rules.gmk | 
|---|
|  | 96 | include ./make/jdk-rules.gmk | 
|---|
|  | 97 | include ./make/install-rules.gmk | 
|---|
|  | 98 | include ./make/sponsors-rules.gmk | 
|---|
|  | 99 | include ./make/deploy-rules.gmk | 
|---|
|  | 100 |  | 
|---|
| [111] | 101 | all:: $(TARGETS) | 
|---|
| [2] | 102 |  | 
|---|
|  | 103 | setup: openjdk_check | 
|---|
|  | 104 | $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image | 
|---|
|  | 105 |  | 
|---|
|  | 106 | # Check on whether we really can build the openjdk, need source etc. | 
|---|
|  | 107 | openjdk_check: FRC | 
|---|
|  | 108 | ifneq ($(SKIP_OPENJDK_BUILD), true) | 
|---|
|  | 109 | @$(ECHO) " " | 
|---|
|  | 110 | @$(ECHO) "=================================================" | 
|---|
|  | 111 | @if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \ | 
|---|
|  | 112 | $(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \ | 
|---|
|  | 113 | exit 1; \ | 
|---|
|  | 114 | else \ | 
|---|
|  | 115 | $(ECHO) "OpenJDK will be built after JDK is built"; \ | 
|---|
|  | 116 | $(ECHO) "  OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \ | 
|---|
|  | 117 | fi | 
|---|
|  | 118 | @$(ECHO) "=================================================" | 
|---|
|  | 119 | @$(ECHO) " " | 
|---|
|  | 120 | endif | 
|---|
|  | 121 |  | 
|---|
| [27] | 122 | build:: sanity | 
|---|
| [2] | 123 |  | 
|---|
|  | 124 | clobber:: | 
|---|
|  | 125 |  | 
|---|
|  | 126 | ifeq ($(BUILD_LANGTOOLS), true) | 
|---|
|  | 127 | build:: langtools | 
|---|
|  | 128 | clobber:: langtools-clobber | 
|---|
|  | 129 | endif | 
|---|
|  | 130 |  | 
|---|
|  | 131 | ifeq ($(BUILD_CORBA), true) | 
|---|
|  | 132 | build:: corba | 
|---|
|  | 133 | clobber:: corba-clobber | 
|---|
|  | 134 | endif | 
|---|
|  | 135 |  | 
|---|
|  | 136 | ifeq ($(BUILD_JAXP), true) | 
|---|
|  | 137 | build:: jaxp | 
|---|
|  | 138 | clobber:: jaxp-clobber | 
|---|
|  | 139 | endif | 
|---|
|  | 140 |  | 
|---|
|  | 141 | ifeq ($(BUILD_JAXWS), true) | 
|---|
|  | 142 | build:: jaxws | 
|---|
|  | 143 | clobber:: jaxws-clobber | 
|---|
|  | 144 | endif | 
|---|
|  | 145 |  | 
|---|
|  | 146 | ifeq ($(BUILD_HOTSPOT), true) | 
|---|
| [27] | 147 | build:: $(HOTSPOT) | 
|---|
| [2] | 148 | clobber:: hotspot-clobber | 
|---|
|  | 149 | endif | 
|---|
|  | 150 |  | 
|---|
|  | 151 | ifeq ($(BUILD_MOTIF), true) | 
|---|
|  | 152 | build:: $(MOTIF) | 
|---|
|  | 153 | clobber:: motif-clobber | 
|---|
|  | 154 | endif | 
|---|
|  | 155 |  | 
|---|
|  | 156 | ifeq ($(BUILD_JDK), true) | 
|---|
|  | 157 | build:: $(JDK_JAVA_EXE) | 
|---|
|  | 158 | clobber:: jdk-clobber | 
|---|
|  | 159 | endif | 
|---|
|  | 160 |  | 
|---|
|  | 161 | ifeq ($(BUILD_DEPLOY), true) | 
|---|
|  | 162 | build:: $(DEPLOY) | 
|---|
|  | 163 | clobber:: deploy-clobber | 
|---|
|  | 164 | endif | 
|---|
|  | 165 |  | 
|---|
|  | 166 | # | 
|---|
|  | 167 | # Generic debug build, fastdebug or debug. Needs special handling. | 
|---|
|  | 168 | #  Note that debug builds do NOT do INSTALL steps, but must be done | 
|---|
|  | 169 | #  after the product build and before the INSTALL step of the product build. | 
|---|
|  | 170 | # | 
|---|
|  | 171 | #   DEBUG_NAME is fastdebug or debug | 
|---|
|  | 172 | #   ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix | 
|---|
|  | 173 | #   The resulting j2sdk-image is used by the install makefiles to create a | 
|---|
| [27] | 174 | #     debug install bundle jdk-*-debug-** bundle (tar or zip) | 
|---|
| [2] | 175 | #     which will install in the debug or fastdebug subdirectory of the | 
|---|
|  | 176 | #     normal product install area. | 
|---|
|  | 177 | #     The install process needs to know what the DEBUG_NAME is, so | 
|---|
|  | 178 | #     look for INSTALL_DEBUG_NAME in the install rules. | 
|---|
|  | 179 | # | 
|---|
|  | 180 |  | 
|---|
|  | 181 | COMMON_DEBUG_FLAGS= \ | 
|---|
|  | 182 | DEBUG_NAME=$(DEBUG_NAME) \ | 
|---|
|  | 183 | ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \ | 
|---|
|  | 184 | NO_DOCS=true | 
|---|
|  | 185 |  | 
|---|
| [175] | 186 | product_build: | 
|---|
| [2] | 187 | @$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'` | 
|---|
|  | 188 | $(MAKE) SKIP_FASTDEBUG_BUILD=true SKIP_DEBUG_BUILD=true all | 
|---|
|  | 189 | @$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'` | 
|---|
|  | 190 |  | 
|---|
|  | 191 | generic_debug_build: | 
|---|
|  | 192 | @$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'` | 
|---|
| [111] | 193 | $(MAKE) $(COMMON_DEBUG_FLAGS) $(TARGETS) | 
|---|
| [2] | 194 | @$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'` | 
|---|
|  | 195 |  | 
|---|
| [175] | 196 | debug_build: | 
|---|
|  | 197 | $(MAKE) DEBUG_NAME=debug TARGETS="$(TARGETS)" generic_debug_build | 
|---|
| [2] | 198 |  | 
|---|
| [175] | 199 | fastdebug_build: | 
|---|
|  | 200 | $(MAKE) DEBUG_NAME=fastdebug TARGETS="$(TARGERS)" generic_debug_build | 
|---|
| [2] | 201 |  | 
|---|
|  | 202 | ifeq ($(SKIP_FASTDEBUG_BUILD), false) | 
|---|
|  | 203 | all:: fastdebug_build | 
|---|
|  | 204 | endif | 
|---|
|  | 205 |  | 
|---|
|  | 206 | ifeq ($(SKIP_DEBUG_BUILD), false) | 
|---|
|  | 207 | all:: debug_build | 
|---|
|  | 208 | endif | 
|---|
|  | 209 |  | 
|---|
|  | 210 | ifeq ($(BUILD_JDK), true) | 
|---|
|  | 211 | ifeq ($(BUNDLE_RULES_AVAILABLE), true) | 
|---|
|  | 212 | all:: openjdk-binary-plugs-bundles | 
|---|
|  | 213 | endif | 
|---|
|  | 214 | endif | 
|---|
|  | 215 |  | 
|---|
|  | 216 | ifeq ($(BUILD_INSTALL), true) | 
|---|
|  | 217 | all :: $(INSTALL) | 
|---|
|  | 218 | clobber:: install-clobber | 
|---|
|  | 219 | endif | 
|---|
|  | 220 |  | 
|---|
|  | 221 | ifeq ($(BUILD_SPONSORS), true) | 
|---|
|  | 222 | all :: $(SPONSORS) | 
|---|
|  | 223 | clobber:: sponsors-clobber | 
|---|
|  | 224 | endif | 
|---|
|  | 225 |  | 
|---|
|  | 226 | ifneq ($(SKIP_COMPARE_IMAGES), true) | 
|---|
|  | 227 | all :: compare-image | 
|---|
|  | 228 | endif | 
|---|
|  | 229 |  | 
|---|
|  | 230 | ifneq ($(SKIP_OPENJDK_BUILD), true) | 
|---|
|  | 231 | all :: openjdk_build | 
|---|
|  | 232 | endif | 
|---|
|  | 233 |  | 
|---|
|  | 234 | # If we have bundle rules, we have a chance here to do a complete cycle | 
|---|
|  | 235 | #   build, of production and open build. | 
|---|
|  | 236 | # FIXUP: We should create the openjdk source bundle and build that? | 
|---|
|  | 237 | #   But how do we reliable create or get at a formal openjdk source tree? | 
|---|
|  | 238 | #   The one we have needs to be trimmed of built bits and closed dirs. | 
|---|
|  | 239 | #   The repositories might not be available. | 
|---|
|  | 240 | #   The openjdk source bundle is probably not available. | 
|---|
|  | 241 |  | 
|---|
|  | 242 | ifneq ($(SKIP_OPENJDK_BUILD), true) | 
|---|
|  | 243 | ifeq ($(BUILD_JDK), true) | 
|---|
|  | 244 | ifeq ($(BUNDLE_RULES_AVAILABLE), true) | 
|---|
|  | 245 |  | 
|---|
|  | 246 | OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME) | 
|---|
|  | 247 | OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output | 
|---|
|  | 248 | OPENJDK_BUILD_NAME \ | 
|---|
|  | 249 | = openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE) | 
|---|
|  | 250 | OPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip | 
|---|
|  | 251 | BUILT_IMAGE=$(ABS_OUTPUTDIR)/j2sdk-image | 
|---|
|  | 252 | ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) | 
|---|
|  | 253 | OPENJDK_BOOTDIR=$(BOOTDIR) | 
|---|
|  | 254 | OPENJDK_IMPORTJDK=$(JDK_IMPORT_PATH) | 
|---|
|  | 255 | else | 
|---|
|  | 256 | OPENJDK_BOOTDIR=$(BUILT_IMAGE) | 
|---|
|  | 257 | OPENJDK_IMPORTJDK=$(BUILT_IMAGE) | 
|---|
|  | 258 | endif | 
|---|
|  | 259 |  | 
|---|
|  | 260 | openjdk_build: | 
|---|
|  | 261 | @$(ECHO) " " | 
|---|
|  | 262 | @$(ECHO) "=================================================" | 
|---|
|  | 263 | @$(ECHO) "Starting openjdk build" | 
|---|
|  | 264 | @$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)" | 
|---|
|  | 265 | @$(ECHO) "=================================================" | 
|---|
|  | 266 | @$(ECHO) " " | 
|---|
|  | 267 | $(RM) -r $(OPENJDK_OUTPUTDIR) | 
|---|
|  | 268 | $(MKDIR) -p $(OPENJDK_OUTPUTDIR) | 
|---|
|  | 269 | ($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \ | 
|---|
|  | 270 | OPENJDK=true \ | 
|---|
|  | 271 | ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \ | 
|---|
|  | 272 | ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \ | 
|---|
|  | 273 | ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \ | 
|---|
|  | 274 | ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \ | 
|---|
|  | 275 | ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \ | 
|---|
|  | 276 | product_build ) | 
|---|
|  | 277 | $(RM) $(OPENJDK_BUILD_BINARY_ZIP) | 
|---|
|  | 278 | ( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \ | 
|---|
|  | 279 | $(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .) | 
|---|
|  | 280 | $(RM) -r $(OPENJDK_OUTPUTDIR) | 
|---|
|  | 281 | @$(ECHO) " " | 
|---|
|  | 282 | @$(ECHO) "=================================================" | 
|---|
|  | 283 | @$(ECHO) "Finished openjdk build" | 
|---|
|  | 284 | @$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)" | 
|---|
|  | 285 | @$(ECHO) "=================================================" | 
|---|
|  | 286 | @$(ECHO) " " | 
|---|
| [27] | 287 |  | 
|---|
| [2] | 288 | endif | 
|---|
|  | 289 | endif | 
|---|
|  | 290 | endif | 
|---|
|  | 291 |  | 
|---|
|  | 292 | clobber:: | 
|---|
|  | 293 | $(RM) -r $(OUTPUTDIR)/* | 
|---|
|  | 294 | $(RM) -r $(OUTPUTDIR)-debug/* | 
|---|
|  | 295 | $(RM) -r $(OUTPUTDIR)-fastdebug/* | 
|---|
|  | 296 | -($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE)) | 
|---|
|  | 297 |  | 
|---|
|  | 298 | clean: clobber | 
|---|
|  | 299 |  | 
|---|
| [27] | 300 | all:: | 
|---|
| [2] | 301 | @$(ECHO) Control build finished: `$(DATE) '+%y-%m-%d %H:%M'` | 
|---|
|  | 302 |  | 
|---|
|  | 303 | # | 
|---|
|  | 304 | # Quick jdk verification build | 
|---|
|  | 305 | # | 
|---|
|  | 306 | jdk_only: | 
|---|
|  | 307 | $(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all | 
|---|
|  | 308 |  | 
|---|
|  | 309 |  | 
|---|
|  | 310 | # | 
|---|
|  | 311 | # Quick jdk verification fastdebug build | 
|---|
|  | 312 | # | 
|---|
|  | 313 | jdk_fastdebug_only: | 
|---|
|  | 314 | $(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \ | 
|---|
|  | 315 | BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build | 
|---|
|  | 316 |  | 
|---|
|  | 317 | # | 
|---|
|  | 318 | # Quick deploy verification fastdebug build | 
|---|
|  | 319 | # | 
|---|
|  | 320 | deploy_fastdebug_only: | 
|---|
|  | 321 | $(MAKE) \ | 
|---|
|  | 322 | DEBUG_NAME=fastdebug \ | 
|---|
|  | 323 | BUILD_HOTSPOT=false \ | 
|---|
|  | 324 | BUILD_JDK=false \ | 
|---|
|  | 325 | BUILD_LANGTOOLS=false \ | 
|---|
|  | 326 | BUILD_CORBA=false \ | 
|---|
|  | 327 | BUILD_JAXP=false \ | 
|---|
|  | 328 | BUILD_JAXWS=false \ | 
|---|
|  | 329 | BUILD_INSTALL=false \ | 
|---|
|  | 330 | BUILD_SPONSORS=false \ | 
|---|
|  | 331 | generic_debug_build | 
|---|
|  | 332 |  | 
|---|
|  | 333 | # | 
|---|
|  | 334 | # Product build (skip debug builds) | 
|---|
|  | 335 | # | 
|---|
|  | 336 | product_only: | 
|---|
|  | 337 | $(MAKE) SKIP_FASTDEBUG_BUILD=true all | 
|---|
|  | 338 |  | 
|---|
|  | 339 | # | 
|---|
|  | 340 | # Check target | 
|---|
|  | 341 | # | 
|---|
|  | 342 |  | 
|---|
|  | 343 | check: variable_check | 
|---|
|  | 344 |  | 
|---|
|  | 345 | # | 
|---|
|  | 346 | # Help target | 
|---|
|  | 347 | # | 
|---|
|  | 348 | help: intro_help target_help variable_help notes_help examples_help | 
|---|
|  | 349 |  | 
|---|
|  | 350 | # Intro help message | 
|---|
|  | 351 | intro_help: | 
|---|
|  | 352 | @$(ECHO) "\ | 
|---|
|  | 353 | Makefile for the JDK builds (all the JDK). \n\ | 
|---|
|  | 354 | " | 
|---|
|  | 355 |  | 
|---|
|  | 356 | # Target help | 
|---|
|  | 357 | target_help: | 
|---|
|  | 358 | @$(ECHO) "\ | 
|---|
|  | 359 | --- Common Targets ---  \n\ | 
|---|
|  | 360 | all               -- build the core JDK (default target) \n\ | 
|---|
|  | 361 | help              -- Print out help information \n\ | 
|---|
|  | 362 | check             -- Check make variable values for correctness \n\ | 
|---|
|  | 363 | sanity            -- Perform detailed sanity checks on system and settings \n\ | 
|---|
|  | 364 | fastdebug_build   -- build the core JDK in 'fastdebug' mode (-g -O) \n\ | 
|---|
|  | 365 | debug_build       -- build the core JDK in 'debug' mode (-g) \n\ | 
|---|
|  | 366 | clean             -- remove all built and imported files \n\ | 
|---|
|  | 367 | clobber           -- same as clean \n\ | 
|---|
|  | 368 | " | 
|---|
|  | 369 |  | 
|---|
|  | 370 | # Variable help (only common ones used by this Makefile) | 
|---|
|  | 371 | variable_help: variable_help_intro variable_list variable_help_end | 
|---|
|  | 372 | variable_help_intro: | 
|---|
|  | 373 | @$(ECHO) "--- Common Variables ---" | 
|---|
|  | 374 | variable_help_end: | 
|---|
|  | 375 | @$(ECHO) " " | 
|---|
|  | 376 |  | 
|---|
|  | 377 | # One line descriptions for the variables | 
|---|
|  | 378 | OUTPUTDIR.desc             = Output directory | 
|---|
|  | 379 | PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count | 
|---|
|  | 380 | SLASH_JAVA.desc            = Root of all build tools, e.g. /java or J: | 
|---|
|  | 381 | BOOTDIR.desc               = JDK used to boot the build | 
|---|
|  | 382 | JDK_IMPORT_PATH.desc       = JDK used to import components of the build | 
|---|
|  | 383 | COMPILER_PATH.desc         = Compiler install directory | 
|---|
|  | 384 | CACERTS_FILE.desc          = Location of certificates file | 
|---|
|  | 385 | DEVTOOLS_PATH.desc         = Directory containing zip and gnumake | 
|---|
|  | 386 | CUPS_HEADERS_PATH.desc     = Include directory location for CUPS header files | 
|---|
|  | 387 | DXSDK_PATH.desc            = Root directory of DirectX SDK | 
|---|
|  | 388 | MSDEVTOOLS_PATH.desc       = Root directory of VC++ tools (e.g. rc.exe) | 
|---|
|  | 389 | MSVCRT_DLL_PATH.desc       = Directory containing mscvrt.dll | 
|---|
| [27] | 390 | ODINSDK_PATH.desc          = Root directory of Odin32 SDK (OS/2) | 
|---|
| [2] | 391 |  | 
|---|
|  | 392 | # Make variables to print out (description and value) | 
|---|
|  | 393 | VARIABLE_PRINTVAL_LIST +=       \ | 
|---|
|  | 394 | OUTPUTDIR                   \ | 
|---|
|  | 395 | PARALLEL_COMPILE_JOBS       \ | 
|---|
|  | 396 | SLASH_JAVA                  \ | 
|---|
|  | 397 | BOOTDIR                     \ | 
|---|
|  | 398 | JDK_IMPORT_PATH             \ | 
|---|
|  | 399 | COMPILER_PATH               \ | 
|---|
|  | 400 | CACERTS_FILE                \ | 
|---|
|  | 401 | DEVTOOLS_PATH | 
|---|
|  | 402 |  | 
|---|
|  | 403 | # Make variables that should refer to directories that exist | 
|---|
|  | 404 | VARIABLE_CHECKDIR_LIST +=       \ | 
|---|
|  | 405 | SLASH_JAVA                  \ | 
|---|
|  | 406 | BOOTDIR                     \ | 
|---|
|  | 407 | JDK_IMPORT_PATH             \ | 
|---|
|  | 408 | COMPILER_PATH               \ | 
|---|
| [27] | 409 | DEVTOOLS_PATH | 
|---|
| [2] | 410 |  | 
|---|
|  | 411 | # Make variables that should refer to files that exist | 
|---|
|  | 412 | VARIABLE_CHECKFIL_LIST +=       \ | 
|---|
|  | 413 | CACERTS_FILE | 
|---|
|  | 414 |  | 
|---|
|  | 415 | # Some are windows specific | 
|---|
|  | 416 | ifeq ($(PLATFORM), windows) | 
|---|
|  | 417 |  | 
|---|
|  | 418 | VARIABLE_PRINTVAL_LIST +=       \ | 
|---|
|  | 419 | DXSDK_PATH                  \ | 
|---|
|  | 420 | MSDEVTOOLS_PATH             \ | 
|---|
|  | 421 | MSVCRT_DLL_PATH | 
|---|
|  | 422 |  | 
|---|
|  | 423 | VARIABLE_CHECKDIR_LIST +=       \ | 
|---|
|  | 424 | DXSDK_PATH                  \ | 
|---|
|  | 425 | MSDEVTOOLS_PATH             \ | 
|---|
|  | 426 | MSVCRT_DLL_PATH | 
|---|
|  | 427 |  | 
|---|
|  | 428 | endif | 
|---|
|  | 429 |  | 
|---|
| [27] | 430 | # Some are OS/2 specific | 
|---|
|  | 431 | ifeq ($(PLATFORM), os2) | 
|---|
|  | 432 |  | 
|---|
|  | 433 | VARIABLE_PRINTVAL_LIST +=       \ | 
|---|
|  | 434 | ODINSDK_PATH | 
|---|
|  | 435 |  | 
|---|
|  | 436 | VARIABLE_CHECKDIR_LIST +=       \ | 
|---|
|  | 437 | ODINSDK_PATH | 
|---|
|  | 438 |  | 
|---|
|  | 439 | endif | 
|---|
|  | 440 |  | 
|---|
| [2] | 441 | # For pattern rules below, so all are treated the same | 
|---|
|  | 442 | DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval) | 
|---|
|  | 443 | DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir) | 
|---|
|  | 444 | DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil) | 
|---|
|  | 445 |  | 
|---|
|  | 446 | # Complete variable check | 
|---|
|  | 447 | variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST) | 
|---|
|  | 448 | variable_list: $(DO_PRINTVAL_LIST) variable_check | 
|---|
|  | 449 |  | 
|---|
|  | 450 | # Pattern rule for printing out a variable | 
|---|
|  | 451 | %.printval: | 
|---|
|  | 452 | @$(ECHO) "  ALT_$* - $($*.desc)" | 
|---|
|  | 453 | @$(ECHO) "  \t $*=$($*)" | 
|---|
|  | 454 |  | 
|---|
|  | 455 | # Pattern rule for checking to see if a variable with a directory exists | 
|---|
|  | 456 | %.checkdir: | 
|---|
|  | 457 | @if [ ! -d $($*) ] ; then \ | 
|---|
|  | 458 | $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ | 
|---|
|  | 459 | fi | 
|---|
|  | 460 |  | 
|---|
|  | 461 | # Pattern rule for checking to see if a variable with a file exists | 
|---|
|  | 462 | %.checkfil: | 
|---|
|  | 463 | @if [ ! -f $($*) ] ; then \ | 
|---|
|  | 464 | $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ | 
|---|
|  | 465 | fi | 
|---|
|  | 466 |  | 
|---|
|  | 467 | # Misc notes on help | 
|---|
|  | 468 | notes_help: | 
|---|
|  | 469 | @$(ECHO) "\ | 
|---|
|  | 470 | --- Notes --- \n\ | 
|---|
|  | 471 | - All builds use same output directory unless overridden with \n\ | 
|---|
|  | 472 | \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\ | 
|---|
|  | 473 | \t to use the clean target first. \n\ | 
|---|
|  | 474 | - JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\ | 
|---|
|  | 475 | \t builds or previous release JDK builds will work. \n\ | 
|---|
|  | 476 | - The fastest builds have been when the sources and the BOOTDIR are on \n\ | 
|---|
|  | 477 | \t local disk. \n\ | 
|---|
|  | 478 | " | 
|---|
|  | 479 |  | 
|---|
|  | 480 | examples_help: | 
|---|
|  | 481 | @$(ECHO) "\ | 
|---|
|  | 482 | --- Examples --- \n\ | 
|---|
|  | 483 | $(MAKE) fastdebug_build \n\ | 
|---|
|  | 484 | $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ | 
|---|
|  | 485 | $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\ | 
|---|
|  | 486 | $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ | 
|---|
|  | 487 | $(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\ | 
|---|
|  | 488 | $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\ | 
|---|
|  | 489 | " | 
|---|
|  | 490 |  | 
|---|
|  | 491 | ################################################################ | 
|---|
|  | 492 | # Source and binary plug bundling | 
|---|
|  | 493 | ################################################################ | 
|---|
|  | 494 | ifeq ($(BUNDLE_RULES_AVAILABLE), true) | 
|---|
|  | 495 | include $(BUNDLE_RULES) | 
|---|
|  | 496 | endif | 
|---|
|  | 497 |  | 
|---|
|  | 498 | ################################################################ | 
|---|
|  | 499 | # Cycle build. Build the jdk, use it to build the jdk again. | 
|---|
|  | 500 | ################################################################ | 
|---|
| [27] | 501 |  | 
|---|
| [2] | 502 | ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk | 
|---|
| [27] | 503 |  | 
|---|
| [2] | 504 | boot_cycle: | 
|---|
|  | 505 | $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build | 
|---|
|  | 506 | $(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build | 
|---|
|  | 507 |  | 
|---|
|  | 508 | ################################################################ | 
|---|
|  | 509 | # JPRT rule to build | 
|---|
|  | 510 | ################################################################ | 
|---|
|  | 511 |  | 
|---|
|  | 512 | include ./make/jprt.gmk | 
|---|
|  | 513 |  | 
|---|
|  | 514 | ################################################################ | 
|---|
|  | 515 | #  PHONY | 
|---|
|  | 516 | ################################################################ | 
|---|
|  | 517 |  | 
|---|
|  | 518 | .PHONY: all build what clobber insane \ | 
|---|
|  | 519 | fastdebug_build debug_build product_build setup \ | 
|---|
|  | 520 | dev dev-build dev-sanity dev-clobber | 
|---|
|  | 521 |  | 
|---|
|  | 522 | # FIXUP: Old j2se targets | 
|---|
|  | 523 | j2se_fastdebug_only: jdk_fastdebug_only | 
|---|
|  | 524 | j2se_only: jdk_only | 
|---|
|  | 525 |  | 
|---|
|  | 526 | # Force target | 
|---|
|  | 527 | FRC: | 
|---|
|  | 528 |  | 
|---|