Skip to contentSkip to conversation

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.

PATCH In review Christoph J. Thompson 2 participants 2 messages Mar 1, 2012 – Apr 12, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 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.

	modified:   Makefile
	modified:   ip/iplink.c
	modified:   tc/Makefile
	modified:   tc/tc_util.c
---
 Makefile     |   11 +++++++----
 ip/iplink.c  |    2 +-
 tc/Makefile  |    2 +-
 tc/tc_util.c |    2 +-
 4 files changed, 10 insertions(+), 7 deletions(-)
Makefile +7 -4
index fb5f5d3..2d0192e 100644
@@ -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=
ip/iplink.c +1 -1
index 6b051b6..72a9866 100644
@@ -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));
tc/Makefile +1 -1
index f523adc..be8cd5a 100644
@@ -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 $@
tc/tc_util.c +1 -1
index 5829d61..bd7f9e0 100644
@@ -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)
Signature · 5 lines
1.7.4.4


-- 
Jabber: [email protected]
#1 lore raw
Quoted 6 lines · On Thu, 1 Mar 2012 17:46:26 +0100 "Christoph J. Thompson"…
	modified:   Makefile
	modified:   ip/iplink.c
	modified:   tc/Makefile
	modified:   tc/tc_util.c

All applied, but you need to format your patch changelog correctly. Email subject line should be short summary (not a four sentences) Email body should have the more complete changelog.
Skip the modified: stuff, that is either obvious or put it below the signature separator --- so that merge program will drop it.