diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2017-02-22 18:40:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 19:41:26 -0500 |
commit | 0937577d5f5720046252196f811def2eae470593 (patch) | |
tree | ddb9770ee4e20e0249e84dda8a83c8ec5fbdb43a /tools/vm | |
parent | a5759b2bffa807a727cbf6790ecdc4df2ae8e4d4 (diff) |
tools/vm: add missing Makefile rules
Currently the tools/vm Makefile has a rather arbitrary implicit build
rule; page-types is the first value in TARGETS so lets just build that
one! Additionally there is no install rule and this is needed for make -C
tools vm_install to work properly.
Provide a more sensible implicit build rule and a new install rule.
Note that the variables names used by the install rule (DESTDIR and
sbindir) are copied from prior-art in tools/power/cpupower.
Link: http://lkml.kernel.org/r/20170113165630.27541-1-daniel.thompson@linaro.org
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/vm')
-rw-r--r-- | tools/vm/Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/vm/Makefile b/tools/vm/Makefile index 93aadaf7ff63..006029456988 100644 --- a/tools/vm/Makefile +++ b/tools/vm/Makefile | |||
@@ -9,6 +9,8 @@ CC = $(CROSS_COMPILE)gcc | |||
9 | CFLAGS = -Wall -Wextra -I../lib/ | 9 | CFLAGS = -Wall -Wextra -I../lib/ |
10 | LDFLAGS = $(LIBS) | 10 | LDFLAGS = $(LIBS) |
11 | 11 | ||
12 | all: $(TARGETS) | ||
13 | |||
12 | $(TARGETS): $(LIBS) | 14 | $(TARGETS): $(LIBS) |
13 | 15 | ||
14 | $(LIBS): | 16 | $(LIBS): |
@@ -20,3 +22,9 @@ $(LIBS): | |||
20 | clean: | 22 | clean: |
21 | $(RM) page-types slabinfo page_owner_sort | 23 | $(RM) page-types slabinfo page_owner_sort |
22 | make -C $(LIB_DIR) clean | 24 | make -C $(LIB_DIR) clean |
25 | |||
26 | sbindir ?= /usr/sbin | ||
27 | |||
28 | install: all | ||
29 | install -d $(DESTDIR)$(sbindir) | ||
30 | install -m 755 -p $(TARGETS) $(DESTDIR)$(sbindir) | ||