* use of tar in make install rules
@ 2012-05-11 19:30 Glenn Morris
2012-05-12 0:33 ` Paul Eggert
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2012-05-11 19:30 UTC (permalink / raw)
To: emacs-devel
To install a directory and all its contents (eg lisp), the Emacs Makefile uses:
(cd $${dir}; tar -chf - . ) | \
(cd $${dest}; umask 022; tar -xvf - && cat > /dev/null)
Why does it use tar, as opposed to "cp -R"?
Please don't tell me that cp -R isn't portable...
(There are no symbolic links or device files involved.)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: use of tar in make install rules
2012-05-11 19:30 use of tar in make install rules Glenn Morris
@ 2012-05-12 0:33 ` Paul Eggert
2012-05-12 1:08 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2012-05-12 0:33 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel
On 05/11/2012 12:30 PM, Glenn Morris wrote:
> Please don't tell me that cp -R isn't portable...
Well, you didn't want me to tell you, but ....
cp -R is not portable.
cp -R wasn't standardized by POSIX until the 2008 edition
(a long story -- older POSIX specified "cp -r",
but it didn't take). So it's possible that
there are still systems in active use where "cp -R"
does not work well enough.
It would probably be safe to do "cp -R src dest || tar ...", i.e.,
to fall back on 'tar' only if 'cp -R' does not work.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-15 17:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-11 19:30 use of tar in make install rules Glenn Morris
2012-05-12 0:33 ` Paul Eggert
2012-05-12 1:08 ` Glenn Morris
2012-05-15 17:05 ` Glenn Morris
2012-05-15 17:16 ` Andreas Schwab
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).