* 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
* Re: use of tar in make install rules
2012-05-12 0:33 ` Paul Eggert
@ 2012-05-12 1:08 ` Glenn Morris
2012-05-15 17:05 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2012-05-12 1:08 UTC (permalink / raw)
To: Paul Eggert; +Cc: emacs-devel
Paul Eggert wrote:
> Well, you didn't want me to tell you, but ....
>
> cp -R is not portable.
Nooo....
I'm a little surprised there isn't (?) a portable autoconf solution for
this, or that coreutil's install program does not handle source directories.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: use of tar in make install rules
2012-05-12 1:08 ` Glenn Morris
@ 2012-05-15 17:05 ` Glenn Morris
2012-05-15 17:16 ` Andreas Schwab
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2012-05-15 17:05 UTC (permalink / raw)
To: Paul Eggert; +Cc: emacs-devel
BTW, is there a portable way to exclude certain files when tar'ing a
directory? Eg, is tar -X portable?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: use of tar in make install rules
2012-05-15 17:05 ` Glenn Morris
@ 2012-05-15 17:16 ` Andreas Schwab
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2012-05-15 17:16 UTC (permalink / raw)
To: Glenn Morris; +Cc: Paul Eggert, emacs-devel
Glenn Morris <rgm@gnu.org> writes:
> BTW, is there a portable way to exclude certain files when tar'ing a
> directory? Eg, is tar -X portable?
Not to OpenBSD.
http://www.freebsd.org/cgi/man.cgi?query=tar&apropos=0&sektion=1&manpath=OpenBSD+5.0&arch=default&format=html
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ 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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.