portability of xargs

2022-02-14 Thread Mike Frysinger
context: https://bugs.gnu.org/53340 how portable is xargs ? like, beyond POSIX, as autoconf & automake both support non-POSIX compliant systems. i want to use it in its simplest form: `echo $var | xargs rm -f`. automake jumps through some hoops to try and limit the length of generated command l

Re: portability of xargs

2022-02-14 Thread Paul Eggert
On 2/14/22 19:45, Mike Frysinger wrote: how portable is xargs ? It can be a porting problem, unfortunately. There are several corner cases that various implementations don't get right. I expect this is why the GNU Coding Standards exclude xargs from the list of programs that 'configure' and

Re: portability of xargs

2022-02-14 Thread Mike Frysinger
On 14 Feb 2022 19:53, Paul Eggert wrote: > On 2/14/22 19:45, Mike Frysinger wrote: > > how portable is xargs ? > > It can be a porting problem, unfortunately. There are several corner > cases that various implementations don't get right. I expect this is why > the GNU Coding Standards exclude xa

Re: portability of xargs

2022-02-14 Thread Paul Eggert
On 2/14/22 20:03, Mike Frysinger wrote: are the corner cases known ? I don't know of a catalog, no. These days you might have better luck with "find ... -exec ... {} +". Although standardized more recently than xargs, my vague impression is that there's less variation among implementations.

Re: portability of xargs

2022-02-14 Thread Alex Ameen
If the goal is to limit command line length while maintaining or increasing the number of files passed to various compilation tools, it may be worth writing object lists to files to be passed as command scripts - in cases where the tool supports it. Obviously whether the majority of tools support c

Re: portability of xargs

2022-02-14 Thread Daniel Herring
Hi Mike, It often makes sense to change a project that uses Autotools rather than modifying the Autotools. Can this argument-splitting behavior be documented as expected? Are no workarounds available? Replacing "overly fancy but proven shell script" with "dependency on a new tool" may repl

Re: portability of xargs

2022-02-14 Thread Dan Kegel
Meson is a candidate for such a next-gen config system. It is in python, which does not quite qualify as usable during early uplift/bootstrap, but there are C ports in progress, see e.g. https://sr.ht/~lattis/muon/ In the meantime, I agree that find is more portable than cards ;-) - Dan Daniel

Re: portability of xargs

2022-02-14 Thread Jan Engelhardt
On Tuesday 2022-02-15 07:16, Daniel Herring wrote: > > Maybe a next-generation configuration tool should start by defining interfaces > for user interactions and build tools. This would allow CLI and easy GUI and > IDE users, integration with multiple build systems, static and dynamic > probing