MESSAGE
DATE | 2021-01-31 |
FROM | Gavin Smith
|
SUBJECT | Re: [Hangout - NYLXS] Future plans for Autotools
|
From hangout-bounces-at-nylxs.com Sun Jan 31 22:52:27 2021 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: from www2.mrbrklyn.com (www2.mrbrklyn.com [96.57.23.82]) by mrbrklyn.com (Postfix) with ESMTP id 0A50D163FF0; Sun, 31 Jan 2021 22:52:27 -0500 (EST) X-Original-To: hangout-at-www2.mrbrklyn.com Delivered-To: hangout-at-www2.mrbrklyn.com Received: by mrbrklyn.com (Postfix, from userid 1000) id 93DF7163FDF; Sun, 31 Jan 2021 22:52:10 -0500 (EST) Resent-From: Ruben Safir Resent-Date: Sun, 31 Jan 2021 22:52:10 -0500 Resent-Message-ID: <20210201035210.GB5517-at-www2.mrbrklyn.com> Resent-To: hangout-at-mrbrklyn.com X-Original-To: ruben-at-mrbrklyn.com Delivered-To: ruben-at-mrbrklyn.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mrbrklyn.com (Postfix) with ESMTP id E590C163FE2 for ; Sun, 31 Jan 2021 17:14:33 -0500 (EST) Received: from localhost ([::1]:33552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6KzJ-0002f8-9g for ruben-at-mrbrklyn.com; Sun, 31 Jan 2021 17:14:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6Kz6-0002ex-6S for autoconf-at-gnu.org; Sun, 31 Jan 2021 17:14:20 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:40836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6Kz2-0005eo-W6; Sun, 31 Jan 2021 17:14:19 -0500 Received: by mail-ed1-x534.google.com with SMTP id s3so3010631edi.7; Sun, 31 Jan 2021 14:14:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=puFXJCZILwg0/cHMtj+HYeJXgY9OhAzqvKmgxpXQHlc=; b=TGjssh4nQaqU/cqV5TV7Snjy41Hxrtl0fTCdbz0ehOePBXIyjMg2bFwTgMSwk8vAm3 TCvJ9DxaX2DZTx1fee9qfLCYQDs32sVWoEpNN9y94KOwT5Lm/Pzej5hR9BrHYscP5nWK U+D6df7lAhvyRnly5EJnGHUTVXAGo0zS8N+Sp8MFPP8dvHA6Fltmdgc20JAx2cEkmh/D GXBZgxH6ruduoqQcRkN2sGewpRpOfVhBgJzmeWBt2PAn0ctRPmLU6uThX1ZsHXlPf27s 78ImiwROWUcQExh6Jk1oL4hl6GcLTcMTYecczAhSAOYQ8vDNSBXOBLFK0xdtsZbpBupu IIVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=puFXJCZILwg0/cHMtj+HYeJXgY9OhAzqvKmgxpXQHlc=; b=HnkCwnzSVgDyLCsfZgBoa6VWZF95AtcQfOlHeFbhZMpL0G+xHlA695XelVdR+tby9Q ekdFLw0DdLmoQyiRH7MX+7/11TimPbvK5ua0rYXjyIEES9RZSgg7KIhLEDd0q34dnA4R +/vN2SV8YKPVN3GW4Nf94TEVFAsZRerqeKkWuDzhPXsBC+Ex9ZcO24DCfvfTmM0guED7 50xddUJVJXMleT15lbvbvhlF+fNyXZdf4Yk/tTBvi2suIJ2iufNIWQnjOdkTkw+wrtfp BbWtFSxzWhOeuRevCRI0lpsnrWtkyUeYuHnecq122tNDYc0SRtbX2Z2OqATn6Nv9xxPk WQcA== X-Gm-Message-State: AOAM530n0SglLNLwG+t2XDCvYHMz276k8EyEJkPppO/CiS2t2GkvHtxk 5QwANoLG3x/FA09k8vCrXjw= X-Google-Smtp-Source: ABdhPJw9l6xHpW1Bgq94ZB6oVUeehWnSZsDXNtpJOGwLmqVXBkyxrpeV+wczDEDk+H6JZ2bpzWEzvQ== X-Received: by 2002:aa7:d288:: with SMTP id w8mr15803787edq.241.1612131254981; Sun, 31 Jan 2021 14:14:14 -0800 (PST) Received: from mintstar.lan (53.48.208.46.dyn.plus.net. [46.208.48.53]) by smtp.gmail.com with ESMTPSA id w24sm966799ejn.36.2021.01.31.14.14.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jan 2021 14:14:14 -0800 (PST) From: Gavin Smith X-Google-Original-From: Gavin Smith Received: by mintstar.lan (Postfix, from userid 1000) id 5427FB40251; Sun, 31 Jan 2021 22:14:11 +0000 (GMT) Date: Sun, 31 Jan 2021 22:14:11 +0000 To: Paul Eggert Message-ID: <20210131221411.GA26916-at-mintstar> References: <87zh12osjk.fsf-at-tromey.com> <87eei97w7a.fsf-at-tromey.com> <25f02fe5254319a29cde8215893450fc0e0850f7.camel-at-gnu.org> <6f2198b7-70e4-91de-b4ee-aa8ec7eef912-at-cs.ucla.edu> <20210125225901.GA22668-at-mintstar> <408c6984-b859-2d29-fc8f-e19fd1fcab7d-at-cs.ucla.edu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <408c6984-b859-2d29-fc8f-e19fd1fcab7d-at-cs.ucla.edu> User-Agent: Mutt/1.9.4 (2018-02-28) Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=gavinsmith0123-at-gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: autoconf-at-gnu.org X-Mailman-Version: 2.1.23 Precedence: list Cc: Autoconf Subject: Re: [Hangout - NYLXS] Future plans for Autotools X-BeenThere: hangout-at-nylxs.com List-Id: NYLXS Tech Talk and Politics List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: hangout-bounces-at-nylxs.com Sender: "Hangout"
On Mon, Jan 25, 2021 at 03:15:47PM -0800, Paul Eggert wrote: > On 1/25/21 2:59 PM, Gavin Smith wrote: > > Does this > > work or does GNU make have other ways of doing this? (It would be > > better if it could be done without communicating via files.) Is there > > any way to set a Makefile variable from within a rule and then depend upon > > that variable being set in other rules? > > GNU Make supports variables defined via ::=, and an earlier section of a GNU > makefile could compute CC and assign to it that way. This would handle the > simple case you gave. Unfortunately there are other cases that would require > intermediate files with current GNU Make. Still, the overhead in using files > would be worth it (at least for me) if we could use make -j. > > The ::= feature was added to POSIX ten years ago or so, so it could even be > used in Makefiles intended to be portable to other new-enough > POSIX-compatible platforms. It wouldn't work on older platforms, though.
Another issue is how to record the results of tests from a a Makefile. With autoconf, autoconf variables are recorded with AC_CONFIG_FILES and AC_CONFIG_HEADERS. Presumably the same would have to be done, substituting in an output file with the values of these variables. However, there can be many hundreds of them (just look at a Makefile.in file). As far as I can tell, there isn't an easy way to export hundreds of Makefile variables to a process. Is there some feature or trick I'm missing?
You could build up a long command line, but it could end up being extremely long. The code below shows how this could be done with GNU Make (for just 3 variables). The substitution step would need to be done after all the variables had been set, unless there was some kind of locking/synchronisation to allow Makefile rules to record configuration variables in parallel. It's possible to create a small file for every variable but this would lead to hundreds of small files being created.
VARS::=
VARS::=$(VARS) A=$$(A) set-A: $(eval A ::= $(shell echo 1))
VARS::=$(VARS) B=$$(B) set-B: $(eval B ::= $(shell echo 2))
VARS::=$(VARS) C=$$(C) set-C: $(eval C ::= $(shell echo 3))
finish-configure: set-A set-B set-C $(eval EXVARS=$(VARS)) export $(EXVARS) ; echo "$$A $$B $$C"
_______________________________________________ Hangout mailing list Hangout-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/hangout
|
|