bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `cp -l` doesn't work correctly on some macOS versions


From: Werner LEMBERG
Subject: Re: `cp -l` doesn't work correctly on some macOS versions
Date: Sat, 03 Feb 2024 06:45:09 +0000 (UTC)

Thanks to all who have answered!

>> I thought ln <target> <link> || ln -s <target> <link> was the standard
>> recipe here
>
> Yes, "cp -l" isn't required by POSIX and is not portable in
> general. For example, on AIX 7.1:
>
>   $ cp -l a b
>   cp: Not a recognized flag: l
>   Usage: cp [-fhipHILPU][-d|-e] [-r|-R] [-E{force|ignore|warn}] [--] src
>   target
>      or: cp [-fhipHILPU] [-d|-e] [-r|-R] [-E{force|ignore|warn}] [--] src1
>      ... srcN directory

Good to know.  I looked into the autoconf info files, section
'Limitations of usual tools', and 'cp -l' wasn't explictly mentioned,
so I assumed that it is portable...   Maybe it can be mentioned there
that it is not.

> Autoconf provides AC_PROG_LN_S, which is supposed to be even more
> portable than the recipe you gave.

I will go this route, thanks again.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]