public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 01/10] bash-completion: add bash completetion configure option
Date: Wed, 27 Mar 2013 22:07:43 +0000	[thread overview]
Message-ID: <1364422072-23552-2-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1364422072-23552-1-git-send-email-kerolasa@iki.fi>

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 Makefile.am                    |  5 +++++
 configure.ac                   | 13 +++++++++++++
 shell-completion/Makemodule.am |  1 +
 3 files changed, 19 insertions(+)
 create mode 100644 shell-completion/Makemodule.am

diff --git a/Makefile.am b/Makefile.am
index 3afcad1..b963af9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,8 @@ ul_libfdisk_incdir  = $(top_srcdir)/libfdisk/src
 
 pkgconfigdir = $(usrlib_execdir)/pkgconfig
 
+bashcompletiondir = @bashcompletiondir@
+
 dist_noinst_HEADERS =
 noinst_PROGRAMS =
 noinst_LTLIBRARIES =
@@ -87,6 +89,8 @@ include misc-utils/Makemodule.am
 include disk-utils/Makemodule.am
 include fdisks/Makemodule.am
 
+include shell-completion/Makemodule.am
+
 include tests/Makemodule.am
 
 #
@@ -158,6 +162,7 @@ checkdecl:
 ENABLE_ALL = --enable-static-programs --enable-most-builds
 DISTCHECK_CONFIGURE_FLAGS = --disable-use-tty-group \
 			    --disable-silent-rules $(ENABLE_ALL) \
+			    --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
 			    --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
 
 
diff --git a/configure.ac b/configure.ac
index 92a5a3b..cd4e826 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1342,6 +1342,18 @@ fi
 AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != "xno" ])
 
 
+AC_ARG_WITH([bashcompletiondir],
+  AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
+  [],
+  [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
+    with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
+  ], [
+    with_bashcompletiondir=${datadir}/bash-completion/completions
+  ])
+])
+AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
+
+
 AC_ARG_ENABLE([pg-bell],
   AS_HELP_STRING([--disable-pg-bell], [let pg not ring the bell on invalid keys]),
   [], enable_pg_bell=yes
@@ -1463,6 +1475,7 @@ AC_MSG_RESULT([
 	suid cflags:       ${SUID_CFLAGS}
 	ldflags:           ${LDFLAGS}
 	suid ldflags:      ${SUID_LDFLAGS}
+	Bash completions dir: ${with_bashcompletiondir}
 
 	warnings:
 
diff --git a/shell-completion/Makemodule.am b/shell-completion/Makemodule.am
new file mode 100644
index 0000000..b784ec7
--- /dev/null
+++ b/shell-completion/Makemodule.am
@@ -0,0 +1 @@
+dist_bashcompletion_DATA =
-- 
1.8.2


  reply	other threads:[~2013-03-27 22:08 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27 22:07 [PATCH 00/10] [pull] bash-completion Sami Kerola
2013-03-27 22:07 ` Sami Kerola [this message]
2013-03-28 11:22   ` [PATCH 01/10] bash-completion: add bash completetion configure option Sami Kerola
2013-03-29  9:42     ` Karel Zak
2013-03-27 22:07 ` [PATCH 02/10] bash-completion: disk-utils Sami Kerola
2013-03-28  1:42   ` Dave Reisner
2013-04-01 15:54     ` Sami Kerola
2013-03-28  9:54   ` Karel Zak
2013-04-01 17:00     ` Sami Kerola
2013-03-27 22:07 ` [PATCH 03/10] bash-completion: fdisks Sami Kerola
2013-03-28 10:01   ` Karel Zak
2013-03-27 22:07 ` [PATCH 04/10] bash-completion: login-utils Sami Kerola
2013-03-28  1:42   ` Dave Reisner
2013-04-01 16:05     ` Sami Kerola
2013-03-28 10:05   ` Karel Zak
2013-04-01 16:06     ` Sami Kerola
2013-03-27 22:07 ` [PATCH 05/10] bash-completion: misc-utils Sami Kerola
2013-03-28  1:42   ` Dave Reisner
2013-04-01 16:52     ` Sami Kerola
2013-03-27 22:07 ` [PATCH 06/10] bash-completion: schedutils Sami Kerola
2013-03-27 22:07 ` [PATCH 07/10] bash-completion: sys-utils Sami Kerola
2013-03-29 16:33   ` Karel Zak
2013-04-01 16:32     ` Sami Kerola
2013-04-05 14:44   ` Karel Zak
2013-03-27 22:07 ` [PATCH 08/10] bash-completion: term-utils Sami Kerola
2013-03-28 10:06   ` Karel Zak
2013-03-27 22:07 ` [PATCH 09/10] bash-completion: text-utils Sami Kerola
2013-03-27 22:07 ` [PATCH 10/10] bash-completion: add completion files to Makefile.am Sami Kerola
2013-03-28  1:42 ` [PATCH 00/10] [pull] bash-completion Dave Reisner
2013-03-28  9:37 ` Karel Zak
2013-03-31 23:49   ` Sami Kerola
2013-04-01 15:44   ` Sami Kerola
2013-04-05 14:11 ` Karel Zak

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=1364422072-23552-2-git-send-email-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --cc=util-linux@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