From: Christoph J. Thompson Date: Thu, 1 Mar 2012 16:46:26 +0000 (+0100) Subject: iproute2 - Fix up and simplify variables pointing to install directories X-Git-Tag: v3.4.0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c434a9e5a5eafec09ec9939b255948843423f80;p=thirdparty%2Fiproute2.git iproute2 - Fix up and simplify variables pointing to install directories 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 --- diff --git a/Makefile b/Makefile index 1f6c8bf53..c10795593 100644 --- 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= diff --git a/ip/iplink.c b/ip/iplink.c index a3613d24e..679091e68 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -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)); diff --git a/tc/Makefile b/tc/Makefile index f523adc1b..be8cd5a31 100644 --- a/tc/Makefile +++ b/tc/Makefile @@ -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 $@ diff --git a/tc/tc_util.c b/tc/tc_util.c index 36e3c7df9..926ed08bd 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -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)