[13/14] batctl: Introduce PREFIX as standard installation prefix

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

Commit Message

Sven Eckelmann May 21, 2011, 12:28 p.m. UTC
  cmake and configure (generated by autotools) use a prefix configuration
which is by default /usr/local to define to which all other paths are
relative to. SBINDIR is then defined as $PREFIX/sbin but can also be
redefined.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 Makefile |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
  

Comments

Marek Lindner May 22, 2011, 10:11 a.m. UTC | #1
On Saturday 21 May 2011 14:28:17 Sven Eckelmann wrote:
> cmake and configure (generated by autotools) use a prefix configuration
> which is by default /usr/local to define to which all other paths are
> relative to. SBINDIR is then defined as $PREFIX/sbin but can also be
> redefined.

Applied in revision 9ca5b44.

Thanks,
Marek
  

Patch

diff --git a/Makefile b/Makefile
index b5aa6ca..7ac72ed 100755
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ 
 # 02110-1301, USA
 #
 
-# batctl build and install configuration
+# batctl build
 BINARY_NAME = batctl
 OBJ = main.o bat-hosts.o functions.o sys.o debug.o ping.o traceroute.o tcpdump.o list-batman.o hash.o vis.o debugfs.o bisect.o
 
@@ -46,7 +46,8 @@  COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
 LINK.o = $(Q_LD)$(CC) $(LDFLAGS) $(TARGET_ARCH)
 
 # standard install paths
-SBINDIR = /usr/sbin
+PREFIX = /usr/local
+SBINDIR = $(PREFIX)/sbin
 
 # try to generate revision
 REVISION = $(shell if [ -d .git ]; then echo $$(git describe --always --dirty 2> /dev/null || echo "[unknown]"); fi)