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