--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id B748A431FC7\r
+ for <notmuch@notmuchmail.org>; Sun, 25 May 2014 08:54:26 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id j5PUhvxToiNk for <notmuch@notmuchmail.org>;\r
+ Sun, 25 May 2014 08:54:18 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 8F804431FAF\r
+ for <notmuch@notmuchmail.org>; Sun, 25 May 2014 08:54:18 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id B10F410008F;\r
+ Sun, 25 May 2014 18:54:08 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Jani Nikula <jani@nikula.org>, Charles Celerier <cceleri@cs.stanford.edu>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: [RFC PATCH] configure: Create sh.config based on\r
+ Makefile.config data\r
+In-Reply-To: <87tx8ei7xj.fsf@nikula.org>\r
+References: <1399802816-29521-1-git-send-email-tomi.ollila@iki.fi>\r
+ <87tx8ei7xj.fsf@nikula.org>\r
+User-Agent: Notmuch/0.18+12~g9d41f94 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Sun, 25 May 2014 18:54:08 +0300\r
+Message-ID: <m2lhtphn1b.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 25 May 2014 15:54:26 -0000\r
+\r
+On Sun, May 25 2014, Jani Nikula <jani@nikula.org> wrote:\r
+\r
+> On Sun, 11 May 2014, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+>> Read Makefile.config and when line matches var = val assignment\r
+>> create _var='val' from it. var must match [a-zA-Z_][a-zA-Z0-9_]*\r
+>> and val [^'\]* ('\' usually meaning multiline assignments).\r
+>>\r
+>> Write these lines to sh.config.\r
+>>\r
+>> sh.config can then be used e.g. in test scripts.\r
+>\r
+> I like the general idea here much better than [1] or the symlinks that\r
+> we have now. However I'm wary of the sed magic and the various ways it\r
+> might trip over. The resulting file has way more info than we need, but\r
+> then it also misses the multiline settings (which we luckily don't\r
+> need).\r
+>\r
+> At the risk of duplicating stuff, I'd go with manually generated config\r
+> for shell with minimal amount of information. For now, we'd only need\r
+> this for HAVE_XAPIAN_COMPACT and HAVE_MAN (the latter of which could\r
+> also be dropped from Makefile.config).\r
+\r
+I agree with this. It looks simpler and cleaner to an outside observer.\r
+I don't think the duplication of (one variable now) stuff is of any issue\r
+here (now or in foreseeable future).\r
+\r
+>\r
+> BR,\r
+> Jani.\r
+>\r
+>\r
+> [1] id:1399737224-79348-1-git-send-email-cceleri@cs.stanford.edu\r
+\r
+In any case, this sh.config to be useful sourcing of it needs to be\r
+added to test/test-lib.sh and then used in the followup patch of\r
+the above...\r
+\r
+Tomi\r
+\r
+\r
+>> ---\r
+>> configure | 5 +++++\r
+>> 1 file changed, 5 insertions(+)\r
+>>\r
+>> diff --git a/configure b/configure\r
+>> index 9bde2eb72b0e..feb0e480f86a 100755\r
+>> --- a/configure\r
+>> +++ b/configure\r
+>> @@ -935,3 +935,8 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\\r
+>> \r
+>> CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(XAPIAN_LDFLAGS)\r
+>> EOF\r
+>> +\r
+>> +# Create sh.config based on Makefile.config values.\r
+>> +# Output will be _var='val', val not containing ' nor \ (skipping multiline).\r
+>> +sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\) *= *\([^\\'\'']*\)$/_\1='\''\2'\''/p' \\r
+>> + Makefile.config > sh.config\r
+>> -- \r
+>> 1.8.0\r
+>>\r
+>> _______________________________________________\r
+>> notmuch mailing list\r
+>> notmuch@notmuchmail.org\r
+>> http://notmuchmail.org/mailman/listinfo/notmuch\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r