diff mbox series

[1/6] kbuild: deb-pkg: factor out common Make options in debian/rules

Message ID 20231226135243.1393780-1-masahiroy@kernel.org (mailing list archive)
State New
Headers show
Series [1/6] kbuild: deb-pkg: factor out common Make options in debian/rules | expand

Commit Message

Masahiro Yamada Dec. 26, 2023, 1:52 p.m. UTC
This avoid code duplication between binary-arch and built-arch.

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

 scripts/package/debian/rules | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Nicolas Schier Dec. 27, 2023, 7:55 a.m. UTC | #1
On Tue, Dec 26, 2023 at 10:52:38PM +0900, Masahiro Yamada wrote:
> This avoid code duplication between binary-arch and built-arch.

avoids ?

Reviewed-by: Nicolas Schier <n.schier@avm.de>

> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  scripts/package/debian/rules | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules
> index 3dafa9496c63..26bc6239e200 100755
> --- a/scripts/package/debian/rules
> +++ b/scripts/package/debian/rules
> @@ -10,20 +10,20 @@ ifneq (,$(filter-out parallel=1,$(filter parallel=%,$(DEB_BUILD_OPTIONS))))
>      MAKEFLAGS += -j$(NUMJOBS)
>  endif
>  
> +make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE)
> +
>  .PHONY: binary binary-indep binary-arch
>  binary: binary-arch binary-indep
>  binary-indep: build-indep
>  binary-arch: build-arch
> -	$(MAKE) -f $(srctree)/Makefile ARCH=$(ARCH) \
> -	KERNELRELEASE=$(KERNELRELEASE) \
> +	$(MAKE) -f $(srctree)/Makefile $(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) -f $(srctree)/Makefile ARCH=$(ARCH) \
> -	KERNELRELEASE=$(KERNELRELEASE) \
> +	$(MAKE) -f $(srctree)/Makefile $(make-opts) \
>  	$(shell $(srctree)/scripts/package/deb-build-option) \
>  	olddefconfig all
>  
> -- 
> 2.40.1
>
diff mbox series

Patch

diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules
index 3dafa9496c63..26bc6239e200 100755
--- a/scripts/package/debian/rules
+++ b/scripts/package/debian/rules
@@ -10,20 +10,20 @@  ifneq (,$(filter-out parallel=1,$(filter parallel=%,$(DEB_BUILD_OPTIONS))))
     MAKEFLAGS += -j$(NUMJOBS)
 endif
 
+make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE)
+
 .PHONY: binary binary-indep binary-arch
 binary: binary-arch binary-indep
 binary-indep: build-indep
 binary-arch: build-arch
-	$(MAKE) -f $(srctree)/Makefile ARCH=$(ARCH) \
-	KERNELRELEASE=$(KERNELRELEASE) \
+	$(MAKE) -f $(srctree)/Makefile $(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) -f $(srctree)/Makefile ARCH=$(ARCH) \
-	KERNELRELEASE=$(KERNELRELEASE) \
+	$(MAKE) -f $(srctree)/Makefile $(make-opts) \
 	$(shell $(srctree)/scripts/package/deb-build-option) \
 	olddefconfig all