include/rootfs.mk: pass additional files dir to prepare_rootfs as an argument
authorMatthias Schiffer <mschiffer@universe-factory.net>
Tue, 6 Mar 2018 20:06:30 +0000 (21:06 +0100)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Wed, 7 Mar 2018 08:59:07 +0000 (09:59 +0100)
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
include/image.mk
include/rootfs.mk
package/Makefile

index 723e4f1897cb1280aa70dd0cdb5144c2080f4b9a..1cd8b758171a342ca57e7ce611c5552c8d1391e2 100644 (file)
@@ -305,7 +305,7 @@ target-dir-%: FORCE
                        $(call opkg_package_files,$(mkfs_packages_add)))
        -$(CP) -T $(mkfs_cur_target_dir).opkg/ $(mkfs_cur_target_dir)/etc/opkg/
        rm -rf $(mkfs_cur_target_dir).opkg $(mkfs_cur_target_dir).conf
-       $(call prepare_rootfs,$(mkfs_cur_target_dir))
+       $(call prepare_rootfs,$(mkfs_cur_target_dir),$(TOPDIR)/files)
 
 $(KDIR)/root.%: kernel_prepare
        $(call Image/mkfs/$(word 1,$(target_params)),$(target_params))
index a3a08c2851cd0a377e36284c69e1518e94b694cc..bf26dd2415aa090c5030f90d18530e1f5b3bd2d5 100644 (file)
@@ -63,9 +63,9 @@ ifdef CONFIG_CLEAN_IPKG
 endif
 
 define prepare_rootfs
-       @if [ -d $(TOPDIR)/files ]; then \
-               $(call file_copy,$(TOPDIR)/files/.,$(1)); \
-       fi
+       $(if $(2),@if [ -d '$(2)' ]; then \
+               $(call file_copy,$(2)/.,$(1)); \
+       fi)
        @mkdir -p $(1)/etc/rc.d
        @mkdir -p $(1)/var/lock
        @( \
index 0aefbb80236d321f6740a5ca259b4e508dd256ef..a83b350b0683d797c85efc8870df9d0d5bf5098b 100644 (file)
@@ -75,7 +75,7 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DE
 
        $(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG)
 
-       $(call prepare_rootfs,$(TARGET_DIR))
+       $(call prepare_rootfs,$(TARGET_DIR),$(TOPDIR)/files)
 
 $(curdir)/index: FORCE
        @echo Generating package index...