* [PATCH] tools lib bpf: Fix double file test in Makefile
@ 2017-08-15 16:33 Daniel Díaz
2017-08-17 2:19 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Díaz @ 2017-08-15 16:33 UTC (permalink / raw)
To: linux-kernel; +Cc: acme, peterz, mingo, Daniel Díaz
The Makefile verifies the same file exists twice:
test -f ../../../include/uapi/linux/bpf.h -a \
-f ../../../include/uapi/linux/bpf.h
The purpose of the check is to ensure the diff (immediately
after the test) doesn't fail with these two files:
/tools/include/uapi/linux/bpf.h
/include/uapi/linux/bpf.h
Same recipe for bpf_common:
test -f ../../../include/uapi/linux/bpf_common.h -a \
-f ../../../include/uapi/linux/bpf_common.h
This corrects the location of the tests.
Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
---
tools/lib/bpf/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index 1f5300e..9216c31 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -154,10 +154,10 @@ all: fixdep $(VERSION_FILES) all_cmd
all_cmd: $(CMD_TARGETS)
$(BPF_IN): force elfdep bpfdep
- @(test -f ../../../include/uapi/linux/bpf.h -a -f ../../../include/uapi/linux/bpf.h && ( \
+ @(test -f ../../include/uapi/linux/bpf.h -a -f ../../../include/uapi/linux/bpf.h && ( \
(diff -B ../../include/uapi/linux/bpf.h ../../../include/uapi/linux/bpf.h >/dev/null) || \
echo "Warning: tools/include/uapi/linux/bpf.h differs from kernel" >&2 )) || true
- @(test -f ../../../include/uapi/linux/bpf_common.h -a -f ../../../include/uapi/linux/bpf_common.h && ( \
+ @(test -f ../../include/uapi/linux/bpf_common.h -a -f ../../../include/uapi/linux/bpf_common.h && ( \
(diff -B ../../include/uapi/linux/bpf_common.h ../../../include/uapi/linux/bpf_common.h >/dev/null) || \
echo "Warning: tools/include/uapi/linux/bpf_common.h differs from kernel" >&2 )) || true
$(Q)$(MAKE) $(build)=libbpf
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] tools lib bpf: Fix double file test in Makefile
2017-08-15 16:33 [PATCH] tools lib bpf: Fix double file test in Makefile Daniel Díaz
@ 2017-08-17 2:19 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-08-17 2:19 UTC (permalink / raw)
To: Daniel Díaz; +Cc: linux-kernel, peterz, mingo
Em Tue, Aug 15, 2017 at 11:33:30AM -0500, Daniel Díaz escreveu:
> The Makefile verifies the same file exists twice:
> test -f ../../../include/uapi/linux/bpf.h -a \
> -f ../../../include/uapi/linux/bpf.h
>
> The purpose of the check is to ensure the diff (immediately
> after the test) doesn't fail with these two files:
> /tools/include/uapi/linux/bpf.h
> /include/uapi/linux/bpf.h
>
> Same recipe for bpf_common:
> test -f ../../../include/uapi/linux/bpf_common.h -a \
> -f ../../../include/uapi/linux/bpf_common.h
>
> This corrects the location of the tests.
Patch doesn't apply, conflicts with:
[acme@jouet linux]$ git log --oneline -1 8255e1efc193f
8255e1efc193 perf build: Clarify open-coded header version warning message
That is in my tip/perf/core and on tip/perf/core, that is where perf
development for next version takes place.
I'll fix it up.
Thanks,
- Arnaldo
> Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
> ---
> tools/lib/bpf/Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
> index 1f5300e..9216c31 100644
> --- a/tools/lib/bpf/Makefile
> +++ b/tools/lib/bpf/Makefile
> @@ -154,10 +154,10 @@ all: fixdep $(VERSION_FILES) all_cmd
> all_cmd: $(CMD_TARGETS)
>
> $(BPF_IN): force elfdep bpfdep
> - @(test -f ../../../include/uapi/linux/bpf.h -a -f ../../../include/uapi/linux/bpf.h && ( \
> + @(test -f ../../include/uapi/linux/bpf.h -a -f ../../../include/uapi/linux/bpf.h && ( \
> (diff -B ../../include/uapi/linux/bpf.h ../../../include/uapi/linux/bpf.h >/dev/null) || \
> echo "Warning: tools/include/uapi/linux/bpf.h differs from kernel" >&2 )) || true
> - @(test -f ../../../include/uapi/linux/bpf_common.h -a -f ../../../include/uapi/linux/bpf_common.h && ( \
> + @(test -f ../../include/uapi/linux/bpf_common.h -a -f ../../../include/uapi/linux/bpf_common.h && ( \
> (diff -B ../../include/uapi/linux/bpf_common.h ../../../include/uapi/linux/bpf_common.h >/dev/null) || \
> echo "Warning: tools/include/uapi/linux/bpf_common.h differs from kernel" >&2 )) || true
> $(Q)$(MAKE) $(build)=libbpf
> --
> 2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-17 2:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15 16:33 [PATCH] tools lib bpf: Fix double file test in Makefile Daniel Díaz
2017-08-17 2:19 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox