make/Defs-internal.gmk

Print this page




  81 define ReportBuildTimes
  82 $(PRINTF) -- "-- Build times ----------\nTarget %s\nStart %s\nEnd   %s\n%s\n%s\n-------------------------\n" \
  83 $1 \
  84 "`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
  85 "`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
  86 "`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
  87 "`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
  88 endef
  89 
  90 ifdef OPENJDK
  91   ifneq ($(OPENJDK),true)
  92     x:=$(error "OPENJDK (if defined) can only be set to true")
  93   endif
  94 endif
  95 
  96 # Define absolute paths to TOPDIRs
  97 ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
  98 ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)")
  99 ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)")
 100 ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)")

 101 ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)")
 102 ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)")
 103 ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)")
 104 ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)")
 105 ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)")
 106 
 107 # Macro to return true or false if a file exists and is readable
 108 define MkExists
 109 $(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi)
 110 endef
 111 
 112 HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile)
 113 ifndef BUILD_HOTSPOT
 114   ifdef ALT_HOTSPOT_IMPORT_PATH
 115     BUILD_HOTSPOT := false
 116   else
 117     BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE)
 118   endif
 119 endif
 120 


 137 endif
 138 
 139 JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile)
 140 ifndef BUILD_JAXP
 141   ifdef ALT_JAXP_DIST
 142     BUILD_JAXP := false
 143   else
 144     BUILD_JAXP := $(JAXP_SRC_AVAILABLE)
 145   endif
 146 endif
 147 
 148 JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile)
 149 ifndef BUILD_JAXWS
 150   ifdef ALT_JAXWS_DIST
 151     BUILD_JAXWS := false
 152   else
 153     BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE)
 154   endif
 155 endif
 156 



















 157 JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile)
 158 ifndef BUILD_JDK
 159   BUILD_JDK := $(JDK_SRC_AVAILABLE)
 160 endif
 161 ifeq ($(JDK_SRC_AVAILABLE),true)
 162   JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed)
 163   ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false)
 164     OPENJDK = true
 165   endif
 166 endif
 167 
 168 DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile)
 169 ifndef BUILD_DEPLOY
 170   BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE)
 171 endif
 172 
 173 INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile)
 174 ifndef BUILD_INSTALL
 175   ifdef DEV_ONLY
 176     BUILD_INSTALL := false


 274   endif
 275   ifneq ($(BUILD_CORBA), true)
 276     GENERATE_DOCS=false
 277   endif
 278   ifneq ($(BUILD_JAXP), true)
 279     GENERATE_DOCS=false
 280   endif
 281   ifneq ($(BUILD_JAXWS), true)
 282     GENERATE_DOCS=false
 283   endif
 284   ifeq ($(GENERATE_DOCS),false)
 285     NO_DOCS=true
 286   endif
 287 else
 288   GENERATE_DOCS=false
 289 endif
 290 
 291 # Output directory for hotspot build
 292 HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot
 293 



 294 # If we are building components
 295 ifndef ALT_LANGTOOLS_DIST
 296   LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools
 297   ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist
 298 endif
 299 ifndef ALT_CORBA_DIST
 300   CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba
 301   ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist
 302 endif
 303 ifndef ALT_JAXP_DIST
 304   JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp
 305   ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist
 306 endif
 307 ifndef ALT_JAXWS_DIST
 308   JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws
 309   ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist
 310 endif
 311 
 312 # Common make arguments (supplied to all component builds)
 313 COMMON_BUILD_ARGUMENTS = \




  81 define ReportBuildTimes
  82 $(PRINTF) -- "-- Build times ----------\nTarget %s\nStart %s\nEnd   %s\n%s\n%s\n-------------------------\n" \
  83 $1 \
  84 "`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
  85 "`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
  86 "`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
  87 "`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
  88 endef
  89 
  90 ifdef OPENJDK
  91   ifneq ($(OPENJDK),true)
  92     x:=$(error "OPENJDK (if defined) can only be set to true")
  93   endif
  94 endif
  95 
  96 # Define absolute paths to TOPDIRs
  97 ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
  98 ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)")
  99 ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)")
 100 ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)")
 101 ABS_BDB_TOPDIR:=$(call OptFullPath,"$(BDB_TOPDIR)")
 102 ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)")
 103 ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)")
 104 ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)")
 105 ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)")
 106 ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)")
 107 
 108 # Macro to return true or false if a file exists and is readable
 109 define MkExists
 110 $(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi)
 111 endef
 112 
 113 HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile)
 114 ifndef BUILD_HOTSPOT
 115   ifdef ALT_HOTSPOT_IMPORT_PATH
 116     BUILD_HOTSPOT := false
 117   else
 118     BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE)
 119   endif
 120 endif
 121 


 138 endif
 139 
 140 JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile)
 141 ifndef BUILD_JAXP
 142   ifdef ALT_JAXP_DIST
 143     BUILD_JAXP := false
 144   else
 145     BUILD_JAXP := $(JAXP_SRC_AVAILABLE)
 146   endif
 147 endif
 148 
 149 JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile)
 150 ifndef BUILD_JAXWS
 151   ifdef ALT_JAXWS_DIST
 152     BUILD_JAXWS := false
 153   else
 154     BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE)
 155   endif
 156 endif
 157 
 158 # If USE_SYSTEM_BDB is defined then simply ignore the bdb repo.
 159 # If the bdb repo does not exist then set USE_SYSTEM_BDB
 160 BDB_SRC_AVAILABLE := $(call MkExists,$(BDB_TOPDIR)/make/Makefile)
 161 ifdef USE_SYSTEM_BDB
 162   BUILD_BDB := false
 163   USE_SYSTEM_BDB := true
 164 else
 165   ifndef BUILD_BDB
 166     ifdef ALT_BDB_IMPORT_PATH
 167       BUILD_BDB := false
 168     else
 169       BUILD_BDB := $(BDB_SRC_AVAILABLE)
 170       ifeq ($(BUILD_BDB),false)
 171         USE_SYSTEM_BDB := true
 172       endif
 173     endif
 174   endif
 175 endif
 176 
 177 JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile)
 178 ifndef BUILD_JDK
 179   BUILD_JDK := $(JDK_SRC_AVAILABLE)
 180 endif
 181 ifeq ($(JDK_SRC_AVAILABLE),true)
 182   JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed)
 183   ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false)
 184     OPENJDK = true
 185   endif
 186 endif
 187 
 188 DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile)
 189 ifndef BUILD_DEPLOY
 190   BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE)
 191 endif
 192 
 193 INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile)
 194 ifndef BUILD_INSTALL
 195   ifdef DEV_ONLY
 196     BUILD_INSTALL := false


 294   endif
 295   ifneq ($(BUILD_CORBA), true)
 296     GENERATE_DOCS=false
 297   endif
 298   ifneq ($(BUILD_JAXP), true)
 299     GENERATE_DOCS=false
 300   endif
 301   ifneq ($(BUILD_JAXWS), true)
 302     GENERATE_DOCS=false
 303   endif
 304   ifeq ($(GENERATE_DOCS),false)
 305     NO_DOCS=true
 306   endif
 307 else
 308   GENERATE_DOCS=false
 309 endif
 310 
 311 # Output directory for hotspot build
 312 HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot
 313 
 314 # Output directory for bdb build
 315 BDB_DIR = $(ABS_OUTPUTDIR)/bdb
 316 
 317 # If we are building components
 318 ifndef ALT_LANGTOOLS_DIST
 319   LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools
 320   ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist
 321 endif
 322 ifndef ALT_CORBA_DIST
 323   CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba
 324   ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist
 325 endif
 326 ifndef ALT_JAXP_DIST
 327   JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp
 328   ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist
 329 endif
 330 ifndef ALT_JAXWS_DIST
 331   JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws
 332   ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist
 333 endif
 334 
 335 # Common make arguments (supplied to all component builds)
 336 COMMON_BUILD_ARGUMENTS = \