add 3.7-rc6 support (patch 820 still has to be fixed)
[openwrt/staging/chunkeey.git] / target / linux / generic / patches-3.7 / 970-remove-unsane-filenames-from-deps_initramfs-list.patch
1 --- a/usr/Makefile
2 +++ b/usr/Makefile
3 @@ -50,20 +50,22 @@ 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 targets := initramfs_data.cpio.gz initramfs_data.cpio.bz2 initramfs_data.cpio.lzma initramfs_data.cpio.xz initramfs_data.cpio.lzo initramfs_data.cpio
13 # do not try to update files included in initramfs
14 -$(deps_initramfs): ;
15 +$(deps_initramfs_sane): ;
16
17 -$(deps_initramfs): klibcdirs
18 +$(deps_initramfs_sane): klibcdirs
19 # We rebuild initramfs_data.cpio if:
20 # 1) Any included file is newer then initramfs_data.cpio
21 # 2) There are changes in which files are included (added or deleted)
22 # 3) If gen_init_cpio are newer than initramfs_data.cpio
23 # 4) arguments to gen_initramfs.sh changes
24 -$(obj)/initramfs_data.cpio$(suffix_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs
25 +$(obj)/initramfs_data.cpio$(suffix_y): $(obj)/gen_init_cpio $(deps_initramfs_sane) klibcdirs
26 $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/.initramfs_data.cpio.d
27 $(call if_changed,initfs)
28