[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU enhancement -- $(xargs cmd, list)
From: |
Reid Madsen |
Subject: |
Re: GNU enhancement -- $(xargs cmd, list) |
Date: |
Mon, 6 Nov 2000 10:28:09 -0600 (CST) |
> Date: Mon, 6 Nov 2000 10:54:13 -0500
> From: "Paul D. Smith" <address@hidden>
>
> This can't work; remember that make passes each line whole to a
> subshell. If the line is too long for any individual shell invocation,
> then chopping it up and sending it to one subshell will certainly be too
> long.
Duh! I should have thought of that...
However, if the entire shell command was surrounded by $(xargs ...)
then GNUmake could issue multiple commands instead of one giant command, or in
the true spirit of xargs, GNUmake could invoke xargs, and echo the list to it,
or at least simulate it...
So, for something like:
target:
foo; bar; $(xargs command, $(ARGS)); glarf
GNUmake could do the following:
1. Create a tmp file with the expansion of ($ARGS) as the content. The tmp
file exists for the duration of the command and is then deleted. The tmp
file name would have to be qualifed with GNUmake's pid and some static
counter...
2. Expand the command line to be:
foo; bar; cat tmpfil | xargs command; glarf
And that would __always__ work. This gets around the fundamental problem of
not being able to do "echo $(ARGS) | xargs command".
What do you think of this?
Reid
--
Reid Madsen address@hidden
Senior Member, Tech. Staff (972) 536-3261 (Desk)
I2 Technologies (214) 850-9613 (Cellular)
--
Making incrementally (without 'clean') since May 18, 2000.
Long live incremental make!
- GNU enhancement -- $(xargs cmd, list), Reid Madsen, 2000/11/06
- Re: GNU enhancement -- $(xargs cmd, list), Reid Madsen, 2000/11/06
- RE: GNU enhancement -- $(xargs cmd, list), Howard Chu, 2000/11/06
- Re: GNU enhancement -- $(xargs cmd, list), Reid Madsen, 2000/11/06
- Re: GNU enhancement -- $(xargs cmd, list), Reid Madsen, 2000/11/06
- Re: GNU enhancement -- $(xargs cmd, list), Paul D. Smith, 2000/11/06
- Re: GNU enhancement -- $(xargs cmd, list), Reid Madsen, 2000/11/06
- Re: GNU enhancement -- $(xargs cmd, list), Paul D. Smith, 2000/11/06
- Re: GNU enhancement -- $(xargs cmd, list), Reid Madsen, 2000/11/06
- RE: GNU enhancement -- $(xargs cmd, list), Howard Chu, 2000/11/06