public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: Ben Hutchings <ben@decadent.org.uk>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Nicolas Schier <nicolas@fjasle.eu>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/5] kbuild: deb-pkg: make debian/rules quiet by default
Date: Sat, 30 Dec 2023 22:51:57 +0900	[thread overview]
Message-ID: <20231230135200.1058873-2-masahiroy@kernel.org> (raw)
In-Reply-To: <20231230135200.1058873-1-masahiroy@kernel.org>

Add $(Q) to commands in debian/rules to make them quiet when the package
built is initiated by 'make deb-pkg'.

While the commands in debian/rules are not hidden when you directly work
with the debianized tree, you can set 'terse' to DEB_BUILD_OPTIONS to
silence them.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/package/debian/rules | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules
index a686c37d0d02..b3f80f62236c 100755
--- a/scripts/package/debian/rules
+++ b/scripts/package/debian/rules
@@ -11,6 +11,10 @@ ifneq (,$(filter-out parallel=1,$(filter parallel=%,$(DEB_BUILD_OPTIONS))))
     MAKEFLAGS += -j$(NUMJOBS)
 endif
 
+ifneq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
+    Q ?= @
+endif
+
 revision = $(lastword $(subst -, ,$(shell dpkg-parsechangelog -S Version)))
 CROSS_COMPILE ?= $(filter-out $(DEB_BUILD_GNU_TYPE)-, $(DEB_HOST_GNU_TYPE)-)
 make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) KBUILD_BUILD_VERSION=$(revision) $(addprefix CROSS_COMPILE=,$(CROSS_COMPILE))
@@ -19,20 +23,20 @@ make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) KBUILD_BUILD_VERSION=$(r
 binary: binary-arch binary-indep
 binary-indep: build-indep
 binary-arch: build-arch
-	$(MAKE) $(make-opts) \
+	$(Q)$(MAKE) $(make-opts) \
 	run-command KBUILD_RUN_COMMAND='+$$(srctree)/scripts/package/builddeb'
 
 .PHONY: build build-indep build-arch
 build: build-arch build-indep
 build-indep:
 build-arch:
-	$(MAKE) $(make-opts) olddefconfig
-	$(MAKE) $(make-opts) headers all
+	$(Q)$(MAKE) $(make-opts) olddefconfig
+	$(Q)$(MAKE) $(make-opts) headers all
 
 .PHONY: clean
 clean:
-	rm -rf debian/files debian/linux-* debian/deb-env.vars*
-	$(MAKE) ARCH=$(ARCH) clean
+	$(Q)rm -rf debian/files debian/linux-* debian/deb-env.vars*
+	$(Q)$(MAKE) ARCH=$(ARCH) clean
 
 # If DEB_HOST_ARCH is empty, it is likely that debian/rules was executed
 # directly. Run 'dpkg-architecture --print-set --print-format=make' to
@@ -41,6 +45,6 @@ ifndef DEB_HOST_ARCH
 -include debian/deb-env.vars
 
 debian/deb-env.vars:
-	dpkg-architecture -a$$(cat debian/arch) --print-set --print-format=make > $@.tmp
-	mv $@.tmp $@
+	$(Q)dpkg-architecture -a$$(cat debian/arch) --print-set --print-format=make > $@.tmp
+	$(Q)mv $@.tmp $@
 endif
-- 
2.40.1


  reply	other threads:[~2023-12-30 13:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-30 13:51 [PATCH 1/5] kbuild: deb-pkg: move 'make headers' to build-arch Masahiro Yamada
2023-12-30 13:51 ` Masahiro Yamada [this message]
2024-01-09 14:14   ` [PATCH 2/5] kbuild: deb-pkg: make debian/rules quiet by default Nicolas Schier
2024-01-09 14:46     ` Masahiro Yamada
2024-01-10 13:37       ` Nicolas Schier
2023-12-30 13:51 ` [PATCH 3/5] kbuild: deb-pkg: use debian/<package> for tmpdir Masahiro Yamada
2024-01-09 14:18   ` Nicolas Schier
2023-12-30 13:51 ` [PATCH 4/5] kbuild: deb-pkg: build binary-arch in parallel Masahiro Yamada
2024-01-10 13:47   ` Nicolas Schier
2023-12-30 13:52 ` [PATCH 5/5] kbuild: deb-pkg: call more misc debhelper commands Masahiro Yamada
2024-01-10 13:50   ` Nicolas Schier
2024-01-09  4:38 ` [PATCH 1/5] kbuild: deb-pkg: move 'make headers' to build-arch Masahiro Yamada
2024-01-09 13:24   ` Nicolas Schier
2024-01-09 14:29     ` Masahiro Yamada

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=20231230135200.1058873-2-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=ben@decadent.org.uk \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    /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