From nobody Tue Oct 28 02:10:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516113580019481.8492733372277; Tue, 16 Jan 2018 06:39:40 -0800 (PST) Received: from localhost ([::1]:39335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebSOp-0003Y3-6j for importer@patchew.org; Tue, 16 Jan 2018 09:39:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebS3o-0002kw-3O for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:17:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebS3m-0004Wz-SM for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:17:56 -0500 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:45573) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebS3m-0004Wb-Mn for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:17:54 -0500 Received: by mail-wm0-x22e.google.com with SMTP id i186so8655080wmi.4 for ; Tue, 16 Jan 2018 06:17:54 -0800 (PST) Received: from 640k.lan (dynamic-adsl-78-12-229-84.clienti.tiscali.it. [78.12.229.84]) by smtp.gmail.com with ESMTPSA id u10sm1537758wrg.6.2018.01.16.06.17.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 06:17:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Iy1cEWNYc+gmCs5bFDOFahinbIYkv7uox2nZzAulF+I=; b=G+1Zu9YxiT2MjP0NDHH986fXgKQ/brdR1b9kuUNsYoPVSkfcvU1NQkL0O6W/hPOOTs zSadSIjQdzy2x0r2mW6bdXDGSuFWGVmIop8S40f/fsBMsGFbqA02a/HgK7Q6z1WIB9Zp wI537AN4s2ZKIji4Cro0R+wXTm8TB2jlQFlokEwedlsr+fnLXkVAtDj6Y7FO0yHjPYJ8 ySGVYuznKxXqP62hjLGFEANc5QwrMXvzfjzvi49v+h25A5rsO5AT40S5VaFbUcB8V5/t bH4aCvULDuquW/ja94LyDqfwy70hXQ4TsQCwi8lgZrI+VjFDvXVasx8jMvKcGbCRrqaG +8JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Iy1cEWNYc+gmCs5bFDOFahinbIYkv7uox2nZzAulF+I=; b=KmtBrsdndshbutpuQGgH1co/LuV+0XuesCDOss+j6GRMuQUcOtrrDKTN9wvBAFSyHK 4+FWCkRxtPizJOO8WrmZSP2fG4AkQeY2A3Or06o37ve73McJJyKyfMHZ0OJnbqNznKq/ JmIkuyEAcyiUw5+83h20cvCCvLAkRhPYuodKcLcYQYVN+k4Qi8piE0b+9LTWT7nkzW2c yzfMx6xPnloyTAZG3whNbxE4eC8MltGh6ASCIrU1gyVePnoP1lzgOaLwqyYV3JFSCNql TxnVLKxL4+u5IC8pGFQQZbIYJpVVjWtZLpwaYinMtINhfQ+RG2Mc6k6oZpITQO1zL4d/ kR+Q== X-Gm-Message-State: AKwxytcELK7e98/0794lu7sbOYamkeOrEfEk0h/AWySgLVi6LQAapsv+ 46n+3udvYZWGjMn36eM40OQfF2cB X-Google-Smtp-Source: ACJfBov7AN8kHpZJ7KYD/T4Vg0g7j4+8uRZeZossJE8rF7cgbh/rlzOnRHwgj754U7G5NnPPvePN8Q== X-Received: by 10.28.165.4 with SMTP id o4mr13203729wme.66.1516112273325; Tue, 16 Jan 2018 06:17:53 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 16 Jan 2018 15:16:53 +0100 Message-Id: <1516112253-14480-12-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1516112253-14480-1-git-send-email-pbonzini@redhat.com> References: <1516112253-14480-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22e Subject: [Qemu-devel] [PULL 11/51] build-sys: add a rule to print a variable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Marc-Andr=C3=A9 Lureau $ make print-CFLAGS CFLAGS=3D-fsanitize=3Daddress -Og -g Trick from various sources: https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in= -makefile https://www.cmcrossroads.com/article/printing-value-makefile-variable Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Eric Blake Message-Id: <20180104160523.22995-4-marcandre.lureau@redhat.com> Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Paolo Bonzini --- Makefile | 5 ++++- docs/devel/build-system.txt | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1671db3..f26ef1b 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,12 @@ SRC_PATH=3D. =20 UNCHECKED_GOALS :=3D %clean TAGS cscope ctags dist \ html info pdf txt \ - help check-help \ + help check-help print-% \ docker docker-% vm-test vm-build-% =20 +print-%: + @echo '$*=3D$($*)' + # All following code might depend on configuration variables ifneq ($(wildcard config-host.mak),) # Put the all: rule here so that config-host.mak can contain dependencies. diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.txt index 386ef36..52501f2 100644 --- a/docs/devel/build-system.txt +++ b/docs/devel/build-system.txt @@ -510,3 +510,16 @@ default-configs/$TARGET-NAME file as input. This is the entrypoint used when make recurses to build a single system or userspace emulator target. It is merely a symlink back to the Makefile.target in the top level. + + +Useful make targets +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +- help + + Print a help message for the most common build targets. + +- print-VAR + + Print the value of the variable VAR. Useful for debugging the build + system. --=20 1.8.3.1