[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
am__install_max
From: |
Ralf Wildenhues |
Subject: |
am__install_max |
Date: |
Wed, 18 Jun 2008 00:20:11 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Let's factorize the arbitrary constant. Applied to master.
Cheers,
Ralf
* lib/am/inst-vars.am (am__install_max): New variable.
(am__nobase_list): Use it.
diff --git a/lib/am/inst-vars.am b/lib/am/inst-vars.am
index acdfc9a..8f89009 100644
--- a/lib/am/inst-vars.am
+++ b/lib/am/inst-vars.am
@@ -25,9 +25,11 @@ am__vpath_adj = case $$p in \
esac;
## Strip all directories.
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+## Number of files to install concurrently.
+am__install_max = 50
## Take a $list of nobase files, collect them, indexed by their
-## srcdir-stripped dirnames. For up to 50 files, output a line
-## containing the dirname and the files, space-separated.
+## srcdir-stripped dirnames. For up to am__install_max files, output
+## a line containing the dirname and the files, space-separated.
## The arbitrary limit helps avoid the quadratic scaling exhibited by
## string concatenation in most shells, and should avoid line length
## limitations, while still offering only negligible performance impact
@@ -37,6 +39,7 @@ am__nobase_list = \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == 50) { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" }
} \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir " " files[dir] }'
endif %?FIRST%
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- am__install_max,
Ralf Wildenhues <=