From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 6 12:30:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5984616A4CE for ; Tue, 6 Apr 2004 12:30:03 -0700 (PDT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4369643D48 for ; Tue, 6 Apr 2004 12:30:03 -0700 (PDT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i36JBZgd003022; Tue, 6 Apr 2004 12:11:35 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i36JBZ6a003021; Tue, 6 Apr 2004 12:11:35 -0700 (PDT) (envelope-from rizzo) Date: Tue, 6 Apr 2004 12:11:35 -0700 From: Luigi Rizzo To: Jens Schweikhardt Message-ID: <20040406121135.A98012@xorpc.icir.org> References: <20040406182600.GA3907@schweikhardt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040406182600.GA3907@schweikhardt.net>; from schweikh@schweikhardt.net on Tue, Apr 06, 2004 at 08:26:00PM +0200 cc: hackers@freebsd.org Subject: Re: make(1) guru question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 19:30:03 -0000 On Tue, Apr 06, 2004 at 08:26:00PM +0200, Jens Schweikhardt wrote: > Fellow hackers, > > suppose you have a long list of files in a make variable V, exceeding > kern.argmax. This means there is no way you can write a rule where $(V) > is a command argument in any way shape or form. There is also no way to > pass the value of V to xargs that I know of. For example with this depending on the use, you might use something like make -V variable_name | xargs ... within the makefile. I got the suggestion from someone long ago when I had this problem with src/sys/conf/Makefile.i386 cheers luigi > Makefile: > > # Make V exceed kern.argmax (64K). > V != jot 12440 > all: > @ echo $(V) > > This fails with > > echo:Argument list too long > *** Error code 1 > > Furthermore the workaround of creating a process for each file in V with > > V != jot 12440 > all: > .for v in $(V) > @ echo $(v) > .endfor > > is not acceptable because it creates too much overhead for process > creation (think of echo being an expensive command.) Question: is there > any other way (short of increasing kern.argmax) to maybe divide and > conquer the V contents by use of substitution magic? I'm thinking of > something along repeatedly cramming N items in some variable and then > calling echo less often. > > The original problem can be found in > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/52765 > > Regards, > > Jens > -- > Jens Schweikhardt http://www.schweikhardt.net/ > SIGSIG -- signature too long (core dumped) > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"