[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] mkinstalldirs used conditionally
From: |
Akim Demaille |
Subject: |
Re: [patch] mkinstalldirs used conditionally |
Date: |
18 Mar 2002 10:11:21 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) |
>>>>> "Tom" == Tom Tromey <address@hidden> writes:
Roger> True. It won't be compatible with a traditional BSD install
Roger> though, AFAIK.
Too bad :P
Tom> Yeah. This is a problem because install-sh is slow. I
Tom> occasionally hear complaints about this.
Well, we could spare it the multiple launches:
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
@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.
?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \
?!BASE? f="$$p"; \
echo " $(%DIR%%PRIMARY%_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
$(%DIR%%PRIMARY%_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
done
invokes it for each file. Moving to the GNU Install-into-a-dir makes
this a single call, so we might actually recover some speed.