From 27b66594938d58ee9929fcb402817f5ad86cb631 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 25 May 2014 11:22:48 +0300 Subject: [PATCH] Re: [RFC PATCH] configure: Create sh.config based on Makefile.config data --- af/281943ef97e080d3bae61ba36aeec9670681f0 | 124 ++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 af/281943ef97e080d3bae61ba36aeec9670681f0 diff --git a/af/281943ef97e080d3bae61ba36aeec9670681f0 b/af/281943ef97e080d3bae61ba36aeec9670681f0 new file mode 100644 index 000000000..f4ce6c929 --- /dev/null +++ b/af/281943ef97e080d3bae61ba36aeec9670681f0 @@ -0,0 +1,124 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 3AF82431FC7 + for ; Sun, 25 May 2014 01:23:00 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id uW3pYebESL2a for ; + Sun, 25 May 2014 01:22:56 -0700 (PDT) +Received: from mail-we0-f176.google.com (mail-we0-f176.google.com + [74.125.82.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id C2B52431FC4 + for ; Sun, 25 May 2014 01:22:55 -0700 (PDT) +Received: by mail-we0-f176.google.com with SMTP id q59so6507791wes.7 + for ; Sun, 25 May 2014 01:22:52 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type; + bh=O1C9HFKvVq1SZALij5ov63uiah2kWoE1NDJvph6AkK0=; + b=gLota+NZ/ozESr9emiPJ3Hoa2X+Vy9HgYR4nFo+yPXUkDdiJakJMsakoQkZPcGfJhT + QDY5PbnCVeiw+qxmuQRzg93n6GdC5NU8GTU65SyRpvYBmaFhhFRcScAbHpe0NlZhmWPa + /PJRuD8pYLIbwEiCki8kd3FurH2pv3oWgBK45vygOSMbR60yXoFol4pXQAl2xjqiB05b + vbINCrp1DAqL3MMDD/wcBy0N/NKyeu5TAZMl3wpzRciXw73djx9hLR9TavO565XsNJhx + JbPo88jW34aEPdXzDSDIOV58FQfMb5O+KPVFEnm/vl6OJJ3lbIZUe4Zy26Wf9P2AUlLi + VJXQ== +X-Gm-Message-State: + ALoCoQniDxtKcrayTL8wEagZh6/ZvNtGVDJSQM5sUMl/4nMuyR1Q1KQLke8MMfrK4DUMkmvb4g3e +X-Received: by 10.194.109.68 with SMTP id hq4mr19245467wjb.21.1401006171301; + Sun, 25 May 2014 01:22:51 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) + by mx.google.com with ESMTPSA id ey3sm419964wib.18.2014.05.25.01.22.49 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sun, 25 May 2014 01:22:50 -0700 (PDT) +From: Jani Nikula +To: Tomi Ollila , notmuch@notmuchmail.org +Subject: Re: [RFC PATCH] configure: Create sh.config based on Makefile.config + data +In-Reply-To: <1399802816-29521-1-git-send-email-tomi.ollila@iki.fi> +References: <1399802816-29521-1-git-send-email-tomi.ollila@iki.fi> +User-Agent: Notmuch/0.18~rc0+2~gbc64cdc (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sun, 25 May 2014 11:22:48 +0300 +Message-ID: <87tx8ei7xj.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain +Cc: tomi.ollila@iki.fi +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 25 May 2014 08:23:00 -0000 + +On Sun, 11 May 2014, Tomi Ollila wrote: +> Read Makefile.config and when line matches var = val assignment +> create _var='val' from it. var must match [a-zA-Z_][a-zA-Z0-9_]* +> and val [^'\]* ('\' usually meaning multiline assignments). +> +> Write these lines to sh.config. +> +> sh.config can then be used e.g. in test scripts. + +I like the general idea here much better than [1] or the symlinks that +we have now. However I'm wary of the sed magic and the various ways it +might trip over. The resulting file has way more info than we need, but +then it also misses the multiline settings (which we luckily don't +need). + +At the risk of duplicating stuff, I'd go with manually generated config +for shell with minimal amount of information. For now, we'd only need +this for HAVE_XAPIAN_COMPACT and HAVE_MAN (the latter of which could +also be dropped from Makefile.config). + +BR, +Jani. + + +[1] id:1399737224-79348-1-git-send-email-cceleri@cs.stanford.edu + + + + +> --- +> configure | 5 +++++ +> 1 file changed, 5 insertions(+) +> +> diff --git a/configure b/configure +> index 9bde2eb72b0e..feb0e480f86a 100755 +> --- a/configure +> +++ b/configure +> @@ -935,3 +935,8 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\ +> +> CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(XAPIAN_LDFLAGS) +> EOF +> + +> +# Create sh.config based on Makefile.config values. +> +# Output will be _var='val', val not containing ' nor \ (skipping multiline). +> +sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\) *= *\([^\\'\'']*\)$/_\1='\''\2'\''/p' \ +> + Makefile.config > sh.config +> -- +> 1.8.0 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2