• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

Android.bpD23-Mar-2024220 1510

READMED23-Mar-20241.9 KiB4132

acp.cD23-Mar-20246.9 KiB252171

README

1README for Android "acp" Command
2
3The "cp" command was judged and found wanting.  The issues are:
4
5Mac OS X:
6 - Uses the BSD cp, not the fancy GNU cp.  It lacks the "-u" flag, which
7   only copies files if they are newer than the destination.  This can
8   slow the build when copying lots of content.
9 - Doesn't take the "-d" flag, which causes symlinks to be copied as
10   links.  This is the default behavior, so it's not all bad, but it
11   complains if you supply "-d".
12
13MinGW/Cygwin:
14 - Gets really weird when copying a file called "foo.exe", failing with
15   "cp: skipping file 'foo.exe', as it was replaced while being copied".
16   This only seems to happen when the source file is on an NFS/Samba
17   volume.  "cp" works okay copying from local disk.
18
19Linux:
20 - On some systems it's possible to have microsecond-accurate timestamps
21   on an NFS volume, and non-microsecond timestamps on a local volume.
22   If you copy from NFS to local disk, your NFS files will always be
23   newer, because the local disk time stamp is truncated rather than
24   rounded up.  This foils the "-u" flag if you also supply the "-p" flag
25   to preserve timestamps.
26 - The Darwin linker insists that ranlib be current.  If you copy the
27   library, the time stamp no longer matches.  Preserving the time
28   stamp is essential, so simply turning the "-p" flag off doesn't work.
29
30Futzing around these in make with GNU make functions is awkward at best.
31It's easier and more reliable to write a cp command that works properly.
32
33
34The "acp" command takes most of the standard flags, following the GNU
35conventions.  It adds a "-e" flag, used when copying executables around.
36On most systems it is ignored, but on MinGW/Cygwin it allows "cp foo bar"
37to work when what is actually meant is "cp foo.exe bar.exe".  Unlike the
38default Cygwin cp, "acp foo bar" will not find foo.exe unless you add
39the "-e" flag, avoiding potential ambiguity.
40
41