From 80f647c21c4457b5f74f5cdd87b789a0fa0d7c0d Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 11 Apr 2008 10:54:37 +0000 Subject: [PATCH] build system: use POSIX options only for cp cp: improve comment --- Makefile.custom | 5 +++-- coreutils/cp.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile.custom b/Makefile.custom index e4a616f65..3334b31eb 100644 --- a/Makefile.custom +++ b/Makefile.custom @@ -47,10 +47,11 @@ ifneq ($(strip $(DO_INSTALL_LIBS)),n) endif # Not very elegant: copies testsuite to objdir... +# (cp -pPR is POSIX-compliant (cp -dpR or cp -a would not be)) .PHONY: check .PHONY: test check test: busybox busybox.links - test -d $(objtree)/testsuite || cp -a $(srctree)/testsuite $(objtree) + test -d $(objtree)/testsuite || cp -pPR $(srctree)/testsuite $(objtree) bindir=$(objtree) srcdir=$(srctree)/testsuite \ $(SHELL) -c "cd $(objtree)/testsuite && $(srctree)/testsuite/runtest $(if $(KBUILD_VERBOSE:0=),-v)" @@ -58,7 +59,7 @@ check test: busybox busybox.links release: distclean cd ..; \ rm -r -f busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION); \ - cp -a busybox busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) && { \ + cp -pPR busybox busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) && { \ find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type d \ -name .svn \ -print \ diff --git a/coreutils/cp.c b/coreutils/cp.c index 6cf1e21a1..a4eea9498 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c @@ -44,7 +44,7 @@ int cp_main(int argc, char **argv) // Soft- and hardlinking don't mix // -P and -d are the same (-P is POSIX, -d is GNU) // -r and -R are the same - // -R (and therefore -r) switches on -d (coreutils does this) + // -R (and therefore -r) turns on -d (coreutils does this) // -a = -pdR opt_complementary = "-2:l--s:s--l:Pd:rRd:Rd:apdR"; flags = getopt32(argv, FILEUTILS_CP_OPTSTR "arPHL"); -- 2.25.1