autoconf-patches
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]