[klibc] [PATCH] klibc: fix gen_initramfs_init.sh when using -d

gen_initramfs_list.sh failed to generate a dependency list when
it was supplied the -d option.
Restructured gen_initramfs_list.sh to support dependency info with -d.
This also fixes a bug where we did not properly process
when more than one dir was specified.
Finally update dependency info for the -d case (list_default_initramfs)

In usr/Kbuild remove "" around CONFIG_RAMFS_SOURCE so the shell
recognize two directories as two arguments.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
diff --git a/usr/Kbuild b/usr/Kbuild
index e243e11..c4f5be2 100644
--- a/usr/Kbuild
+++ b/usr/Kbuild
@@ -37,8 +37,9 @@
 
 hostprogs-y := gen_init_cpio
 initramfs   := $(CONFIG_SHELL) $(srctree)/scripts/gen_initramfs_list.sh
-ramfs-input := $(if $(filter-out "",$(CONFIG_INITRAMFS_SOURCE)), \
-                    $(CONFIG_INITRAMFS_SOURCE),-d)
+ramfs-input := $(shell echo $(CONFIG_INITRAMFS_SOURCE))
+ramfs-input := $(if $(ramfs-input), $(ramfs-input), -d)
+
 ramfs-args  := \
         $(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \
         $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID)) \