bug-make
[Top][All Lists]
Advanced

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

RE: GNU enhancement -- $(xargs cmd, list)


From: Howard Chu
Subject: RE: GNU enhancement -- $(xargs cmd, list)
Date: Mon, 6 Nov 2000 07:56:49 -0800

Your xargs feature sounds useful, but your bug example is flawed. Remember
that the
shell does all wildcard expansion in Unix. For most problem cases, your
 echo *.xx | xargs command
commandline would fail for the same reason that
 command *.xx
would fail. Just wanted to make sure the actual problem mechanics were
understood...

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc

> -----Original Message-----
> From: address@hidden [mailto:address@hidden Behalf Of
> Reid Madsen
> Sent: Monday, November 06, 2000 7:46 AM
> To: address@hidden
> Subject: GNU enhancement -- $(xargs cmd, list)
>
>
>
> Consider the following:
>
>     ARGS=$(wildcard *.xx)
>
>     target:
>           command $(ARGS)
>
> The above only works if the length of the resulting command line is within
> system limits.  From the shell, you can solve this by:
>
>       echo *.xx | xargs command
>
> But the above does not work in make because it expands the
> wildcard, and then
> launches a command line that is again too long.
>
> I propose that GNUmake add the following function:
>
>       $(xargs cmd, list)
>
> Then I could render the intial example as:
>
>     ARGS=$(wildcard *.xx)
>
>     target:
>           $(xargs command, $(ARGS))
>
> Which resolves to:
>
>       command some_args; command more_args; command even_more_args
>
> where the number of commands depends on the command line length for the
> given platform.  This would allow us to write Makefiles that work on all
> platforms regardless of command line length.
>
> Since I'm somewhat familiar with the GNUmake source I'd like to
> take a stab at
> implementing this.  If you can give me any pointers on how I
> should proceed I
> would appreciate it.
>
> Regards
>
> Reid Madsen
>
> --
> 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!
>
> _______________________________________________
> Bug-make mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-make
>




reply via email to

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