[Crash-utility] [PATCH v2 2/4] extensions: fix defs.h dependency
lijiang
lijiang at redhat.com
Wed Dec 22 14:00:01 UTC 2021
Hi, Sven
Thank you for the improvement.
On Mon, Dec 20, 2021 at 9:17 PM <crash-utility-request at redhat.com> wrote:
> Date: Mon, 20 Dec 2021 14:16:49 +0100
> From: Sven Schnelle <svens at linux.ibm.com>
> To: crash-utility at redhat.com
> Subject: [Crash-utility] [PATCH v2 2/4] extensions: fix defs.h
> dependency
> Message-ID: <20211220131651.1291387-3-svens at linux.ibm.com>
> Content-Type: text/plain; charset="US-ASCII"
>
> defs.h must be a dependency on each source files, otherwise
> targets might be built before defs.h is linked into the directory.
>
> Signed-off-by: Sven Schnelle <svens at linux.ibm.com>
> ---
> extensions/Makefile | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/extensions/Makefile b/extensions/Makefile
> index 0ad625af37ce..2894b9aa5a08 100644
> --- a/extensions/Makefile
> +++ b/extensions/Makefile
> @@ -26,9 +26,9 @@
>
> CONTRIB_SO := $(patsubst %.c,%.so,$(wildcard *.c))
>
> -all: link_defs $(CONTRIB_SO)
> -
> -link_defs:
> +all: $(CONTRIB_SO)
> +
> +defs.h:
> @rm -f defs.h
> @ln ../defs.h
>
Could you please describe more details about the above changes or give
an example to prove that it has this risk?
I noticed that all object files(.so and .c) have the dependency of
defs.h, the following code was copied from Makefile:
all: link_defs $(CONTRIB_SO)
link_defs:
@rm -f defs.h
@ln ../defs.h
$(CONTRIB_SO): %.so: %.c defs.h
Thanks.
Lianbo
> --
> 2.32.0
More information about the Crash-utility
mailing list