On Fri, 29 Apr 2016 10:27:11 +0200
Quentin Monnet <quentin.mon...@6wind.com> wrote:

> Add function for command completion for tc in bash, and update Makefile
> to install it:
> 
> - Under /usr/share/bash-completion/completions/ (default).
> - Or under /etc/bash_completions.d/, which is the old directory for
>   bash-completion, if /usr/share/bash-completion/completions/ is not
>   found AND /etc/bash_completions.d/ exists already.
> 
> Inside iproute2 repository, the completion code is in a new
> `bash-completion` toplevel directory.
> 
> Signed-off-by: Quentin Monnet <quentin.mon...@6wind.com>

Rather than having an if statement in the install; lets follow how
other paths are handles.
 * default value should be what current distros use /usr/share
 * other distro's can override it with environment variable.

Something like:

Makefile:
PREFIX?=/usr
LIBDIR?=$(PREFIX)/lib
SBINDIR?=/sbin
CONFDIR?=/etc/iproute2
DATADIR?=$(PREFIX)/share
DOCDIR?=$(DATADIR)/doc/iproute2
MANDIR?=$(DATADIR)/man
ARPDDIR?=/var/lib/arpd
KERNEL_INCLUDE?=/usr/include
BASH_COMPDIR?=$(DATADIR)/bash-completion/completions/

Reply via email to