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

Re: [PATCH 1/7] tools/tests/*/Makefile: factor out common PHONY rules into Rules.mk


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Edwin Torok <edwin.torok@xxxxxxxxxx>
  • Date: Tue, 24 Feb 2026 09:38:31 +0000
  • Accept-language: en-GB, en-US
  • 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=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OOZubTdsiOzrnf4BstJ6DozdEDs++6HU0dKHiLxr+WA=; b=JQCy/5fXBK1vDD8mbdEBcAUtbPMOPxhMFK32ZC8dhvLc+LxCJsEzvpcofNFB3sNWGyYzO1gh1HCLo9Cbh42/la9HOpuYEOR1MY6IJzr3yKZnOiYa0ux3DF8C+Z/JghWG28B6nZaIHsD/7Y+xT689fdqDgD3ZPJdd3bUtb/hFdARTn39vyBtBPvT/iGi9rUyAq4RkSPxFUdPtwKr9WY8wDYmF8XTpFBjzChkwFB4NVnwtf9CHSGTpRhcRQNk3Z9VIL6gg1DKT5vlc2ugBpa1D3a4VTKQlJjgh5CcqA+ineeklZ3uVB5+0V2RHD2LEkQQdqWlvc5vUotuJHYFPFfBa3g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jetU5IdlywYO3wo1ABbOwxGpcS8DEJs5t/lKnWYJA7EAOIlY6q9fzH5XhaROFcq5FP/LtaV04p9RYx1+2qodGaAjvIHe55s0inFHudQ2d32eNC5qP1CTYpPP6NAD3Eu5pbJnAhvuKk9B34NfORfZ3Aes9gPlHiDNVifTYPlXDtP45mNdvTNJwgZ5l1Ba6h11OBPyUBJiXhUCpK1U+2Nsoru4sKpNjtpHixy9a8O+yssU+Pcy+OesHJ0X+Zna6CFEU6Eo1mNlcB9Tt2vuDGLm46HTBWcW/5VLJJcRRBP8hbAWuaossUjaLI//yKo4mV7y3swaQqryqaKtPc5JgOCxkA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 24 Feb 2026 09:38:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcpK0tQx2+yGxKK0yu3GIXOaCAi7WQe++AgAEdWAA=
  • Thread-topic: [PATCH 1/7] tools/tests/*/Makefile: factor out common PHONY rules into Rules.mk



On 23 Feb 2026, at 16:37, Jan Beulich <jbeulich@xxxxxxxx> wrote:

On 23.02.2026 11:14, Edwin Török wrote:
Introduce a new tools/tests/Rules.mk that must be included *last* in a
Makefile, after TARGETS is defined.

Requiring inclusion after TARGETS is defined is certainly okay. Requiring it to
be included absolutely last is imo going too far. There surely are going to be
cases where something wants overriding or adding to.


I’ll change this so that the Makefile defines XEN_ROOT, CFLAGS, LDFLAGS, TARGETS, and then includes the file.


--- /dev/null
+++ b/tools/tests/Rules.mk
@@ -0,0 +1,48 @@
+# Usage: include this last in your Makefile.
+#
+# For example:
+#
+# XEN_ROOT = $(CURDIR)/../../..
+# include $(XEN_ROOT)/tools/Rules.mk
+#
+# TARGETS := ...
+# ...
+# include $(XEN_ROOT)/tools/tests/Rules.mk
+
+ifndef XEN_ROOT
+$(error XEN_ROOT is not defined)
+endif
+
+.PHONY: all
+all: $(TARGETS)
+.DEFAULT_GOAL: all

Make 3.80, which ./README still says we support, doesn't look to know this.

Do you know which (Linux) distribution and version would have Make 3.80 so I can test my changes there?
I tried looking at https://repology.org/project/make/versions, but the only OS that has make 3.80 is AIX, and I don’t have access to that.

Thanks,
—Edwin

 


Rackspace

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