libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: speedup bootstrap


From: Ralf Wildenhues
Subject: FYI: speedup bootstrap
Date: Thu, 10 Nov 2005 19:20:12 +0100
User-agent: Mutt/1.5.11

Applied the patch to CVS HEAD.  Gary agreed.  :))

Cheers,
Ralf

* Ralf Wildenhues wrote on Sun, Oct 23, 2005 at 02:42:38PM CEST:
> 
>         * libltdl/m4/ltsugar.m4 (lt_join, lt_combine, lt_dict_filter):
>         Rewrite to eliminate tail recursion; use ..
>         (lt_unquote): New trivial helper macro.
>         * libltdl/m4/libtool.m4 (_lt_decl_filter): Document.
> 
> Index: libltdl/m4/libtool.m4
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
> retrieving revision 1.27
> diff -u -r1.27 libtool.m4
> --- libltdl/m4/libtool.m4     13 Oct 2005 13:22:55 -0000      1.27
> +++ libltdl/m4/libtool.m4     23 Oct 2005 09:02:45 -0000
> @@ -335,6 +335,10 @@
>  # -------------------------------------------------
>  m4_define([lt_decl_tag_varnames],
>  [_lt_decl_filter([tagged?], [yes], $@)])
> +
> +
> +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
> +# ---------------------------------------------------------
>  m4_define([_lt_decl_filter],
>  [m4_case([$#],
>    [0], [m4_fatal([$0: too few arguments: $#])],
> Index: libltdl/m4/ltsugar.m4
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/libltdl/m4/ltsugar.m4,v
> retrieving revision 1.1
> diff -u -r1.1 ltsugar.m4
> --- libltdl/m4/ltsugar.m4     22 Aug 2005 22:33:35 -0000      1.1
> +++ libltdl/m4/ltsugar.m4     23 Oct 2005 09:02:45 -0000
> @@ -23,12 +23,12 @@
>        [1], [],
>        [2], [[$2]],
>        [m4_ifval([$2],
> -                [m4_ifval([$3],
> -                          [[$2][$1][]$0([$1], m4_shiftn(2, $@))],
> -                    [m4_if([$#], [3],
> -                           [$2],
> -                        [$0([$1], [$2], m4_shiftn(3, $@))])])],
> -           [$0([$1], m4_shiftn(2, $@))])])[]dnl
> +                [[$2][]m4_foreach(_lt_Arg, lt_car([m4_shiftn(2, $@)]),
> +                        [_$0([$1], _lt_Arg)])],
> +                [$0([$1], m4_shiftn(2, $@))])])[]dnl
> +])
> +m4_define([_lt_join],
> +[m4_ifval([$2],[$1][$2])[]dnl
>  ])
>  
>  
> @@ -43,6 +43,7 @@
>  [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
>         [$#], 1, [],
>         [m4_dquote(m4_shift($@))])])
> +m4_define([lt_unquote], $1)
>  
>  
>  # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
> @@ -52,14 +53,11 @@
>  # has the form PREFIXmINFIXSUFFIXn.
>  m4_define([lt_combine],
>  [m4_if([$2], [], [],
> -       [lt_join(m4_quote(m4_default([$1], [[, ]])),
> -             _$0([$1], lt_car($2)[$3], m4_shiftn(3, $@)),
> -             $0([$1], lt_cdr($2), m4_shiftn(2, $@)))])])
> -m4_define([_lt_combine],
> -[m4_if([$3], [], [],
> -       [lt_join(m4_quote(m4_default([$1], [[, ]])),
> -             [$2$3],
> -             $0([$1], [$2], m4_shiftn(3, $@)))])[]dnl
> +  [m4_if([$4], [], [],
> +    [lt_join(m4_quote(m4_default([$1], [[, ]])),
> +      lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2],
> +                        [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]),
> +                            [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl
>  ])
>  
>  
> @@ -104,10 +102,10 @@
>  
>  
>  # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
> -# ------------------------------------------------------------
> +# --------------------------------------------------------------
>  m4_define([lt_dict_filter],
>  [m4_if([$5], [], [],
>    [lt_join(m4_quote(m4_default([$4], [[, ]])),
> -        m4_quote(lt_if_dict_fetch([$1], [$5], [$2], [$3], [$5])),
> -        m4_quote($0([$1], [$2], [$3], [$4], m4_shiftn(5, $@))))])dnl
> +           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, 
> lt_car([m4_shiftn(4, $@)]),
> +                   [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key 
> ])])))))])[]dnl
>  ])
> 
> 




reply via email to

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