[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH RFC] build: detect outdated configure outputs


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Thu, 11 Mar 2021 12:46:01 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AGWjZ3EVvrR6mDn+7xMbHXeHY+vOZlhj5RzxnRGgHSE=; b=IHmxOVi3ADlRpfYobR1KvzZcM9BuNjkyJs8E65KXJWPgvu63Gpg+KaUQ13FN7lueaE9ixZCmWPUr+rKb02DWCnhaKAe6XkFhel+7ay/SHYsy/eyenxdBHm91K4yoBV/vwfSsuvk2/Cpm39b3nN7kmbla+744UdTRUH6pUzBeulPld7vkgJtO1lGvGobb91A0VNJWnRAByvkSb9x+0PDD5b2NuiLd9lwRPBRASne9DDiTr+j2knOxPM9MYrRX/9QzD+DOqd7OHPleQCqH3FzT+FInkX025mArlj2Fip8SX6QWSLgv+9m2ZrgicEQ279RoWBe5r10fhswLBSDhmnjNSQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EPHHxULU200S1HUK0ECV4A7c9NfCOIBLcKH1xRL7FE8i9N2kETWxtNeytylCOn89Odr7peyFybFSBqMXDOOTMKvHnyXy28qfjYLO7DQZ1OF3A4cbzuz1gj59hxXvkIdu/OeuqwNt+mXVSyMDLPhOSWbgYTE6Qfe9fQSAA8g3SRtKzdhgp2Kxa9V6vrVAGqw4aPIrcwxIJQFs4e8ZEGfsUG7jqD5oQVmikwc3SzCAmCT6c5JhIf+Fi2aecerEeM0USqD1e16JWKmxflhQ7N+/cba2oAeaTTzh0jLl26xD6Jclt3/HgcrD7pFCSVsvjmrIFlFEZ6/B3yUa0dJsS47H8w==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 11 Mar 2021 11:46:34 +0000
  • Ironport-hdrordr: A9a23:xunhjKvVU2TvG/YVSi6kOvtl7skCpIMji2hD6mlwRA09T+Wxi9 2ukPMH1RX9lTYWXzUalcqdPbSbKEmwybde6+AqXYuKdg/gpWeuMcVe/ZLvqgeQfxHW28x88e Nbc6Z4AMDtFlQSt6zHySSxDtpI+ra62Y+yg+O29RlQZCVLT40l0AtjEAacFSRNNWx7LL40Do CV6MYChxfIQwV1Uu2BCnMIX/fOqrTw/fqLXTc8CwM68w7LtDu06dfBeCSw5AsUUD9E3N4ZgA r4ujH+j5/Dj9iLjiXy+kWWxJRQldvnxLJ4dbGxo/lQEBrAoEKFYIxgXpeLoTw6pvq+gWxa7O XkklMbEOlYr1/XY2GpsTvhsjOQrwoG2jvZ5nKzxVvlvMDjSzoxB6N69PxkWyqc0WUMlpVY8s twrgWknqsSNzzstmDBwuKNcBdQmk+9sRMZ4JUupk0aa6QyQvtst4AFlXkldqsoLWbBx60MNv JhN83Y7OY+SyLhU1np+lNix9GhRR0Ib267a3lHvsSU1g5fl2xiw30Zw9QCnmwB+IhVceg929 j5
  • Ironport-sdr: HSlwVoszlM5vTRK/0XZvenREwqiomo/W6gj7Y8e+h2gEuO4F2c7cOwHJ4RAcRGxrnevjrL/oc5 QnsxLgpiCl2P/bPeq68rGGJfV3+4uOraYElwJ5T0Dpg1+wR29ILen2vTmVEUdSCUIfsiwDYqe3 xT+T4z7Waw65wfhPw+e8DXwOa8ReDovRDEc5nCH7e1HuFefOr7qviXHnCxzZqGVty6OUu2/nco UN87hBsEYJRD8a8GzzZ892AvkBLJSdLRYzsu3D5jG2klolJnshkrxMdqQNvAfRTb1R14AtqbPl 0Sg=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The Xen build system relies on configure to parse some .in files in
order to do substitutions based on the data gathered from configure.

The main issue with those substitutions done at the configure level is
that make is not able to detect when they go out of date because the
.in file has been modified, and hence it's possible to end up in a
situation where .in files have been modified but the build is using
outdated ones. This is made even worse because the 'clean' targets
don't remove the output of the .in parsing, so doing a typical `make
clean && make` will still use the old files without complaining.
Note that 'clean' not removing the output of the .in transformations
is the right behavior, otherwise Xen would require re-executing the
configure script after each clean.

Attempt to improve the situation by adding a global rule that spot the
outdated files as long as they are properly listed as makefile target
prerequisites.

Ultimately those substitutions should be part of the build phase, not
the configure one.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
RFC because I'm not sure if there's some better way to handle this.
Also I think we would want to make sure all the .in outputs are
properly listed as target prerequisites, or else this won't work.

Also not sure whether this will break some other usage of .in files
I'm not aware.
---
 Config.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Config.mk b/Config.mk
index a56a971028..a81d384899 100644
--- a/Config.mk
+++ b/Config.mk
@@ -65,6 +65,10 @@ DEPS_RM = $(DEPS) $(DEPS_INCLUDE)
 %.d2: %.d
        sed "s!\(^\| \)$$PWD/! !" $^ >$@.tmp && mv -f $@.tmp $@
 
+# Make sure the configure generated files are up to date
+%: %.in
+       $(error $@ is outdated, please re-run configure)
+
 include $(XEN_ROOT)/config/$(XEN_OS).mk
 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
 
-- 
2.30.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.