makefiles/CopyFiles.gmk

Print this page




 275 
 276 ##########################################################################################
 277 
 278 #
 279 # How to install jvm.cfg.
 280 #
 281 ifeq ($(JVM_VARIANT_ZERO), true)
 282     JVMCFG_ARCH := zero
 283 else
 284     JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
 285 endif
 286 
 287 ifeq ($(OPENJDK_TARGET_OS),macosx)
 288   JVMCFG_SRC := $(JDK_TOPDIR)/src/macosx/bin/$(JVMCFG_ARCH)/jvm.cfg
 289 else
 290   JVMCFG_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(JVMCFG_ARCH)/jvm.cfg
 291 endif
 292 JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
 293 JVMCFG := $(JVMCFG_DIR)/jvm.cfg
 294 

 295 
 296 ifeq ($(OPENJDK_TARGET_CPU_BITS),32)


 297   # On 32-bit machines we have three potential VMs: client, server and minimal.
 298   # Historically we usually have both client and server and so that is what the
 299   # committed jvm.cfg expects (including platform specific ergonomics switches
 300   # to decide whether to use client or server by default). So when we have anything
 301   # other than client and server we need to define a new jvm.cfg file.
 302   # The main problem is deciding whether to use aliases for the VMs that are not
 303   # present and the current position is that we add aliases for client and server, but
 304   # not for minimal.
 305   # To do: should this also support, -zero and -zeroshark?
 306 
 307   CLIENT_AND_SERVER := $(and $(findstring true,$(JVM_VARIANT_SERVER)),$(findstring true,$(JVM_VARIANT_CLIENT)))
 308 
 309   ifeq ($(CLIENT_AND_SERVER), true)
 310     # Use the committed jvm.cfg for this 32 bit setup (the minimal
 311     # VM is already KNOWN on platforms that potentially support it)








 312     $(JVMCFG): $(JVMCFG_SRC)
 313         $(call install-file)
 314   else
 315     $(JVMCFG):
 316         $(MKDIR) -p $(@D)
 317         $(RM) $(@)
 318 
 319     # Now check for other permutations
 320     ifeq ($(JVM_VARIANT_SERVER), true)
 321         $(PRINTF) "-server KNOWN\n">>$(@)
 322         $(PRINTF) "-client ALIASED_TO -server\n">>$(@)
 323         ifeq ($(JVM_VARIANT_MINIMAL1), true)
 324             $(PRINTF) "-minimal KNOWN\n">>$(@)
 325         endif
 326     else
 327         ifeq ($(JVM_VARIANT_CLIENT), true)
 328             $(PRINTF) "-client KNOWN\n">>$(@)
 329             $(PRINTF) "-server ALIASED_TO -client\n">>$(@)
 330             ifeq ($(JVM_VARIANT_MINIMAL1), true)
 331                 $(PRINTF) "-minimal KNOWN\n">>$(@)
 332             endif
 333         else
 334             ifeq ($(JVM_VARIANT_MINIMAL1), true)
 335                 $(PRINTF) "-minimal KNOWN\n">>$(@)
 336                 $(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
 337                 $(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
 338             endif
 339         endif
 340     endif
 341   endif
 342 
 343 else
 344     # Use the default jvm.cfg for this 64 bit setup.
 345     $(JVMCFG): $(JVMCFG_SRC)
 346         $(call install-file)
 347 endif
 348 
 349 COPY_FILES += $(JVMCFG)
 350 
 351 ##########################################################################################
 352 
 353 PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-$(OPENJDK_TARGET_OS)
 354 PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
 355 
 356 $(PROPS_DST): $(PROPS_SRC)
 357         $(call install-file)
 358 
 359 COPY_FILES += $(PROPS_DST)
 360 
 361 ##########################################################################################
 362 
 363 POLICY_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.policy
 364 POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
 365 
 366 $(POLICY_DST): $(POLICY_SRC)




 275 
 276 ##########################################################################################
 277 
 278 #
 279 # How to install jvm.cfg.
 280 #
 281 ifeq ($(JVM_VARIANT_ZERO), true)
 282     JVMCFG_ARCH := zero
 283 else
 284     JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
 285 endif
 286 
 287 ifeq ($(OPENJDK_TARGET_OS),macosx)
 288   JVMCFG_SRC := $(JDK_TOPDIR)/src/macosx/bin/$(JVMCFG_ARCH)/jvm.cfg
 289 else
 290   JVMCFG_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(JVMCFG_ARCH)/jvm.cfg
 291 endif
 292 JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
 293 JVMCFG := $(JVMCFG_DIR)/jvm.cfg
 294 
 295 # To do: should this also support -zeroshark?
 296 
 297 ifeq ($(OPENJDK_TARGET_CPU_BITS),64)
 298   COPY_JVM_CFG_FILE := true
 299 else
 300   # On 32-bit machines we have three potential VMs: client, server and minimal.
 301   # Historically we usually have both client and server and so that is what the
 302   # committed jvm.cfg expects (including platform specific ergonomics switches
 303   # to decide whether to use client or server by default). So when we have anything
 304   # other than client and server we need to define a new jvm.cfg file.
 305   # The main problem is deciding whether to use aliases for the VMs that are not
 306   # present and the current position is that we add aliases for client and server, but
 307   # not for minimal.


 308   CLIENT_AND_SERVER := $(and $(findstring true,$(JVM_VARIANT_SERVER)),$(findstring true,$(JVM_VARIANT_CLIENT)))

 309   ifeq ($(CLIENT_AND_SERVER), true)
 310     COPY_JVM_CFG_FILE := true
 311   else
 312     # For zero, the default jvm.cfg file is sufficient
 313     ifeq ($(JVM_VARIANT_ZERO), true)
 314       COPY_JVM_CFG_FILE := true
 315     endif
 316   endif
 317 endif
 318 
 319 ifeq ($(COPY_JVM_CFG_FILE), true)
 320     $(JVMCFG): $(JVMCFG_SRC)
 321         $(call install-file)
 322 else
 323     $(JVMCFG):
 324         $(MKDIR) -p $(@D)
 325         $(RM) $(@)
 326 
 327     # Now check for other permutations
 328     ifeq ($(JVM_VARIANT_SERVER), true)
 329         $(PRINTF) "-server KNOWN\n">>$(@)
 330         $(PRINTF) "-client ALIASED_TO -server\n">>$(@)
 331         ifeq ($(JVM_VARIANT_MINIMAL1), true)
 332             $(PRINTF) "-minimal KNOWN\n">>$(@)
 333         endif
 334     else
 335         ifeq ($(JVM_VARIANT_CLIENT), true)
 336             $(PRINTF) "-client KNOWN\n">>$(@)
 337             $(PRINTF) "-server ALIASED_TO -client\n">>$(@)
 338             ifeq ($(JVM_VARIANT_MINIMAL1), true)
 339                 $(PRINTF) "-minimal KNOWN\n">>$(@)
 340             endif
 341         else
 342             ifeq ($(JVM_VARIANT_MINIMAL1), true)
 343                 $(PRINTF) "-minimal KNOWN\n">>$(@)
 344                 $(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
 345                 $(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
 346             endif
 347         endif
 348     endif






 349 endif
 350 
 351 COPY_FILES += $(JVMCFG)
 352 
 353 ##########################################################################################
 354 
 355 PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-$(OPENJDK_TARGET_OS)
 356 PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
 357 
 358 $(PROPS_DST): $(PROPS_SRC)
 359         $(call install-file)
 360 
 361 COPY_FILES += $(PROPS_DST)
 362 
 363 ##########################################################################################
 364 
 365 POLICY_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.policy
 366 POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
 367 
 368 $(POLICY_DST): $(POLICY_SRC)