diff mbox series

[2/3] scripts/carray.sh: Add comment to generated files

Message ID 20240401213438.590209-3-ivan.orlov0322@gmail.com
State New
Headers show
Series CArray improvements | expand

Commit Message

Ivan Orlov April 1, 2024, 9:34 p.m. UTC
Add a comment about where auto-generated file came from to the carray.sh
output. This should help avoiding confusion for the developers looking
at the build artifacts and finding .c files there.

Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
---
 scripts/carray.sh | 1 +
 1 file changed, 1 insertion(+)

Comments

Andrew Jones April 22, 2024, 3:21 p.m. UTC | #1
On Mon, Apr 01, 2024 at 10:34:37PM +0100, Ivan Orlov wrote:
> Add a comment about where auto-generated file came from to the carray.sh
> output. This should help avoiding confusion for the developers looking
> at the build artifacts and finding .c files there.
> 
> Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
> ---
>  scripts/carray.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/carray.sh b/scripts/carray.sh
> index 13f9d36..1fa2366 100755
> --- a/scripts/carray.sh
> +++ b/scripts/carray.sh
> @@ -61,6 +61,7 @@ if [ -z "${ARRAY_NAME}" ]; then
>  	usage
>  fi
>  
> +printf "// Generated with $(basename $0) from $(basename ${CONFIG_FILE})\n"
>  printf "#include <%s>\n\n" "${TYPE_HEADER}"
>  
>  for VAR in ${VAR_LIST}; do
> -- 
> 2.34.1
>

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Ben Dooks April 23, 2024, 3:25 p.m. UTC | #2
On 01/04/2024 22:34, Ivan Orlov wrote:
> Add a comment about where auto-generated file came from to the carray.sh
> output. This should help avoiding confusion for the developers looking
> at the build artifacts and finding .c files there.
> 
> Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
> ---
>   scripts/carray.sh | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/carray.sh b/scripts/carray.sh
> index 13f9d36..1fa2366 100755
> --- a/scripts/carray.sh
> +++ b/scripts/carray.sh
> @@ -61,6 +61,7 @@ if [ -z "${ARRAY_NAME}" ]; then
>   	usage
>   fi
>   
> +printf "// Generated with $(basename $0) from $(basename ${CONFIG_FILE})\n"
>   printf "#include <%s>\n\n" "${TYPE_HEADER}"
>   
>   for VAR in ${VAR_LIST}; do

minor nit, "Auto generated" might be a better comment start.
diff mbox series

Patch

diff --git a/scripts/carray.sh b/scripts/carray.sh
index 13f9d36..1fa2366 100755
--- a/scripts/carray.sh
+++ b/scripts/carray.sh
@@ -61,6 +61,7 @@  if [ -z "${ARRAY_NAME}" ]; then
 	usage
 fi
 
+printf "// Generated with $(basename $0) from $(basename ${CONFIG_FILE})\n"
 printf "#include <%s>\n\n" "${TYPE_HEADER}"
 
 for VAR in ${VAR_LIST}; do