ar71xx: fix legacy image build error
[openwrt/openwrt.git] / target / linux / generic / patches-4.1 / 970-remove-unsane-filenames-from-deps_initramfs-list.patch
1 --- a/usr/Makefile
2 +++ b/usr/Makefile
3 @@ -53,6 +53,8 @@ ifneq ($(wildcard $(obj)/.initramfs_data
4 include $(obj)/.initramfs_data.cpio.d
5 endif
6
7 +deps_initramfs_sane := $(foreach v,$(deps_initramfs),$(if $(findstring :,$(v)),,$(v)))
8 +
9 quiet_cmd_initfs = GEN $@
10 cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input)
11
12 @@ -61,14 +63,14 @@ targets := initramfs_data.cpio.gz initra
13 initramfs_data.cpio.lzo initramfs_data.cpio.lz4 \
14 initramfs_data.cpio
15 # do not try to update files included in initramfs
16 -$(deps_initramfs): ;
17 +$(deps_initramfs_sane): ;
18
19 -$(deps_initramfs): klibcdirs
20 +$(deps_initramfs_sane): klibcdirs
21 # We rebuild initramfs_data.cpio if:
22 # 1) Any included file is newer then initramfs_data.cpio
23 # 2) There are changes in which files are included (added or deleted)
24 # 3) If gen_init_cpio are newer than initramfs_data.cpio
25 # 4) arguments to gen_initramfs.sh changes
26 -$(obj)/initramfs_data.cpio$(suffix_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs
27 +$(obj)/initramfs_data.cpio$(suffix_y): $(obj)/gen_init_cpio $(deps_initramfs_sane) klibcdirs
28 $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/.initramfs_data.cpio.d
29 $(call if_changed,initfs)