[12/14] batmand: Rename INSTALL_PREFIX to DESTDIR

Message ID 1305983442-1607-12-git-send-email-sven@narfation.org (mailing list archive)
State Accepted, archived
Commit e478186b9ac8f070822a00a1bb48ff46ae327632
Headers

Commit Message

Sven Eckelmann May 21, 2011, 1:10 p.m. UTC
  Makefile generators like cmake or configure (generated by autotools)
usually use DESTDIR to allow the modification of the "root" path without
affecting other build steps.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
This patch depends on other patches submitted earlier:
 - batmand: Fix FTBFS on second build attempt
 - batmand: Remove obsolete creation of source packages
 - batmand: Remove subversion/svk revision information
 - batmand: Use nproc to get number of available processors

 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
  

Patch

diff --git a/Makefile b/Makefile
index 6c77fe7..4f64373 100755
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@  COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
 LINK.o = $(Q_LD)$(CC) $(LDFLAGS) $(TARGET_ARCH)
 
 # standard install paths
-SBINDIR =	$(INSTALL_PREFIX)/usr/sbin
+SBINDIR = /usr/sbin
 
 # try to generate revision
 REVISION = $(shell if [ -d .git ]; then echo $$(git describe --always --dirty 2> /dev/null || echo "[unknown]"); fi)
@@ -97,8 +97,8 @@  clean:
 	$(RM) $(BINARY_NAME) $(OBJ) $(DEP)
 
 install: $(BINARY_NAME)
-	$(MKDIR) $(SBINDIR)
-	$(INSTALL) -m 0755 $(BINARY_NAME) $(SBINDIR)
+	$(MKDIR) $(DESTDIR)$(SBINDIR)
+	$(INSTALL) -m 0755 $(BINARY_NAME) $(DESTDIR)$(SBINDIR)
 
 # load dependencies
 DEP = $(OBJ:.o=.d)