]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
iproute2 - Fix up and simplify variables pointing to install directories
authorChristoph J. Thompson <cjsthompson@gmail.com>
Thu, 1 Mar 2012 16:46:26 +0000 (17:46 +0100)
committerStephen Hemminger <shemminger@vyatta.com>
Thu, 12 Apr 2012 16:49:10 +0000 (09:49 -0700)
Define where is the are located the iproute2 config files.
Get rid of trailing slashes for paths in several file.

Signed-off-by: Christoph J. Thompson <cjsthompson@gmail.com>
Makefile
ip/iplink.c
tc/Makefile
tc/tc_util.c

index 1f6c8bf53aea0d252d7a3c7f7dd496ba0b864f70..c10795593c356ba483afc54dbb03c398bcbe80a4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,11 @@
-DESTDIR=/usr/
 ROOTDIR=$(DESTDIR)
-LIBDIR=/usr/lib/
+PREFIX=/usr
+LIBDIR=$(PREFIX)/lib
 SBINDIR=/sbin
 CONFDIR=/etc/iproute2
-DOCDIR=/share/doc/iproute2
-MANDIR=/share/man
+DATADIR=$(PREFIX)/share
+DOCDIR=$(DATADIR)/doc/iproute2
+MANDIR=$(DATADIR)/man
 ARPDDIR=/var/lib/arpd
 
 # Path to db_185.h include
@@ -17,6 +18,8 @@ ifneq ($(SHARED_LIBS),y)
 DEFINES+= -DNO_SHARED_LIBS
 endif
 
+DEFINES+=-DCONFDIR=\"$(CONFDIR)\"
+
 #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
 LDLIBS=-lresolv
 ADDLIB=
index a3613d24e5489c4c740a95e4229c9b6a2004b174..679091e6831b71538cce495f6f13d6626bf49e0e 100644 (file)
@@ -34,7 +34,7 @@
 
 #define IPLINK_IOCTL_COMPAT    1
 #ifndef LIBDIR
-#define LIBDIR "/usr/lib/"
+#define LIBDIR "/usr/lib"
 #endif
 
 static void usage(void) __attribute__((noreturn));
index f523adc1b71b01bf524e65ffc23b37ac03b7db92..be8cd5a3166a1afb9fa530f99362a68f97e422d2 100644 (file)
@@ -91,7 +91,7 @@ YACC := bison
 LEX := flex
 CFLAGS += -DYY_NO_INPUT
 
-MODDESTDIR := $(DESTDIR)$(patsubst /usr%,%,$(LIBDIR))/tc
+MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
 
 %.so: %.c
        $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic $< -o $@
index 36e3c7df9a2f6711d95073ecef0e6d627062c035..926ed08bd4edc159c4cc93d15bf19b4583cecc0f 100644 (file)
@@ -25,7 +25,7 @@
 #include "tc_util.h"
 
 #ifndef LIBDIR
-#define LIBDIR "/usr/lib/"
+#define LIBDIR "/usr/lib"
 #endif
 
 const char *get_tc_lib(void)