make/common/Defs.gmk

Print this page




 453 
 454 #
 455 # The java/javac/jdk variables (JAVAC_CMD, JAVA_CMD, etc.)
 456 #
 457 include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk
 458 UNIQUE_PATH_PATTERN = $(subst /,.,$(UNIQUE_PATH))
 459 
 460 #
 461 # The modules variables
 462 #
 463 include $(JDK_TOPDIR)/make/common/Defs-modules.gmk
 464 
 465 # Install a file to its module
 466 define install-module-file
 467 dest=$(call GetModuleDest, $(@D)/) ; \
 468 $(MKDIR) -p $$dest; \
 469 $(CP) -f $@ $$dest; \
 470 $(TouchModule)
 471 endef
 472 








 473 # Install all files from the directory to its module
 474 define install-module-dir
 475 dest=$(call GetModuleDest, $(@D)/) ; \
 476 $(MKDIR) -p $$dest; \
 477 $(CP) -rf $(@D)/* $$dest; \
 478 $(TouchModule)
 479 endef
 480 
 481 # chmod the file in its module
 482 define chmod-module-file
 483 dest=$(call GetModuleDest, $@) ; \
 484 $(CHMOD) $1 $$dest
 485 endef
 486 
 487 # install a sym link in its module
 488 define install-module-sym-link
 489 dest=$(call GetModuleDest, $@) ; \
 490 $(LN) -sf $1 $$dest
 491 endef
 492 


 505 endef
 506 
 507 #
 508 # Convenient macros
 509 #
 510 
 511 # Prepare $@ target, remove old one and making sure directory exists
 512 define prep-target
 513 $(MKDIR) -p $(@D)
 514 $(RM) $@
 515 endef
 516 
 517 # Simple install of $< file to $@
 518 # and also install $< file to its module directory
 519 define install-file
 520 $(prep-target)
 521 $(CP) $< $@
 522 @$(install-module-file)
 523 endef
 524 






 525 # Include header files always belongs the base module
 526 define install-include-file
 527 $(prep-target)
 528 $(CP) $< $@
 529 dest=$(call GetBaseModuleDest, $(@D)/) ; \
 530 $(MKDIR) -p $$dest; \
 531 $(CP) -f $@ $$dest
 532 endef
 533 
 534 define chmod-file
 535 $(CHMOD) $1 $@
 536 @$(call chmod-module-file, $1)
 537 endef
 538 
 539 define install-sym-link
 540 $(LN) -s $1 $@
 541 @$(call install-module-sym-link, $1)
 542 endef
 543 
 544 #




 453 
 454 #
 455 # The java/javac/jdk variables (JAVAC_CMD, JAVA_CMD, etc.)
 456 #
 457 include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk
 458 UNIQUE_PATH_PATTERN = $(subst /,.,$(UNIQUE_PATH))
 459 
 460 #
 461 # The modules variables
 462 #
 463 include $(JDK_TOPDIR)/make/common/Defs-modules.gmk
 464 
 465 # Install a file to its module
 466 define install-module-file
 467 dest=$(call GetModuleDest, $(@D)/) ; \
 468 $(MKDIR) -p $$dest; \
 469 $(CP) -f $@ $$dest; \
 470 $(TouchModule)
 471 endef
 472 
 473 # Install a cmd to its module
 474 define install-module-cmd-file
 475 dest=$(MODULE_DEST_DIR)/bin ; \
 476 $(MKDIR) -p $$dest; \
 477 $(CP) -f $@ $$dest; \
 478 $(TouchModule)
 479 endef
 480 
 481 # Install all files from the directory to its module
 482 define install-module-dir
 483 dest=$(call GetModuleDest, $(@D)/) ; \
 484 $(MKDIR) -p $$dest; \
 485 $(CP) -rf $(@D)/* $$dest; \
 486 $(TouchModule)
 487 endef
 488 
 489 # chmod the file in its module
 490 define chmod-module-file
 491 dest=$(call GetModuleDest, $@) ; \
 492 $(CHMOD) $1 $$dest
 493 endef
 494 
 495 # install a sym link in its module
 496 define install-module-sym-link
 497 dest=$(call GetModuleDest, $@) ; \
 498 $(LN) -sf $1 $$dest
 499 endef
 500 


 513 endef
 514 
 515 #
 516 # Convenient macros
 517 #
 518 
 519 # Prepare $@ target, remove old one and making sure directory exists
 520 define prep-target
 521 $(MKDIR) -p $(@D)
 522 $(RM) $@
 523 endef
 524 
 525 # Simple install of $< file to $@
 526 # and also install $< file to its module directory
 527 define install-file
 528 $(prep-target)
 529 $(CP) $< $@
 530 @$(install-module-file)
 531 endef
 532 
 533 define install-cmd-file
 534 $(prep-target)
 535 $(CP) $< $@
 536 @$(install-module-cmd-file)
 537 endef
 538 
 539 # Include header files always belongs the base module
 540 define install-include-file
 541 $(prep-target)
 542 $(CP) $< $@
 543 dest=$(call GetBaseModuleDest, $(@D)/) ; \
 544 $(MKDIR) -p $$dest; \
 545 $(CP) -f $@ $$dest
 546 endef
 547 
 548 define chmod-file
 549 $(CHMOD) $1 $@
 550 @$(call chmod-module-file, $1)
 551 endef
 552 
 553 define install-sym-link
 554 $(LN) -s $1 $@
 555 @$(call install-module-sym-link, $1)
 556 endef
 557 
 558 #