After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722479 - cp -u is not portable
cp -u is not portable
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other FreeBSD
: Normal normal
: 1.20
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-18 07:06 UTC by Ting-Wei Lan
Modified: 2014-02-14 16:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ting-Wei Lan 2014-01-18 07:06:00 UTC
cp -u is used in gtk-doc.make, but the -u option is not specified in POSIX standard.

I see the following messages when running on FreeBSD.
cp: illegal option -- u
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... target_directory
Comment 1 Allison Karlitskaya (desrt) 2014-01-18 15:38:08 UTC
If you're going to try to do a patch to fix it, note that 'test -nt' is also non-POSIX....
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-08 17:57:15 UTC
It would be awesome if you can try a patch, I don't have a bsd system around ...
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-14 08:42:30 UTC
ryan, where do you see test -nt, also according to
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
it should be supported. Please reopen as needed.


commit 87696c458ccc85ecbffe01a9e7b7124d0f02ac6e
Author: Stefan Sauer <ensonic@users.sf.net>
Date:   Fri Feb 14 09:40:32 2014 +0100

    make: avoid non posix options in the makefiles
    
    Use cp -pf instead of cp -pu. Use cp -pR instead of cp -pr.
    Fixes #722479
Comment 4 Allison Karlitskaya (desrt) 2014-02-14 12:15:22 UTC
'test -nt' was just my first idea of how to solve this.

The spec says:

"""

Some additional primaries newly invented or from the KornShell appeared in an early proposal as part of the conditional command ([[]]): s1 > s2, s1 < s2, str = pattern, str != pattern, f1 -nt f2, f1 -ot f2, and f1 -ef f2. They were not carried forward into the test utility when the conditional command was removed from the shell because they have not been included in the test utility built into historical implementations of the sh utility.

"""

ie: -nt was proposed and considered, but ultimately rejected.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-14 16:46:15 UTC
Sorry I misunderstood, but thanks for the heads up on this.