summaryrefslogtreecommitdiff
path: root/lib/am/data.am
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2008-09-06 23:40:34 +0200
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2008-09-06 23:43:48 +0200
commit92a09f69728ee6db2438add8835ee683e921c9e3 (patch)
tree10857bade71e34e3f14def51e1346f993f2727ff /lib/am/data.am
parent20594c08f633aaee1df952242ea78553037758b9 (diff)
downloadautomake-92a09f69728ee6db2438add8835ee683e921c9e3.tar.gz
Fix multi-file installation for files in srcdir.
For files that can live in the build tree or the source tree, we have to expect that prepending `$(srcdir)/' to each name will let the install command line exceed length limitations. Thus use a new macro, $(am__base_list), to install in chunks of 40 files, similar to what we do for nobase_* files. There, lower the limit to 40, too. * lib/am/inst-vars.am (am__install_max): Lower to 40. (am__base_list): New macro. * lib/am/data.am (install-%DIR%%PRIMARY%) [%?BASE%]: Use it. * lib/am/texinfos.am (install-dvi-am, install-html-am) (install-info-am, install-pdf-am, install-ps-am): Likewise. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'lib/am/data.am')
-rw-r--r--lib/am/data.am12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/am/data.am b/lib/am/data.am
index 627301bc7..3536f94e3 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -33,17 +33,17 @@ install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
if %?BASE%
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- @list='$(%DIR%_%PRIMARY%)'; list2=; for p in $$list; do \
+ @list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
## A file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
## If the _%PRIMARY% variable has an entry like foo/bar, install it as
## $(destdir)/bar, not $(destdir)/foo/bar. The user can make a
## new dir variable or use a nobase_ target for the latter case.
- list2="$$list2 $$d$$p"; \
- done; \
- test -z "$$list2" || { \
- echo " $(%DIR%%PRIMARY%_INSTALL) $$list2 '$(DESTDIR)$(%NDIR%dir)'"; \
- $(%DIR%%PRIMARY%_INSTALL) $$list2 "$(DESTDIR)$(%NDIR%dir)"; }
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(%DIR%%PRIMARY%_INSTALL) $$files '$(DESTDIR)$(%NDIR%dir)'"; \
+ $(%DIR%%PRIMARY%_INSTALL) $$files "$(DESTDIR)$(%NDIR%dir)"; done
else !%?BASE%
@list='$(%DIR%_%PRIMARY%)'; $(am__nobase_list) | \
while read dir files; do \