summaryrefslogtreecommitdiffstats
path: root/usr/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-01-04 16:02:33 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2020-01-15 16:24:38 +0100
commit3e176683634cfc53dfc04366510d2989804554df (patch)
tree627a12026e425eadf424c12f53b1a8ca2fc013c9 /usr/Makefile
parentinitramfs: make initramfs compression choice non-optional (diff)
downloadlinux-3e176683634cfc53dfc04366510d2989804554df.tar.xz
linux-3e176683634cfc53dfc04366510d2989804554df.zip
initramfs: specify $(src)/gen_initramfs.sh as a prerequisite in Makefile
Specify the dependency directly in the Makefile. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Greg Thelen <gthelen@google.com>
Diffstat (limited to 'usr/Makefile')
-rw-r--r--usr/Makefile7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr/Makefile b/usr/Makefile
index e44a66b8c051..f58101fb4574 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -24,7 +24,6 @@ $(obj)/initramfs_data.o: $(obj)/$(datafile_y) FORCE
# Generate the initramfs cpio archive
hostprogs-y := gen_init_cpio
-initramfs := $(CONFIG_SHELL) $(srctree)/$(src)/gen_initramfs.sh
ramfs-input := $(if $(filter-out "",$(CONFIG_INITRAMFS_SOURCE)), \
$(shell echo $(CONFIG_INITRAMFS_SOURCE)),-d)
ramfs-args := \
@@ -40,7 +39,7 @@ ifneq ($(wildcard $(obj)/$(datafile_d_y)),)
endif
quiet_cmd_initfs = GEN $@
- cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input)
+ cmd_initfs = $(CONFIG_SHELL) $< -o $@ $(ramfs-args) $(ramfs-input)
targets := $(datafile_y)
@@ -52,8 +51,8 @@ $(deps_initramfs): ;
# 2) There are changes in which files are included (added or deleted)
# 3) If gen_init_cpio are newer than initramfs_data.cpio
# 4) Arguments to gen_initramfs.sh changes
-$(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs) FORCE
- $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/$(datafile_d_y)
+$(obj)/$(datafile_y): $(src)/gen_initramfs.sh $(obj)/gen_init_cpio $(deps_initramfs) FORCE
+ $(Q)$< -l $(ramfs-input) > $(obj)/$(datafile_d_y)
$(call if_changed,initfs)
subdir-$(CONFIG_UAPI_HEADER_TEST) += include