[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/4] AC_PROG_MKDIR_P: Also accept BusyBox mkdir -p
From: |
Eric Blake |
Subject: |
Re: [PATCH 3/4] AC_PROG_MKDIR_P: Also accept BusyBox mkdir -p |
Date: |
Thu, 09 Apr 2015 08:51:06 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 04/09/2015 06:43 AM, Bernhard Reutner-Fischer wrote:
> 2015-04-08 Bernhard Reutner-Fischer <address@hidden>
>
> * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Accept BusyBox.
>
> Signed-off-by: Bernhard Reutner-Fischer <address@hidden>
> ---
> lib/autoconf/programs.m4 | 1 +
> 1 file changed, 1 insertion(+)
ACK to the idea.
>
> diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
> index abf554c..f2d8fe3 100644
> --- a/lib/autoconf/programs.m4
> +++ b/lib/autoconf/programs.m4
> @@ -672,6 +672,7 @@ if test -z "$MKDIR_P"; then
> AS_EXECUTABLE_P(["$as_dir$ac_prog$ac_exec_ext"]) || continue
> case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
> 'mkdir (GNU coreutils) '* | \
> + 'BusyBox '* | \
> 'mkdir (coreutils) '* | \
I like that you've kept things sorted by order of likelihood (to reduce
shell glob comparison time in the common cases).
I think we can make one further tweak: 'mkdir ('*'coreutils) '*) would
collapse two branches into one, so that we are actually shrinking the
generated file instead of enlarging it.
I've pushed your patch as-is, and then my followup:
From acb200444395b8108b42dfacd54dabd02d966bd3 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Thu, 9 Apr 2015 08:47:10 -0600
Subject: [PATCH] AC_PROG_MKDIR_P: reduce macro output size
Merging two case globs into one gives slightly smaller files and
less time spent in shell globbing on systems that lack GNU mkdir.
* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Combine two GNU cases.
Signed-off-by: Eric Blake <address@hidden>
---
lib/autoconf/programs.m4 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
index 8ebcf9e..ef35a79 100644
--- a/lib/autoconf/programs.m4
+++ b/lib/autoconf/programs.m4
@@ -671,9 +671,8 @@ if test -z "$MKDIR_P"; then
for ac_exec_ext in '' $ac_executable_extensions; do
AS_EXECUTABLE_P(["$as_dir$ac_prog$ac_exec_ext"]) || continue
case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
- 'mkdir (GNU coreutils) '* | \
+ 'mkdir ('*'coreutils) '* | \
'BusyBox '* | \
- 'mkdir (coreutils) '* | \
'mkdir (fileutils) '4.1*)
ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
break 3;;
--
2.1.0
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [PATCH] Replace 'test "${var+set}" = set' with 'test -n "${var+set}"', (continued)
- [PATCH 0/4] misc test(1) invocation tweaks, Bernhard Reutner-Fischer, 2015/04/09
- Re: [PATCH 0/4] misc test(1) invocation tweaks, Eric Blake, 2015/04/09
- [PATCH 4/4] _AC_OUTPUT_FILES_PREPARE: Rephrase CONFIG_FILES test, Bernhard Reutner-Fischer, 2015/04/09
- Re: [PATCH 4/4] _AC_OUTPUT_FILES_PREPARE: Rephrase CONFIG_FILES test, Eric Blake, 2015/04/09
- Re: [PATCH 4/4] _AC_OUTPUT_FILES_PREPARE: Rephrase CONFIG_FILES test, Bernhard Reutner-Fischer, 2015/04/09
- [PATCH 3/4] AC_PROG_MKDIR_P: Also accept BusyBox mkdir -p, Bernhard Reutner-Fischer, 2015/04/09
- Re: [PATCH 3/4] AC_PROG_MKDIR_P: Also accept BusyBox mkdir -p,
Eric Blake <=
- Re: [PATCH 3/4] AC_PROG_MKDIR_P: Also accept BusyBox mkdir -p, Eric Blake, 2015/04/09
- [PATCH v2 1/4] Replace 'test "${var+set}" = set' with '[ ${var+y} ]', Bernhard Reutner-Fischer, 2015/04/09
- Re: [PATCH v2 1/4] Replace 'test "${var+set}" = set' with '[ ${var+y} ]', Eric Blake, 2015/04/09
- Re: [PATCH v2 1/4] Replace 'test "${var+set}" = set' with '[ ${var+y} ]', Bernhard Reutner-Fischer, 2015/04/09
- Re: [PATCH v2 1/4] Replace 'test "${var+set}" = set' with '[ ${var+y} ]', Eric Blake, 2015/04/09
- Re: [PATCH v2 1/4] Replace 'test "${var+set}" = set' with '[ ${var+y} ]', Bernhard Reutner-Fischer, 2015/04/22
- Re: [PATCH] Replace 'test "${var+set}" = set' with 'test -n "${var+set}"', Eric Blake, 2015/04/09