mbox series

[bpf-next,0/7] tools: bpf: standardize make

Message ID cover.1520545951.git.jbenc@redhat.com
Headers show
Series tools: bpf: standardize make | expand

Message

Jiri Benc March 8, 2018, 10 p.m. UTC
Currently, 'make bpf' in the tools/ directory does not provide the standard
quiet output except for bpftool (which is however listed with a wrong
directory). Worse, it does not respect the build output directory.

The 'make bpf_install' does not work as one would expect, either. It
installs unconditionally to /usr/bin without respecting DESTDIR and prefix.

This patchset improves that behavior.

Jiri Benc (7):
  tools: bpftool: silence 'missing initializer' warnings
  tools: bpf: respect output directory during build
  tools: bpf: consistent make bpf_install
  tools: bpf: make install should build first
  tools: bpf: call descend in Makefile
  tools: bpf: respect quiet/verbose build
  tools: bpf: silence make by not deleting intermediate file

 tools/bpf/Makefile         | 74 +++++++++++++++++++++++++++++++---------------
 tools/bpf/bpftool/Makefile |  2 +-
 2 files changed, 51 insertions(+), 25 deletions(-)

Comments

Alexei Starovoitov March 9, 2018, 5:10 a.m. UTC | #1
On Thu, Mar 8, 2018 at 2:00 PM, Jiri Benc <jbenc@redhat.com> wrote:
> Currently, 'make bpf' in the tools/ directory does not provide the standard
> quiet output except for bpftool (which is however listed with a wrong
> directory). Worse, it does not respect the build output directory.
>
> The 'make bpf_install' does not work as one would expect, either. It
> installs unconditionally to /usr/bin without respecting DESTDIR and prefix.
>
> This patchset improves that behavior.

Jakub,
please review this set.

Thanks!
Jakub Kicinski March 9, 2018, 7:36 a.m. UTC | #2
On Thu, 8 Mar 2018 21:10:59 -0800, Alexei Starovoitov wrote:
> On Thu, Mar 8, 2018 at 2:00 PM, Jiri Benc <jbenc@redhat.com> wrote:
> > Currently, 'make bpf' in the tools/ directory does not provide the standard
> > quiet output except for bpftool (which is however listed with a wrong
> > directory). Worse, it does not respect the build output directory.
> >
> > The 'make bpf_install' does not work as one would expect, either. It
> > installs unconditionally to /usr/bin without respecting DESTDIR and prefix.
> >
> > This patchset improves that behavior.  
> 
> Jakub,
> please review this set.
> 
> Thanks!

I stared at it for a while, and it looks good!

Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>

In addition I found a GCC 7 warning in bpftool, .PHONY lacks some
targets and we don't clean up after feature detection.  I'll send
patches for that unless someone beats me to it.
Daniel Borkmann March 9, 2018, 9:29 a.m. UTC | #3
On 03/08/2018 11:00 PM, Jiri Benc wrote:
> Currently, 'make bpf' in the tools/ directory does not provide the standard
> quiet output except for bpftool (which is however listed with a wrong
> directory). Worse, it does not respect the build output directory.
> 
> The 'make bpf_install' does not work as one would expect, either. It
> installs unconditionally to /usr/bin without respecting DESTDIR and prefix.
> 
> This patchset improves that behavior.
> 
> Jiri Benc (7):
>   tools: bpftool: silence 'missing initializer' warnings
>   tools: bpf: respect output directory during build
>   tools: bpf: consistent make bpf_install
>   tools: bpf: make install should build first
>   tools: bpf: call descend in Makefile
>   tools: bpf: respect quiet/verbose build
>   tools: bpf: silence make by not deleting intermediate file
> 
>  tools/bpf/Makefile         | 74 +++++++++++++++++++++++++++++++---------------
>  tools/bpf/bpftool/Makefile |  2 +-
>  2 files changed, 51 insertions(+), 25 deletions(-)

Looks good to me as well, applied to bpf-next, thanks Jiri!