Skip to contentSkip to conversation

tools/vm: Add missing Makefile rules

PATCH New Daniel Thompson 1 participant 2 messages Jan 13, 2017 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 tools/vm/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)
tools/vm/Makefile +8 -0
index 93aadaf7ff63..006029456988 100644
@@ -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

#1 lore raw

PATCH 1/1 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.

---

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(+)
tools/vm/Makefile +8 -0
index 93aadaf7ff63..006029456988 100644
@@ -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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>