netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christoph J. Thompson" <cjsthompson@gmail.com>
To: netdev@vger.kernel.org
Subject: [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.
Date: Thu, 1 Mar 2012 17:46:26 +0100	[thread overview]
Message-ID: <20120301164622.GA24306@gmail.com> (raw)

	modified:   Makefile
	modified:   ip/iplink.c
	modified:   tc/Makefile
	modified:   tc/tc_util.c

Signed-off-by: Christoph J. Thompson <cjsthompson@gmail.com>
---
 Makefile     |   11 +++++++----
 ip/iplink.c  |    2 +-
 tc/Makefile  |    2 +-
 tc/tc_util.c |    2 +-
 4 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index fb5f5d3..2d0192e 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 6b051b6..72a9866 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 f523adc..be8cd5a 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 5829d61..bd7f9e0 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)
-- 
1.7.4.4


-- 
Jabber: heimdal@jabber.org

             reply	other threads:[~2012-03-01 16:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 16:46 Christoph J. Thompson [this message]
2012-04-12 16:51 ` [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 Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120301164622.GA24306@gmail.com \
    --to=cjsthompson@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).