< prev index next >

make/common/MakeBase.gmk

Print this page




 717   # Param 2 - (optional) specialization. Normally "-a \( ... \)" expression.
 718   define CacheFind
 719     $(shell $(FIND) $1 \( -type f -o -type l \) $2 | $(TR) ' ' '?')
 720   endef
 721 endif
 722 
 723 ################################################################################
 724 
 725 define AddFileToCopy
 726   # Helper macro for SetupCopyFiles
 727   # 1 : Source file
 728   # 2 : Dest file
 729   # 3 : Variable to add targets to
 730   # 4 : Macro to call for copy operation
 731   # 5 : Action text to log
 732   $2: $1
 733         $$(call LogInfo, $(strip $5) $$(patsubst $(OUTPUTDIR)/%,%,$$(call DecodeSpace, $$@)))
 734         $$($$(strip $4))
 735 
 736   $3 += $2

 737 endef
 738 
 739 # Returns the value of the first argument
 740 identity = \
 741     $(strip $1)
 742 
 743 # Setup make rules for copying files, with an option to do more complex
 744 # processing instead of copying.
 745 #
 746 # Parameter 1 is the name of the rule. This name is used as variable prefix,
 747 # and the targets generated are listed in a variable by that name.


 748 #
 749 # Remaining parameters are named arguments. These include:
 750 #   SRC     : Source root dir (defaults to dir of first file)
 751 #   DEST    : Dest root dir
 752 #   FILES   : List of files to copy with absolute paths, or path relative to SRC.
 753 #             Must be in SRC.
 754 #   FLATTEN : Set to flatten the directory structure in the DEST dir.
 755 #   MACRO   : Optionally override the default macro used for making the copy.
 756 #             Default is 'install-file'
 757 #   NAME_MACRO : Optionally supply a macro that rewrites the target file name
 758 #                based on the source file name
 759 #   LOG_ACTION : Optionally specify a different action text for log messages
 760 SetupCopyFiles = $(NamedParamsMacroTemplate)
 761 define SetupCopyFilesBody
 762 
 763   ifeq ($$($1_MACRO), )
 764     $1_MACRO := install-file
 765   endif
 766 
 767   # Default SRC to the dir of the first file.




 717   # Param 2 - (optional) specialization. Normally "-a \( ... \)" expression.
 718   define CacheFind
 719     $(shell $(FIND) $1 \( -type f -o -type l \) $2 | $(TR) ' ' '?')
 720   endef
 721 endif
 722 
 723 ################################################################################
 724 
 725 define AddFileToCopy
 726   # Helper macro for SetupCopyFiles
 727   # 1 : Source file
 728   # 2 : Dest file
 729   # 3 : Variable to add targets to
 730   # 4 : Macro to call for copy operation
 731   # 5 : Action text to log
 732   $2: $1
 733         $$(call LogInfo, $(strip $5) $$(patsubst $(OUTPUTDIR)/%,%,$$(call DecodeSpace, $$@)))
 734         $$($$(strip $4))
 735 
 736   $3 += $2
 737   $3_SOURCES += $1
 738 endef
 739 
 740 # Returns the value of the first argument
 741 identity = \
 742     $(strip $1)
 743 
 744 # Setup make rules for copying files, with an option to do more complex
 745 # processing instead of copying.
 746 #
 747 # Parameter 1 is the name of the rule. This name is used as variable prefix,
 748 # and the targets generated are listed in a variable by that name.
 749 #
 750 # The list of all source files is returned in $1_SOURCES.
 751 #
 752 # Remaining parameters are named arguments. These include:
 753 #   SRC     : Source root dir (defaults to dir of first file)
 754 #   DEST    : Dest root dir
 755 #   FILES   : List of files to copy with absolute paths, or path relative to SRC.
 756 #             Must be in SRC.
 757 #   FLATTEN : Set to flatten the directory structure in the DEST dir.
 758 #   MACRO   : Optionally override the default macro used for making the copy.
 759 #             Default is 'install-file'
 760 #   NAME_MACRO : Optionally supply a macro that rewrites the target file name
 761 #                based on the source file name
 762 #   LOG_ACTION : Optionally specify a different action text for log messages
 763 SetupCopyFiles = $(NamedParamsMacroTemplate)
 764 define SetupCopyFilesBody
 765 
 766   ifeq ($$($1_MACRO), )
 767     $1_MACRO := install-file
 768   endif
 769 
 770   # Default SRC to the dir of the first file.


< prev index next >