diff options
author | Quentin Monnet <quentin.monnet@netronome.com> | 2017-12-08 00:00:17 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2017-12-08 20:14:02 +0100 |
commit | 658e85aa4ff2951f1e5163767827eaffccd51067 (patch) | |
tree | 5577f42990c84d5b78b6923a0bb57a45ed487b2f /tools/bpf/bpftool/Documentation | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next (diff) | |
download | linux-658e85aa4ff2951f1e5163767827eaffccd51067.tar.xz linux-658e85aa4ff2951f1e5163767827eaffccd51067.zip |
tools: bpftool: harmonise Makefile and Documentation/Makefile
Several minor fixes and harmonisation items for Makefiles:
* Use the same mechanism for verbose/non-verbose output in two files
("$(Q)"), for all commands.
* Use calls to "QUIET_INSTALL" and equivalent in Makefile. In
particular, use "call(descend, ...)" instead of "make -C" to run
documentation targets.
* Add a "doc-clean" target, aligned on "doc" and "doc-install".
* Make "install" target in Makefile depend on "bpftool".
* Remove condition on DESTDIR to initialise prefix in doc Makefile.
* Remove modification of VPATH based on OUTPUT, it is unused.
* Formatting: harmonise spaces around equal signs.
* Make install path for man pages /usr/local/man instead of
/usr/local/share/man (respects the Makefile conventions, and the
latter is usually a symbolic link to the former anyway).
* Do not erase prefix if set by user in bpftool Makefile.
* Fix install target for bpftool: append DESTDIR to install path.
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpftool/Documentation')
-rw-r--r-- | tools/bpf/bpftool/Documentation/Makefile | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/bpf/bpftool/Documentation/Makefile b/tools/bpf/bpftool/Documentation/Makefile index 37292bb5ce60..71c17fab4f2f 100644 --- a/tools/bpf/bpftool/Documentation/Makefile +++ b/tools/bpf/bpftool/Documentation/Makefile @@ -4,11 +4,14 @@ include ../../../scripts/utilities.mak INSTALL ?= install RM ?= rm -f -# Make the path relative to DESTDIR, not prefix -ifndef DESTDIR -prefix ?= /usr/local +ifeq ($(V),1) + Q = +else + Q = @ endif -mandir ?= $(prefix)/share/man + +prefix ?= /usr/local +mandir ?= $(prefix)/man man8dir = $(mandir)/man8 MAN8_RST = $(wildcard *.rst) @@ -20,15 +23,16 @@ man: man8 man8: $(DOC_MAN8) $(OUTPUT)%.8: %.rst - rst2man $< > $@ + $(QUIET_GEN)rst2man $< > $@ clean: - $(call QUIET_CLEAN, Documentation) $(RM) $(DOC_MAN8) + $(call QUIET_CLEAN, Documentation) + $(Q)$(RM) $(DOC_MAN8) install: man - $(call QUIET_INSTALL, Documentation-man) \ - $(INSTALL) -d -m 755 $(DESTDIR)$(man8dir); \ - $(INSTALL) -m 644 $(DOC_MAN8) $(DESTDIR)$(man8dir); + $(call QUIET_INSTALL, Documentation-man) + $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(man8dir) + $(Q)$(INSTALL) -m 644 $(DOC_MAN8) $(DESTDIR)$(man8dir) .PHONY: man man8 clean install .DEFAULT_GOAL := man |