usr: shorten cmd_initfs in Makefile
PATCH 1/1 usr: shorten cmd_initfs in Makefile
Avoid repetition of long variables.
No functional change intended.
Signed-off-by Masahiro Yamada <[email protected]>
---
usr/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
usr/Makefile +3 -3
@@ -62,9 +62,9 @@ $(deps_initramfs): ; quiet_cmd_initfs = GEN $@ cmd_initfs = \ $(CONFIG_SHELL) $< -o $@ -l $(obj)/.initramfs_data.cpio.d \ - $(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \ - $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID)) \ - $(if $(KBUILD_BUILD_TIMESTAMP), -d "$(KBUILD_BUILD_TIMESTAMP)") \ + $(addprefix -u , $(CONFIG_INITRAMFS_ROOT_UID)) \ + $(addprefix -g , $(CONFIG_INITRAMFS_ROOT_GID)) \ + $(patsubst %,-d "%", $(KBUILD_BUILD_TIMESTAMP)) \ $(ramfs-input) # We rebuild initramfs_data.cpio if:
Signature · 1 line
2.40.1
Quoted 5 lines · Masahiro Yamada
Avoid repetition of long variables.
No functional change intended.
Signed-off-by Masahiro Yamada <[email protected]>
Reviewed-by Nathan Chancellor <[email protected]>
Quoted 25 lines
---
usr/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)usr/Makefile +3
-3@@ -62,9 +62,9 @@ $(deps_initramfs): ; quiet_cmd_initfs = GEN $@ cmd_initfs = \ $(CONFIG_SHELL) $< -o $@ -l $(obj)/.initramfs_data.cpio.d \ - $(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \ - $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID)) \ - $(if $(KBUILD_BUILD_TIMESTAMP), -d "$(KBUILD_BUILD_TIMESTAMP)") \ + $(addprefix -u , $(CONFIG_INITRAMFS_ROOT_UID)) \ + $(addprefix -g , $(CONFIG_INITRAMFS_ROOT_GID)) \ + $(patsubst %,-d "%", $(KBUILD_BUILD_TIMESTAMP)) \ $(ramfs-input) # We rebuild initramfs_data.cpio if:Signature · 1 line
2.40.1
Quoted 16 lines · Masahiro Yamada
Avoid repetition of long variables.
No functional change intended.
Signed-off-by Masahiro Yamada <[email protected]>---
usr/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)usr/Makefile +0
-0
usr/Makefile $(deps_initramfs): ; · line 67
Quoted 9 lines
usr/Makefile +3
-3@@ -62,9 +62,9 @@ $(deps_initramfs): ; quiet_cmd_initfs = GEN $@ cmd_initfs = \ $(CONFIG_SHELL) $< -o $@ -l $(obj)/.initramfs_data.cpio.d \ - $(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \ - $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID)) \ - $(if $(KBUILD_BUILD_TIMESTAMP), -d "$(KBUILD_BUILD_TIMESTAMP)") \ + $(addprefix -u , $(CONFIG_INITRAMFS_ROOT_UID)) \ + $(addprefix -g , $(CONFIG_INITRAMFS_ROOT_GID)) \ + $(patsubst %,-d "%", $(KBUILD_BUILD_TIMESTAMP)) \
I dropped the last line because it will not work
when $(KBUILD_BUILD_TIMESTAMP) contains a space.
Quoted 6 lines
usr/Makefile +0
-1$(ramfs-input) # We rebuild initramfs_data.cpio if: --2.40.1
Signature · 2 lines
Best Regards Masahiro Yamada