From: Andrew Jones <ajones@ventanamicro.com>
To: opensbi@lists.infradead.org
Subject: [PATCH v2 3/5] Makefile: clean '.c' files generated by carray
Date: Wed, 28 Feb 2024 15:23:40 +0100 [thread overview]
Message-ID: <20240228-0575feceddadf1436bb41adb@orel> (raw)
In-Reply-To: <20240215161625.314131-4-ivan.orlov0322@gmail.com>
On Thu, Feb 15, 2024 at 04:16:23PM +0000, Ivan Orlov wrote:
> `make clean` doesn't clear the '*.c' files generated by carray.sh
> in the 'build' directory. Fix it by extending the 'clean' makefile
> target.
>
> This is the only way we are able to regenerate the carray .c file in
> case if we add a new test to the 'carray-sbi_unit_tests-y' Makefile
> variable. However, running `make clear` every time we add a new test
> is not really convenient, so the mechanics should be changed in the
> future.
>
> Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
> ---
> Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 680c19a..4519277 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -684,6 +684,8 @@ clean:
> $(CMD_PREFIX)find $(build_dir) -type f -name "*.bin" -exec rm -rf {} +
> $(if $(V), @echo " RM $(build_dir)/*.dtb")
> $(CMD_PREFIX)find $(build_dir) -type f -name "*.dtb" -exec rm -rf {} +
> + $(if $(V), @echo " RM $(build_dir)/*.c")
> + $(CMD_PREFIX)find $(build_dir) -type f -name "*.c" -exec rm -rf {} +
I realize these *.c files are in $build_dir, so they're supposed to be
generated files, but it still looks scary to remove source files. I
think we should try to be more specific. Maybe we should put all generated
source files in directories named 'generated' or something and then only
remove files in those directories.
Thanks,
drew
>
> # Rule for "make distclean"
> .PHONY: distclean
> --
> 2.34.1
>
next prev parent reply other threads:[~2024-02-28 14:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 16:16 [PATCH v2 0/5] SBIUnit: cover OpenSBI with tests Ivan Orlov
2024-02-15 16:16 ` [PATCH v2 1/5] docs: Add documentation about tests and SBIUnit Ivan Orlov
2024-02-28 13:47 ` Andrew Jones
2024-02-28 16:01 ` Ivan Orlov
2024-02-15 16:16 ` [PATCH v2 2/5] lib: Add SBIUnit testing macros and functions Ivan Orlov
2024-02-28 14:19 ` Andrew Jones
2024-02-28 16:12 ` Ivan Orlov
2024-02-28 16:30 ` Andrew Jones
2024-02-28 16:43 ` Ivan Orlov
2024-02-28 17:00 ` Andrew Jones
2024-02-28 17:10 ` Ivan Orlov
2024-02-15 16:16 ` [PATCH v2 3/5] Makefile: clean '.c' files generated by carray Ivan Orlov
2024-02-28 14:23 ` Andrew Jones [this message]
2024-02-28 16:18 ` Ivan Orlov
2024-02-28 16:32 ` Andrew Jones
2024-02-28 16:52 ` Ivan Orlov
2024-02-15 16:16 ` [PATCH v2 4/5] lib: tests: Add a test for sbi_bitmap Ivan Orlov
2024-02-28 14:28 ` Andrew Jones
2024-02-15 16:16 ` [PATCH v2 5/5] lib: tests: Add sbi_console test Ivan Orlov
2024-02-18 5:34 ` Xiang W
2024-02-18 20:54 ` Ivan Orlov
2024-02-28 14:33 ` Andrew Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240228-0575feceddadf1436bb41adb@orel \
--to=ajones@ventanamicro.com \
--cc=opensbi@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.