summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBenoit Sigoure <tsunanet@gmail.com>2013-09-17 09:57:53 -0700
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-10-28 22:10:16 +0000
commit2c063f33aece0afa0ee5c10d94aed6fa722c5ea9 (patch)
tree4195cdbe572b43d7e3cd14bb9388e046660a6bab /lib
parent8c554e1ffea9ca414ac3e0c09437ef91a8edcfc1 (diff)
downloadautomake-2c063f33aece0afa0ee5c10d94aed6fa722c5ea9.tar.gz
python: byte-compile nobase_*_PYTHON files only once
* lib/am/python.am: Here. Byte-compiling was occurring inside of a loop, causing an O(n^2) number of byte-compilations instead of O(n). Copyright-paperwork-exempt: yes Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/am/python.am12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/am/python.am b/lib/am/python.am
index 36f0b2dd4..06545b187 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%