extend interface for COPY_FILE: add AUTO and OUTPUT_INCLUDES parameters
@@ -3095,12 +3095,24 @@ macro _GENERATE_PY_EVS_INTERNAL(FILES...) {
}
}
-### @usage: COPY_FILE(File Destination)
+macro _COPY_FILE_IMPL(FILE, AUTO_DST="", NOAUTO_DST="", OUTPUT_INCLUDES[]) {
+ .CMD=$COPY_CMD ${input:File} ${output:AUTO_DST} ${output;noauto:NOAUTO_DST} ${output_include;hide:OUTPUT_INCLUDES} ${kv;hide:"p CP"} ${kv;hide:"pc light-cyan"}
+}
+
+### @usage: COPY_FILE(File Destination [AUTO] [OUTPUT_INCLUDES Deps...])
###
### Copy file to build root. It is possible to change both location and the name.
-### The file will be just copied. You should explicitly mention it in SRCS under new name for further processing.
-macro COPY_FILE(File, Destination) {
- .CMD=$COPY_CMD ${input:File} ${output;noauto:Destination} ${kv;hide:"p CP"} ${kv;hide:"pc light-cyan"}
+###
+### Parameters:
+### - File - Source file name.
+### - Destination - Output file name.
+### - AUTO - Consider copied file for further processing automtically.
+### - OUTPUT_INCLUDES output_includes... - Output file dependencies.
+###
+### The file will be just copied if AUTO boolean parameter is not specified. You should explicitly
+### mention it in SRCS under new name (or specify AUTO boolean parameter) for further processing.
+macro COPY_FILE(File, Destination, AUTO?"AUTO_DST":"NOAUTO_DST", OUTPUT_INCLUDES[]) {
+ .CMD=$_COPY_FILE_IMPL($File $AUTO $Destination OUTPUT_INCLUDES $OUTPUT_INCLUDES)
}
### @usage: COPY_FILE_WITH_DEPS(File Destination [OUTPUT_INCLUDES Deps...])
@@ -3109,7 +3121,7 @@ macro COPY_FILE(File, Destination) {
### File will be recompiled (but not re-copied) if any of specified dependencies changes
### It is possible to change both location and the name.
macro COPY_FILE_WITH_DEPS(File, Destination, OUTPUT_INCLUDES[]) {
- .CMD=$COPY_CMD ${input:File} ${output:Destination} ${output_include;hide:OUTPUT_INCLUDES} ${kv;hide:"p CP"} ${kv;hide:"pc light-cyan"}
+ .CMD=$_COPY_FILE_IMPL($File AUTO_DST $Destination OUTPUT_INCLUDES $OUTPUT_INCLUDES)
}
### @usage: COPY_FILE_WITH_DEPS_NO_AUTO(File Destination [OUTPUT_INCLUDES Deps...])
@@ -3118,7 +3130,7 @@ macro COPY_FILE_WITH_DEPS(File, Destination, OUTPUT_INCLUDES[]) {
### It is possible to change both location and the name.
### The file will be just copied. You should explicitly mention it in SRCS under new name for further compilation.
macro COPY_FILE_WITH_DEPS_NO_AUTO(File, Destination, OUTPUT_INCLUDES[]) {
- .CMD=$COPY_CMD ${input:File} ${output;noauto:Destination} ${output_include;hide:OUTPUT_INCLUDES} ${kv;hide:"p CP"} ${kv;hide:"pc light-cyan"}
+ .CMD=$_COPY_FILE_IMPL($File NOAUTO_DST $Destination OUTPUT_INCLUDES $OUTPUT_INCLUDES)
}
macro _BUNDLE_TARGET(Target, Destination) {
