< prev index next >

make/Bundles.gmk

Print this page
rev 59190 : [mq]: build-01


  84               $1_$$d_RELATIVE_FILES, $$($1_$$d_LIST_FILE))) \
  85           $$(CAT) $$($1_$$d_LIST_FILE) | $$(TR) '?' ' ' > $$($1_$$d_LIST_FILE).tmp \
  86               && $(MV) $$($1_$$d_LIST_FILE).tmp $$($1_$$d_LIST_FILE) $$(NEWLINE) \
  87         )
  88         ifneq ($$($1_SPECIAL_INCLUDES), )
  89           $$(foreach i, $$($1_SPECIAL_INCLUDES), \
  90             $$(foreach d, $$($1_BASE_DIRS), \
  91               ($(CD) $$d && $(FIND) $$i >> $$($1_$$d_LIST_FILE)) ; ))
  92         endif
  93         ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO), .-zip-false)
  94           # If no subdir is specified, zip can be done directly from BASE_DIRS.
  95           $$(foreach d, $$($1_BASE_DIRS), \
  96             ( $(CD) $$d \
  97             && $(ZIPEXE) -qru $$@ . -i@$$($1_$$d_LIST_FILE) \
  98             || test "$$$$?" = "12" )$$(NEWLINE))
  99         else ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
 100             .-tar.gz-false-1)
 101           # If no subdir is specified and only one BASE_DIR, tar.gz can be done
 102           # directly from BASE_DIR.
 103           $(CD) $$($1_BASE_DIRS) \
 104               && ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
 105                   -$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
 106                   $(TAR_IGNORE_EXIT_VALUE) ) \
 107               | $(GZIP) > $$@
 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           ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
 130             for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \
 131               $(ECHO) Renaming $$$${f} to $$$${f%stripped.pdb}pdb $(LOG_INFO); \
 132               $(MV) $$$${f} $$$${f%stripped.pdb}pdb; \
 133             done
 134           endif
 135           # Unzip any zipped debuginfo files
 136           ifeq ($$($1_UNZIP_DEBUGINFO), true)
 137             for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
 138               $(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \
 139             done
 140           endif
 141           ifeq ($$($1_TYPE), tar.gz)
 142             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
 143             ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
 144                 $$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \
 145             | $(GZIP) > $$@
 146           else ifeq ($$($1_TYPE), zip)
 147             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ .
 148           endif
 149         endif
 150 
 151   $1 += $$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME)
 152 
 153 endef
 154 
 155 ################################################################################
 156 
 157 # On Macosx, we bundle up the macosx specific images which already have the
 158 # correct base directories.
 159 ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
 160   JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
 161   JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
 162   JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
 163   JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home




  84               $1_$$d_RELATIVE_FILES, $$($1_$$d_LIST_FILE))) \
  85           $$(CAT) $$($1_$$d_LIST_FILE) | $$(TR) '?' ' ' > $$($1_$$d_LIST_FILE).tmp \
  86               && $(MV) $$($1_$$d_LIST_FILE).tmp $$($1_$$d_LIST_FILE) $$(NEWLINE) \
  87         )
  88         ifneq ($$($1_SPECIAL_INCLUDES), )
  89           $$(foreach i, $$($1_SPECIAL_INCLUDES), \
  90             $$(foreach d, $$($1_BASE_DIRS), \
  91               ($(CD) $$d && $(FIND) $$i >> $$($1_$$d_LIST_FILE)) ; ))
  92         endif
  93         ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO), .-zip-false)
  94           # If no subdir is specified, zip can be done directly from BASE_DIRS.
  95           $$(foreach d, $$($1_BASE_DIRS), \
  96             ( $(CD) $$d \
  97             && $(ZIPEXE) -qru $$@ . -i@$$($1_$$d_LIST_FILE) \
  98             || test "$$$$?" = "12" )$$(NEWLINE))
  99         else ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
 100             .-tar.gz-false-1)
 101           # If no subdir is specified and only one BASE_DIR, tar.gz can be done
 102           # directly from BASE_DIR.
 103           $(CD) $$($1_BASE_DIRS) \
 104               && ( $(TAR) cf - \
 105                   -$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
 106                   $(TAR_IGNORE_EXIT_VALUE) ) \
 107               | $(GZIP) > $$@
 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 - \
 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           ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
 130             for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \
 131               $(ECHO) Renaming $$$${f} to $$$${f%stripped.pdb}pdb $(LOG_INFO); \
 132               $(MV) $$$${f} $$$${f%stripped.pdb}pdb; \
 133             done
 134           endif
 135           # Unzip any zipped debuginfo files
 136           ifeq ($$($1_UNZIP_DEBUGINFO), true)
 137             for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
 138               $(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \
 139             done
 140           endif
 141           ifeq ($$($1_TYPE), tar.gz)
 142             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
 143             ( $(TAR) cf - \
 144                 $$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \
 145             | $(GZIP) > $$@
 146           else ifeq ($$($1_TYPE), zip)
 147             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ .
 148           endif
 149         endif
 150 
 151   $1 += $$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME)
 152 
 153 endef
 154 
 155 ################################################################################
 156 
 157 # On Macosx, we bundle up the macosx specific images which already have the
 158 # correct base directories.
 159 ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
 160   JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
 161   JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
 162   JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
 163   JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home


< prev index next >