linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/vm: Add missing Makefile rules
@ 2017-01-13 16:49 Daniel Thompson
  2017-01-13 16:56 ` Daniel Thompson
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Thompson @ 2017-01-13 16:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Daniel Thompson, linux-mm, linux-kernel, patches

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.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
---
 tools/vm/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

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
 CFLAGS = -Wall -Wextra -I../lib/
 LDFLAGS = $(LIBS)

+all: $(TARGETS)
+
 $(TARGETS): $(LIBS)

 $(LIBS):
@@ -20,3 +22,9 @@ $(LIBS):
 clean:
 	$(RM) page-types slabinfo page_owner_sort
 	make -C $(LIB_DIR) clean
+
+sbindir ?= /usr/sbin
+
+install: all
+	install -d $(DESTDIR)$(sbindir)
+	install -m 755 -p $(TARGETS) $(DESTDIR)$(sbindir)
--
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] tools/vm: Add missing Makefile rules
  2017-01-13 16:49 [PATCH] tools/vm: Add missing Makefile rules Daniel Thompson
@ 2017-01-13 16:56 ` Daniel Thompson
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Thompson @ 2017-01-13 16:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Daniel Thompson, linux-mm, linux-kernel, patches

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.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
---

Notes:
    This is a resend with the linux-mm list spelled correctly (and with
    special apologies to Andrew for the spam).

 tools/vm/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

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
 CFLAGS = -Wall -Wextra -I../lib/
 LDFLAGS = $(LIBS)

+all: $(TARGETS)
+
 $(TARGETS): $(LIBS)

 $(LIBS):
@@ -20,3 +22,9 @@ $(LIBS):
 clean:
 	$(RM) page-types slabinfo page_owner_sort
 	make -C $(LIB_DIR) clean
+
+sbindir ?= /usr/sbin
+
+install: all
+	install -d $(DESTDIR)$(sbindir)
+	install -m 755 -p $(TARGETS) $(DESTDIR)$(sbindir)
--
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-13 16:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13 16:49 [PATCH] tools/vm: Add missing Makefile rules Daniel Thompson
2017-01-13 16:56 ` Daniel Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).