< prev index next >

make/Bundles.gmk

Print this page
rev 57725 : 8237192: Generate stripped/public pdbs on Windows for jdk images


 108         else ifeq ($$($1_TYPE)-$(TAR_SUPPORTS_TRANSFORM)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
 109             tar.gz-true-false-1)
 110           # If only one BASE_DIR, but with a SUBDIR set, tar.gz can use the
 111           # transform option to create bundle directly from the BASE_DIR.
 112           $(CD) $$($1_BASE_DIRS) \
 113               && ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
 114                   -$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
 115                   $$(if $$($1_SUBDIR), --transform 's|^|$$($1_SUBDIR)/|S') \
 116                   $(TAR_IGNORE_EXIT_VALUE) ) \
 117               | $(GZIP) > $$@
 118         else
 119           # In all other cases, need to copy all files into a temporary location
 120           # before creation bundle.
 121           $(RM) -r $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
 122           $(MKDIR) -p $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
 123           $$(foreach d, $$($1_BASE_DIRS), \
 124             ( $(CD) $$d \
 125             && $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
 126                 $(TAR_IGNORE_EXIT_VALUE) ) \
 127             | ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )





 128           # Unzip any zipped debuginfo files
 129           ifeq ($$($1_UNZIP_DEBUGINFO), true)
 130             for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
 131               $(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \
 132             done
 133           endif
 134           ifeq ($$($1_TYPE), tar.gz)
 135             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
 136             ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
 137                 $$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \
 138             | $(GZIP) > $$@
 139           else ifeq ($$($1_TYPE), zip)
 140             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ .
 141           endif
 142         endif
 143 
 144   $1 += $$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME)
 145 
 146 endef
 147 


 201 
 202   # Create special filter rules when dealing with unzipped .dSYM directories on
 203   # macosx
 204   ifeq ($(call isTargetOs, macosx), true)
 205     ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
 206       JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
 207           $(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \
 208           $(ALL_JDK_SYMBOLS_FILES))))
 209     endif
 210   endif
 211 
 212   JDK_BUNDLE_FILES := \
 213       $(filter-out \
 214           $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
 215           $(JDK_EXTRA_EXCLUDES) \
 216           $(SYMBOLS_EXCLUDE_PATTERN) \
 217           $(JDK_IMAGE_HOMEDIR)/demo/% \
 218           , \
 219           $(ALL_JDK_FILES) \
 220       )











 221   JDK_SYMBOLS_BUNDLE_FILES := \
 222       $(filter \
 223           $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
 224           $(SYMBOLS_EXCLUDE_PATTERN) \
 225           , \
 226           $(filter-out \
 227               $(JDK_IMAGE_HOMEDIR)/demo/% \
 228               , \
 229               $(ALL_JDK_SYMBOLS_FILES) \
 230           ) \
 231       ) \
 232       $(call FindFiles, $(SYMBOLS_IMAGE_DIR))
 233 
 234   TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
 235       $(ALL_JDK_DEMOS_FILES))
 236 
 237   ALL_JRE_FILES := $(call ShellFindFiles, $(JRE_IMAGE_DIR))
 238 
 239   # Create special filter rules when dealing with unzipped .dSYM directories on
 240   # macosx
 241   ifeq ($(OPENJDK_TARGET_OS), macosx)
 242     ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
 243       JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
 244           $(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
 245     endif
 246   endif
 247 










 248   JRE_BUNDLE_FILES := $(filter-out \
 249       $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
 250       $(SYMBOLS_EXCLUDE_PATTERN), \
 251       $(ALL_JRE_FILES))
 252 
 253   $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
 254       BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
 255       FILES := $(JDK_BUNDLE_FILES), \
 256       SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
 257       BASE_DIRS := $(JDK_IMAGE_DIR), \
 258       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 259   ))
 260 
 261   PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
 262 
 263   $(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
 264       BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
 265       FILES := $(JRE_BUNDLE_FILES), \
 266       BASE_DIRS := $(JRE_IMAGE_DIR), \
 267       SUBDIR := $(JRE_BUNDLE_SUBDIR), \
 268   ))
 269 
 270   LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
 271 
 272   ifeq ($(COPY_DEBUG_SYMBOLS), true)
 273     $(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
 274         BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
 275         FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
 276         BASE_DIRS := $(JDK_SYMBOLS_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
 277         SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 278         UNZIP_DEBUGINFO := true, \
 279     ))
 280 
 281     PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
 282   endif
 283 
 284   # The demo bundle is only created to support client tests. Ideally it should




 108         else ifeq ($$($1_TYPE)-$(TAR_SUPPORTS_TRANSFORM)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
 109             tar.gz-true-false-1)
 110           # If only one BASE_DIR, but with a SUBDIR set, tar.gz can use the
 111           # transform option to create bundle directly from the BASE_DIR.
 112           $(CD) $$($1_BASE_DIRS) \
 113               && ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
 114                   -$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
 115                   $$(if $$($1_SUBDIR), --transform 's|^|$$($1_SUBDIR)/|S') \
 116                   $(TAR_IGNORE_EXIT_VALUE) ) \
 117               | $(GZIP) > $$@
 118         else
 119           # In all other cases, need to copy all files into a temporary location
 120           # before creation bundle.
 121           $(RM) -r $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
 122           $(MKDIR) -p $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
 123           $$(foreach d, $$($1_BASE_DIRS), \
 124             ( $(CD) $$d \
 125             && $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
 126                 $(TAR_IGNORE_EXIT_VALUE) ) \
 127             | ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )
 128           # Rename stripped pdb files
 129             for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \
 130               $(ECHO) found stripped pdb file $$$${f}, we rename it to: $$$${f%stripped.pdb}pdb; \
 131               $(MV) $$$${f} $$$${f%stripped.pdb}pdb; \
 132             done
 133           # Unzip any zipped debuginfo files
 134           ifeq ($$($1_UNZIP_DEBUGINFO), true)
 135             for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
 136               $(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \
 137             done
 138           endif
 139           ifeq ($$($1_TYPE), tar.gz)
 140             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
 141             ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
 142                 $$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \
 143             | $(GZIP) > $$@
 144           else ifeq ($$($1_TYPE), zip)
 145             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ .
 146           endif
 147         endif
 148 
 149   $1 += $$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME)
 150 
 151 endef
 152 


 206 
 207   # Create special filter rules when dealing with unzipped .dSYM directories on
 208   # macosx
 209   ifeq ($(call isTargetOs, macosx), true)
 210     ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
 211       JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
 212           $(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \
 213           $(ALL_JDK_SYMBOLS_FILES))))
 214     endif
 215   endif
 216 
 217   JDK_BUNDLE_FILES := \
 218       $(filter-out \
 219           $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
 220           $(JDK_EXTRA_EXCLUDES) \
 221           $(SYMBOLS_EXCLUDE_PATTERN) \
 222           $(JDK_IMAGE_HOMEDIR)/demo/% \
 223           , \
 224           $(ALL_JDK_FILES) \
 225       )
 226 
 227   # include stripped pdb files in jdk image bundle
 228   ifeq ($(call isTargetOs, windows), true)
 229   JDK_STRIPPED_PDB_FILES := \
 230       $(filter \
 231            %.stripped.pdb \
 232           , \
 233           $(ALL_JDK_FILES) \
 234       )
 235 
 236   # remove the stripped pdb files from symbols bundle, we include only the full pdbs
 237   JDK_SYMBOLS_BUNDLE_FILES := \
 238       $(filter \
 239           $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
 240           $(SYMBOLS_EXCLUDE_PATTERN) \
 241           , \
 242           $(filter-out \
 243               $(JDK_IMAGE_HOMEDIR)/demo/%  %.stripped.pdb \
 244               , \
 245               $(ALL_JDK_SYMBOLS_FILES) \
 246           ) \
 247       ) \
 248       $(call FindFiles, $(SYMBOLS_IMAGE_DIR))
 249 
 250   TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
 251       $(ALL_JDK_DEMOS_FILES))
 252 
 253   ALL_JRE_FILES := $(call ShellFindFiles, $(JRE_IMAGE_DIR))
 254 
 255   # Create special filter rules when dealing with unzipped .dSYM directories on
 256   # macosx
 257   ifeq ($(OPENJDK_TARGET_OS), macosx)
 258     ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
 259       JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
 260           $(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
 261     endif
 262   endif
 263   
 264   # include stripped pdb files in jdk image bundle
 265   ifeq ($(call isTargetOs, windows), true)
 266   JRE_STRIPPED_PDB_FILES := \
 267       $(filter \
 268            %.stripped.pdb \
 269           , \
 270           $(ALL_JRE_FILES) \
 271       )
 272   endif
 273 
 274   JRE_BUNDLE_FILES := $(filter-out \
 275       $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
 276       $(SYMBOLS_EXCLUDE_PATTERN), \
 277       $(ALL_JRE_FILES))
 278 
 279   $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
 280       BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
 281       FILES := $(JDK_BUNDLE_FILES) $(JDK_STRIPPED_PDB_FILES), \
 282       SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
 283       BASE_DIRS := $(JDK_IMAGE_DIR), \
 284       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 285   ))
 286 
 287   PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
 288 
 289   $(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
 290       BUNDLE_NAME := $(JRE_BUNDLE_NAME) $(JRE_STRIPPED_PDB_FILES), \
 291       FILES := $(JRE_BUNDLE_FILES), \
 292       BASE_DIRS := $(JRE_IMAGE_DIR), \
 293       SUBDIR := $(JRE_BUNDLE_SUBDIR), \
 294   ))
 295 
 296   LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
 297 
 298   ifeq ($(COPY_DEBUG_SYMBOLS), true)
 299     $(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
 300         BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
 301         FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
 302         BASE_DIRS := $(JDK_SYMBOLS_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
 303         SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 304         UNZIP_DEBUGINFO := true, \
 305     ))
 306 
 307     PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
 308   endif
 309 
 310   # The demo bundle is only created to support client tests. Ideally it should


< prev index next >