annotate NewMakefile.gmk @ 15013:4a17ca431caf

7019834: Eliminate dependency from PolicyFile to com.sun.security.auth.PrincipalComparator Summary: Add new java.security.Principal.implies method Reviewed-by: alanb
author mullan
date Tue, 08 Jan 2013 19:00:12 -0500
parents 5262b00bc10c
children 64278cb83950
rev   line source
ohair@13697 1 #
ohair@13697 2 # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
ohair@13697 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@13697 4 #
ohair@13697 5 # This code is free software; you can redistribute it and/or modify it
ohair@13697 6 # under the terms of the GNU General Public License version 2 only, as
ohair@13697 7 # published by the Free Software Foundation. Oracle designates this
ohair@13697 8 # particular file as subject to the "Classpath" exception as provided
ohair@13697 9 # by Oracle in the LICENSE file that accompanied this code.
ohair@13697 10 #
ohair@13697 11 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@13697 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@13697 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@13697 14 # version 2 for more details (a copy is included in the LICENSE file that
ohair@13697 15 # accompanied this code).
ohair@13697 16 #
ohair@13697 17 # You should have received a copy of the GNU General Public License version
ohair@13697 18 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@13697 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@13697 20 #
ohair@13697 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@13697 22 # or visit www.oracle.com if you need additional information or have any
ohair@13697 23 # questions.
ohair@13697 24 #
ohair@13697 25
ohair@13697 26 # Utilities used in this Makefile
ohair@13697 27 BASENAME=basename
ohair@13697 28 CAT=cat
ohair@13697 29 CD=cd
ohair@13697 30 CMP=cmp
ohair@13697 31 CP=cp
ohair@13697 32 ECHO=echo
ohair@13697 33 MKDIR=mkdir
ohair@14111 34 PRINTF=printf
ohair@13697 35 PWD=pwd
ohair@14111 36 TAR=tar
ohair@13697 37 ifeq ($(PLATFORM),windows)
ohair@13697 38 ZIP=zip
ohair@13697 39 else
ohair@13697 40 # store symbolic links as the link
ohair@13697 41 ZIP=zip -y
ohair@13697 42 endif
ohair@13697 43 # Insure we have a path that looks like it came from pwd
ohair@13697 44 # (This is mostly for Windows sake and drive letters)
ohair@13697 45 define UnixPath # path
ohair@13697 46 $(shell (cd "$1" && $(PWD)))
ohair@13697 47 endef
ohair@13697 48
ohair@13697 49 # Current root directory
ohair@13697 50 CURRENT_DIRECTORY := $(shell $(PWD))
ohair@13697 51
ohair@13697 52 # Build directory root
ohair@13697 53 BUILD_DIR_ROOT = $(CURRENT_DIRECTORY)/build
ohair@13697 54
ohair@13697 55 # All configured Makefiles to run
ohair@13697 56 ALL_MAKEFILES = $(wildcard $(BUILD_DIR_ROOT)/*-*/Makefile)
ohair@13697 57
ohair@13697 58 # All bundles to create
ohair@13697 59 ALL_IMAGE_DIRS = $(wildcard $(BUILD_DIR_ROOT)/*-*/images/*-image)
ohair@13697 60
ohair@13697 61 # Build all the standard 'all', 'images', and 'clean' targets
ohair@13697 62 all images clean: checks
ohair@13697 63 @if [ "$(ALL_MAKEFILES)" = "" ] ; then \
ohair@13697 64 $(ECHO) "ERROR: No configurations to build"; exit 1; \
ohair@13697 65 fi
ohair@13697 66 @for bdir in $(dir $(ALL_MAKEFILES)) ; do \
ohair@14111 67 $(ECHO) "$(CD) $${bdir} && $(MAKE) $@" ; \
ohair@14111 68 $(CD) $${bdir} && $(MAKE) $@ ; \
ohair@13697 69 done
ohair@13697 70
ohair@14111 71 # TBD: Deploy input
ohair@14111 72 $(BUILD_DIR_ROOT)/.deploy_input:
ohair@14111 73 @if [ "$(ALL_MAKEFILES)" = "" ] ; then \
ohair@14111 74 $(ECHO) "ERROR: No configurations to build"; exit 1; \
ohair@14111 75 fi
ohair@14111 76 @for bdir in $(dir $(ALL_MAKEFILES)) ; do \
ohair@14111 77 if [ deploy/make/Makefile ] ; then \
ohair@14111 78 echo "Attempting deploy build." ; \
ohair@14111 79 ( \
ohair@14111 80 $(RM) -r $${bdir}/deploy_input ; \
ohair@14111 81 $(MKDIR) -p $${bdir}/deploy_input ; \
ohair@14111 82 ( $(CD) $${bdir}/images && $(TAR) -cf - j2sdk-image j2re-image ) \
ohair@14111 83 | ( $(CD) $${bdir}/deploy_input && $(TAR) -xf - ) ; \
ohair@14111 84 ) ; \
ohair@14111 85 fi; \
ohair@14111 86 done
ohair@14111 87 touch $@
ohair@14111 88
ohair@14111 89 # TBD: Deploy images
ohair@14111 90 deploy: $(BUILD_DIR_ROOT)/.deploy_input
ohair@14111 91 @if [ "$(ALL_MAKEFILES)" = "" ] ; then \
ohair@14111 92 $(ECHO) "ERROR: No configurations to build"; exit 1; \
ohair@14111 93 fi
ohair@14111 94 @for bdir in $(dir $(ALL_MAKEFILES)) ; do \
ohair@14111 95 if [ deploy/make/Makefile ] ; then \
ohair@14111 96 echo "Attempting deploy build." ; \
ohair@14111 97 ( \
ohair@14111 98 $(CD) deploy/make && \
ohair@14111 99 $(MAKE) \
ohair@14111 100 ABS_OUTPUTDIR=$${bdir}/deploy_input \
ohair@14111 101 OUTPUTDIR=$${bdir}/deploy_input \
ohair@14111 102 ) ; \
ohair@14111 103 fi; \
ohair@14111 104 done
ohair@14111 105
ohair@14111 106 # TBD: Install bundles
ohair@14111 107 install:
ohair@14111 108
ohair@13697 109 # Bundle creation
ohair@13697 110 bundles:
ohair@13697 111 @if [ "$(ALL_IMAGE_DIRS)" = "" ] ; then \
ohair@13697 112 $(ECHO) "ERROR: No images to bundle"; exit 1; \
ohair@13697 113 fi
ohair@13697 114 @for i in $(ALL_IMAGE_DIRS) ; do \
ohair@13697 115 $(MKDIR) -p $${i}/../../bundles && \
ohair@13697 116 $(RM) $${i}/../../bundles/`$(BASENAME) $${i}`.zip && \
ohair@13697 117 $(ECHO) "$(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip ." && \
ohair@13697 118 $(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip . ; \
ohair@13697 119 done
ohair@13697 120
ohair@13697 121 # Clobber all the built files
ohair@13697 122 clobber::
ohair@13697 123 $(RM) -r $(BUILD_DIR_ROOT)
ohair@13697 124
ohair@13697 125 # Make various checks to insure the build will be successful
ohair@13697 126 # Possibilities:
ohair@13697 127 # * Check that if any closed repo is provided, they all must be.
ohair@13697 128 # * Check that all open repos exist, at least until we are ready for some
ohair@13697 129 # kind of partial build.
ohair@13697 130 checks:
ohair@13697 131 @$(ECHO) "No checks yet"
ohair@13697 132
ohair@14111 133 # Keep track of user targets
ohair@14111 134 USER_TARGETS += all deploy install images clean clobber checks
ohair@13697 135
ohair@13697 136 ###########################################################################
ohair@13697 137 # To help in adoption of the new configure&&make build process, a bridge
ohair@13697 138 # build will use the old settings to run configure and do the build.
ohair@13697 139
ohair@13697 140 # Build with the configure bridge
ohair@13697 141 bridgeBuild: bridge2configure images
ohair@13697 142
ohair@13697 143 # Bridge from old Makefile ALT settings to configure options
ohair@14111 144 bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts
ohair@14111 145 bash ./configure $(strip $(shell $(CAT) $<))
ohair@13697 146
ohair@13697 147 # Create a file with configure options created from old Makefile mechanisms.
ohair@14111 148 $(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest
ohair@13697 149 $(RM) $@
ohair@13697 150 $(CP) $< $@
ohair@13697 151
ohair@13697 152 # Use this file to only change when obvious things have changed
ohair@14111 153 $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
ohair@13697 154 $(RM) $@.tmp
ohair@14111 155 $(MKDIR) -p $(BUILD_DIR_ROOT)
ohair@13697 156 @$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
ohair@13697 157 ifdef ARCH_DATA_MODEL
ohair@13697 158 @$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
ohair@13697 159 endif
ohair@13697 160 ifdef ALT_PARALLEL_COMPILE_JOBS
ohair@13697 161 @$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
ohair@13697 162 endif
ohair@13697 163 ifdef ALT_BOOTDIR
ohair@13697 164 @$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
ohair@13697 165 endif
ohair@13697 166 ifdef ALT_CUPS_HEADERS_PATH
ohair@13697 167 @$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
ohair@13697 168 endif
ohair@13697 169 ifdef ALT_FREETYPE_HEADERS_PATH
ohair@13697 170 @$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
ohair@13697 171 endif
ohair@13697 172 @if [ -f $@ ] ; then \
ohair@13697 173 if ! $(CMP) $@ $@.tmp > /dev/null ; then \
ohair@13697 174 $(CP) $@.tmp $@ ; \
ohair@13697 175 fi ; \
ohair@13697 176 else \
ohair@13697 177 $(CP) $@.tmp $@ ; \
ohair@13697 178 fi
ohair@13697 179 $(RM) $@.tmp
ohair@13697 180
ohair@13697 181 # Clobber all the built files
ohair@13697 182 clobber:: bridge2clobber
ohair@13697 183 bridge2clobber::
ohair@14111 184 $(RM) $(BUILD_DIR_ROOT)/.bridge2*
ohair@14111 185 $(RM) $(BUILD_DIR_ROOT)/.deploy_input
ohair@13697 186
ohair@13697 187 # Keep track of phony targets
ohair@13697 188 PHONY_LIST += bridge2configure bridgeBuild bridge2clobber
ohair@13697 189
ohair@13697 190 ###########################################################################
ohair@14111 191 # Sanity checks (history target)
ohair@14111 192 #
ohair@14111 193
ohair@14111 194 sanity: checks
ohair@14111 195
ohair@14111 196 # Keep track of user targets
ohair@14111 197 USER_TARGETS += sanity
ohair@14111 198
ohair@14111 199 ###########################################################################
ohair@13697 200 # Javadocs
ohair@13697 201 #
ohair@13697 202
ohair@13697 203 javadocs:
ohair@13697 204 cd common/makefiles && $(MAKE) -f MakefileJavadoc.gmk
ohair@13697 205
ohair@14111 206 # Keep track of user targets
ohair@14111 207 USER_TARGETS += javadocs
ohair@13697 208
ohair@13697 209 ###########################################################################
ohair@13697 210 # JPRT targets
ohair@13697 211
ohair@13697 212 ifndef JPRT_ARCHIVE_BUNDLE
ohair@13697 213 JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
ohair@13697 214 endif
ohair@13697 215
ohair@13697 216 jprt_build_product: DEBUG_LEVEL=release
ohair@13697 217 jprt_build_product: BUILD_DIRNAME=*-release
ohair@13697 218 jprt_build_product: jprt_build_generic
ohair@13697 219
ohair@13697 220 jprt_build_fastdebug: DEBUG_LEVEL=fastdebug
ohair@13697 221 jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug
ohair@13697 222 jprt_build_fastdebug: jprt_build_generic
ohair@13697 223
ohair@13697 224 jprt_build_debug: DEBUG_LEVEL=slowdebug
ohair@13697 225 jprt_build_debug: BUILD_DIRNAME=*-debug
ohair@13697 226 jprt_build_debug: jprt_build_generic
ohair@13697 227
ohair@13697 228 jprt_build_generic: $(JPRT_ARCHIVE_BUNDLE)
ohair@13697 229
ohair@13697 230 $(JPRT_ARCHIVE_BUNDLE): bridgeBuild bundles
ohair@13697 231 $(MKDIR) -p $(@D)
ohair@13697 232 $(RM) $@
ohair@13697 233 $(CP) $(BUILD_DIR_ROOT)/$(BUILD_DIRNAME)/bundles/j2sdk-image.zip $@
ohair@13697 234
ohair@13697 235 # Keep track of phony targets
ohair@13697 236 PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
ohair@13697 237 jprt_build_generic
ohair@13697 238
ohair@13697 239 ###########################################################################
ohair@14111 240 # Help target
ohair@14111 241
ohair@14111 242 HELP_FORMAT=%12s%s\n
ohair@14111 243
ohair@14111 244 help:
ohair@14111 245 @$(PRINTF) "# JDK Makefile\n"
ohair@14111 246 @$(PRINTF) "#\n"
ohair@14111 247 @$(PRINTF) "# Usage: make [Target]\n"
ohair@14111 248 @$(PRINTF) "#\n"
ohair@14111 249 @$(PRINTF) "# $(HELP_FORMAT)" "Target " "Description"
ohair@14111 250 @$(PRINTF) "# $(HELP_FORMAT)" "------ " "-----------"
ohair@14111 251 @for i in $(USER_TARGETS) ; do \
ohair@14111 252 $(MAKE) help_$${i} ; \
ohair@14111 253 done
ohair@14111 254 @$(PRINTF) "#\n"
ohair@14111 255
ohair@14111 256 help_all:
ohair@14111 257 @$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
ohair@14111 258 "Build the entire jdk but not the images"
ohair@14111 259 help_images:
ohair@14111 260 @$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
ohair@14111 261 "Create the jdk images for the builds"
ohair@14111 262 help_deploy:
ohair@14111 263 @$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
ohair@14111 264 "Create the jdk deploy images from the jdk images"
ohair@14111 265 help_install:
ohair@14111 266 @$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
ohair@14111 267 "Create the jdk install bundles from the deploy images"
ohair@14111 268 help_clean:
ohair@14111 269 @$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
ohair@14111 270 "Clean and prepare for a fresh build from scratch"
ohair@14111 271 help_clobber:
ohair@14111 272 @$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
ohair@14111 273 "Clean and also purge any hidden derived data"
ohair@14111 274 help_checks:
ohair@14111 275 @$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
ohair@14111 276 "Perform various checks to make sure we can build"
ohair@14111 277 help_sanity:
ohair@14111 278 @$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
ohair@14111 279 "Same as 'make checks'"
ohair@14111 280 help_javadocs:
ohair@14111 281 @$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
ohair@14111 282 "Build the javadocs"
ohair@14111 283 help_help:
ohair@14111 284 @$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
ohair@14111 285 "Print out the help messages"
ohair@14111 286
ohair@14111 287 # Keep track of user targets
ohair@14111 288 USER_TARGETS += help
ohair@14111 289
ohair@14111 290 ###########################################################################
ohair@13697 291 # Phony targets
ohair@14111 292 .PHONY: $(PHONY_LIST) $(USER_TARGETS)
ohair@13697 293
ohair@13697 294 # Force target
ohair@13697 295 FRC: