Re: [PATCH 3/4] AC_PROG_MKDIR_P: Also accept BusyBox mkdir -p
Eric Blake <[email protected]>
| Newsgroups | gmane.comp.sysutils.autoconf.patches |
|---|---|
| Organization | Red Hat, Inc. |
| Message-ID | <[email protected]> |
On 04/09/2015 06:43 AM, Bernhard Reutner-Fischer wrote: > 2015-04-08 Bernhard Reutner-Fischer <[email protected]> > > * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Accept BusyBox. > > Signed-off-by: Bernhard Reutner-Fischer <[email protected]> > --- > 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 <[email protected]> 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 <[email protected]> --- 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
(application/pgp-signature, 604 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVJpHaAAoJEKeha0olJ0NqFuIIAKbYAX7hO509KXCrpKkUDr2E v8EBafoyZ4V6DBrWcaxeoqZ6NbY24E1zr/eb7F6HVJFcwOPaQgaPIIX9FUg3sb54 4+GiMi2xY+OeSpCk8jda3Gtpnn4Ith//YBBehBxjOHvOeA+2Pcvkz7RiWREvK9OD Z8pHpWPwPCM3Pxq+afmX6VLj6RUqkIOgj4LJNd/QgO1TIuitQvTFnSLyBtSXUdEQ lFb9Q/yotLVtg+tsubI9dkstPpd6zE1lnWolYd/zbwPbwnpaw9zqsKCfOXDgfVi9 Ewj3MycWG5hzR5OZpcL1MHD8Ki5d4LZJek4y+M1oe8sa6t4H3u9RTYWuqZQQy40= =LYAO -----END PGP SIGNATURE-----