From: Daniel Gomez <da.gomez@kernel.org>
To: Luis Chamberlain <mcgrof@kernel.org>,
Chuck Lever <chuck.lever@oracle.com>
Cc: kdevops@lists.linux.dev, Daniel Gomez <da.gomez@kernel.org>,
Daniel Gomez <da.gomez@samsung.com>
Subject: [PATCH v2 04/10] Makefile: print target when debug
Date: Fri, 02 May 2025 14:13:21 +0200 [thread overview]
Message-ID: <20250502-ansible_cfg_inventory-v2-4-d3c19ff4aa6e@samsung.com> (raw)
In-Reply-To: <20250502-ansible_cfg_inventory-v2-0-d3c19ff4aa6e@samsung.com>
From: Daniel Gomez <da.gomez@samsung.com>
When debugging with V=1, print also the Makefile target before the
command.
This allows to speciy the target as well as keep verbosity of the
command being executed. The only limitations is that commands are
printed in one line.
Example:
make V=1
==> [ansible.cfg]
+ ansible-playbook playbooks/ansible_cfg.yml --extra-vars=@./.extra_vars_auto.yaml
[WARNING]: You are running the development version of Ansible. You
should only run Ansible from "devel" if you are modifying the Ansible
engine, or trying out features under development. This is a rapidly
changing source of code and can become unstable at any point.
PLAY 1: ANSIBLE CONFIGURATION ROLE
task 1. [started TASK: Gathering Facts on localhost]
task 2. [started TASK: ansible_cfg : Import optional extra_args file on localhost]
task 3. [started TASK: ansible_cfg : Generate kdevops ansible.cfg on localhost]
==> [inventory]
+ ansible-playbook playbooks/gen_hosts.yml --extra-vars=@./extra_vars.yaml
{...}
Before:
make V=1
[WARNING]: You are running the development version of Ansible. You
should only run Ansible from "devel" if you are modifying the Ansible
engine, or trying out features under development. This is a rapidly
changing source of code and can become unstable at any point.
PLAY 1: ANSIBLE CONFIGURATION ROLE
task 1. [started TASK: Gathering Facts on localhost]
task 2. [started TASK: ansible_cfg : Import optional extra_args file on localhost]
task 3. [started TASK: ansible_cfg : Generate kdevops ansible.cfg on localhost]
ansible-playbook \
playbooks/gen_hosts.yml \
--extra-vars=@./extra_vars.yaml
[WARNING]: You are running the development version of Ansible. You
should only run Ansible from "devel" if you are modifying the Ansible
engine, or trying out features under development. This is a rapidly
changing source of code and can become unstable at any point.
PLAY 1: GEN_HOSTS
task 1. [started TASK: Gathering Facts on localhost]
{...}
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index b6133ed5415e01cf9af7c2a0ca40976746acd2fd..7d522d5f918cf81da6fec9258c8c174e48fed11a 100644
--- a/Makefile
+++ b/Makefile
@@ -38,8 +38,12 @@ KDEVOPS_DEPCHECK = .kdevops.depcheck
PHONY += kconfig-help-menu
+define print_target
+ echo "==> [$1]"
+endef
+
ifeq ($(V),1)
-export Q=
+export Q=@$(call print_target,$@) && set -x &&
export NQ=true
else
export Q=@
--
2.49.0
next prev parent reply other threads:[~2025-05-02 12:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 12:13 [PATCH v2 00/10] Define Ansible inventory in the Ansible Configuration file Daniel Gomez
2025-05-02 12:13 ` [PATCH v2 01/10] playbooks: fix playbook name for all hosts plays Daniel Gomez
2025-05-02 12:13 ` [PATCH v2 02/10] playbooks: fix playbook name for localhost plays Daniel Gomez
2025-05-02 12:13 ` [PATCH v2 03/10] Makefile: use long form of limit argument for clarity Daniel Gomez
2025-05-02 12:13 ` Daniel Gomez [this message]
2025-05-02 12:13 ` [PATCH v2 05/10] .github/workflows/fstests.yml: enable make verbosity Daniel Gomez
2025-05-02 12:13 ` [PATCH v2 06/10] ansible_cfg: add inventory support Daniel Gomez
2025-05-02 12:13 ` [PATCH v2 07/10] gen_hosts: templates: add localhost to all hosts Daniel Gomez
2025-05-02 18:56 ` Chuck Lever
2025-05-03 17:45 ` Daniel Gomez
2025-05-02 12:13 ` [PATCH v2 08/10] Makefile: use inventory from ansible.cfg Daniel Gomez
2025-05-02 13:47 ` Daniel Gomez
2025-05-02 16:08 ` Chuck Lever
2025-05-02 19:11 ` Daniel Gomez
2025-05-02 12:13 ` [PATCH v2 09/10] ansible_cfg: add support to change ansible.cfg file location Daniel Gomez
2025-05-02 12:13 ` [PATCH v2 10/10] docs: ansible_cfg: add documentation Daniel Gomez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250502-ansible_cfg_inventory-v2-4-d3c19ff4aa6e@samsung.com \
--to=da.gomez@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=da.gomez@samsung.com \
--cc=kdevops@lists.linux.dev \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox