[11/14] batctl: Make called tools in clean and install configurable

Message ID 1305980898-30494-11-git-send-email-sven@narfation.org (mailing list archive)
State Accepted, archived
Commit 8be851a7aea795e13de946fe72a4221a0798b045
Headers

Commit Message

Sven Eckelmann May 21, 2011, 12:28 p.m. UTC
  Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 Makefile |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
  

Comments

Marek Lindner May 22, 2011, 10:07 a.m. UTC | #1
On Saturday 21 May 2011 14:28:15 Sven Eckelmann wrote:
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
>  Makefile |    9 ++++++---
>  1 files changed, 6 insertions(+), 3 deletions(-)

Applied in revision 8be851a.

Thanks,
Marek
  

Patch

diff --git a/Makefile b/Makefile
index edd8907..c2b07e7 100755
--- a/Makefile
+++ b/Makefile
@@ -39,6 +39,9 @@  endif
 
 # standard build tools
 CC ?= gcc
+RM ?= rm -f
+INSTALL ?= install
+MKDIR ?= mkdir -p
 COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
 LINK.o = $(Q_LD)$(CC) $(LDFLAGS) $(TARGET_ARCH)
 
@@ -61,11 +64,11 @@  $(BINARY_NAME): $(OBJ)
 	$(LINK.o) $^ $(LDLIBS) -o $@
 
 clean:
-	rm -f $(BINARY_NAME) $(OBJ) $(DEP)
+	$(RM) $(BINARY_NAME) $(OBJ) $(DEP)
 
 install: $(BINARY_NAME)
-	mkdir -p $(SBINDIR)
-	install -m 0755 $(BINARY_NAME) $(SBINDIR)
+	$(MKDIR) $(SBINDIR)
+	$(INSTALL) -m 0755 $(BINARY_NAME) $(SBINDIR)
 
 # load dependencies
 DEP = $(OBJ:.o=.d)