Received: from eggs.gnu.org ([209.51.188.92]:35255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghZdY-0008Gu-JQ for qemu-devel@nongnu.org; Thu, 10 Jan 2019 07:40:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghZdX-0002y1-LE for qemu-devel@nongnu.org; Thu, 10 Jan 2019 07:40:40 -0500 From: Markus Armbruster References: <20190103213320.2653-1-lbloch@janustech.com> <20190103213320.2653-2-lbloch@janustech.com> <8736q3ebs2.fsf@dusky.pond.sub.org> Date: Thu, 10 Jan 2019 13:40:16 +0100 In-Reply-To: (Leonid Bloch's message of "Thu, 10 Jan 2019 09:42:44 +0000") Message-ID: <87h8eghej3.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 1/1] include: Auto-generate the sizes lookup table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leonid Bloch Cc: Markus Armbruster , Kevin Wolf , Alberto Garcia , "qemu-block@nongnu.org" , Stefan Weil , "qemu-devel@nongnu.org" , Max Reitz , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Leonid Bloch writes: > Hi, > > On 1/8/19 11:31 AM, Markus Armbruster wrote: >> I'd leave it hard-coded. Replacing a few trivial defines by an arguably >> less trivial script doesn't feel like an improvement. In this case, it >> doesn't even save lines. > > As I've said, I'm fine with that. The autogeneration sounds the right > thing to do here, as the table is autogenertaed anyway, but indeed it is > already there, explained, and even the script for generating it appears > in the comments for reproducibility. > >> >> I'm not sure I'd use shell for this, but since you already wrote it and >> it works... >> > > If you've noticed, the original script was in AWK. But to be as generic > as possible, I didn't write the generation script in AWK because even > AWK is not guaranteed to be installed on the build system. The only > interpreted language that is guaranteed to be there is shell (most basic > shell) because .configure itself needs it. Well, $ grep -w awk configure maj=`libgcrypt-config --version | awk -F . '{print $1}'` min=`libgcrypt-config --version | awk -F . '{print $2}'` The build also requires Python. [...]