automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Byte-compile nobase_*_PYTHON files only once.


From: Stefano Lattarini
Subject: Re: [PATCH] Byte-compile nobase_*_PYTHON files only once.
Date: Mon, 28 Oct 2013 22:32:08 +0000

Hi Benoit, sorry for the awful delay, and thanks for the patch.

On 09/17/2013 05:57 PM, Benoit Sigoure wrote:
> Byte-compiling was occurring inside of a loop, causing an O(n^2)
> number of byte-compilations instead of O(n).
> ---
>  lib/am/python.am | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/am/python.am b/lib/am/python.am
> index 36f0b2d..06545b1 100644
> --- a/lib/am/python.am
> +++ b/lib/am/python.am
> @@ -66,7 +66,7 @@ else !%?BASE%
>         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
>         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
>       fi; \
> -     $(am__nobase_list) | while read dir files; do \
> +     $(am__nobase_list) | { while read dir files; do \
>         xfiles=; for p in $$files; do \
>  ## A file can be in the source directory or the build directory.
>           if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
> @@ -79,13 +79,13 @@ else !%?BASE%
>  ## Don't perform translation, since script name is important.
>           echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
>           $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit 
> $$?; }; \
> +     done; \
>  ## Byte-compile must be done at install time, since file times are
>  ## encoded in the actual files.
> -       if test -n "$$dlist"; then \
> -         $(am__py_compile) --destdir "$(DESTDIR)" \
> -                           --basedir "$(%NDIR%dir)" $$dlist; \
> -       else :; fi \
> -     done
> +     if test -n "$$dlist"; then \
> +       $(am__py_compile) --destdir "$(DESTDIR)" \
> +                         --basedir "$(%NDIR%dir)" $$dlist; \
> +     else :; fi; }
>  endif !%?BASE%
>  endif %?INSTALL%
>  
> 
Applied with minor adjustments to the commit message to make it
conform to the GNU coding standards and our preferred format (see
HACKING for details).

Thank you,
  Stefano



reply via email to

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