From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KpLfl-0003GI-QN for mharc-grub-devel@gnu.org; Mon, 13 Oct 2008 07:33:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KpLfj-0003Et-9J for grub-devel@gnu.org; Mon, 13 Oct 2008 07:33:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KpLfh-0003Dk-KP for grub-devel@gnu.org; Mon, 13 Oct 2008 07:33:10 -0400 Received: from [199.232.76.173] (port=60087 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpLfh-0003DU-Du for grub-devel@gnu.org; Mon, 13 Oct 2008 07:33:09 -0400 Received: from wr-out-0506.google.com ([64.233.184.233]:46735) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KpLfh-0004vQ-9n for grub-devel@gnu.org; Mon, 13 Oct 2008 07:33:09 -0400 Received: by wr-out-0506.google.com with SMTP id c30so1171384wra.14 for ; Mon, 13 Oct 2008 04:33:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:content-class :from:subject:date:importance:x-priority:to :content-transfer-encoding:content-type:message-id; bh=hMVCP67dwX5kSeFgq6xMisJkgsLTdDG7JLEuvDuqrFg=; b=rDF+ilFhCReysOj1hcvoxhCsURHd1kRg8qtOuiRPOe4ez2QU6WlPLDuBZXRCkUELId XZViFtZ6fShZ6w+m30HrTDGT8RP+hrGyrRp4g6xw1IglKSi7deeJE9Ycvdb+DO+nSwvB t08d2F9hH5tH02v/h9QuhmbYaPA12+nC7eIwE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:content-class:from:subject:date:importance:x-priority :to:content-transfer-encoding:content-type:message-id; b=Fo6VtxaBaebEy+q4ns8LsQZg96P9OIWnxKDpFm96JYPY4aVC/yDQmJzJyZyFvz5fIJ G6C9tGLpVGB9lj8nz4z7bYgJkHH7oaZ2R5Hf5HzwaWRlbe4HJwGAf6Hvc7njvv5Ynmlv JBdprEnxwmvH24aCerLy6iAV/uUVoMVwpoSj0= Received: by 10.65.215.14 with SMTP id s14mr10470543qbq.18.1223897587739; Mon, 13 Oct 2008 04:33:07 -0700 (PDT) Received: from Inbox ([72.61.147.76]) by mx.google.com with ESMTPS id q16sm9154745qbq.0.2008.10.13.04.33.04 (version=SSLv3 cipher=RC4-MD5); Mon, 13 Oct 2008 04:33:06 -0700 (PDT) MIME-Version: 1.0 content-class: From: James Shewey Date: Mon, 13 Oct 2008 07:33:17 -0400 Importance: normal X-Priority: 3 To: The development of GRUB 2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Message-ID: <48f331f2.102b400a.1f58.ffffd488@mx.google.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: RE: Problem in configure X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2008 11:33:12 -0000 Ahh. That makes sense. Interesting bit of history there. The x in the left = side of the evuation is what threw me. I didn't think that would even be le= gal syntactically, but those explanations make a lot of sense. - James -----Original Message----- From: Christian Franke Sent: Monday, October 13, 2008 3:38 AM To: The development of GRUB 2 Subject: Re: Problem in configure Clemens Helfmeier wrote: > This is a shell thing. It just ensures that the evaluation does not > result in if test =3D xno; then > (in case the variable is empty) and thus throw an error. with "x" it > its like this for an empty variable > if test x =3D xno; then > which would work fine for shells. >=20 BTW: This is not necessary if the expanded argument is quoted like in the original example. Instead of test "x$foo" =3D "xno" it is OK to use: test "$foo" =3D "no" or test "$foo" =3D no which is IMO more easy to read. For an unset/empty variable, this expands to test "" =3D no which does not throw an error. The leading 'x' was probably necessary for very ancient shells with broken evaluation of quoted empty argument. [The entire original message is not included]=