build: cleanup tmp/ dir of target rootfs
authorYousong Zhou <yszhou4tech@gmail.com>
Sun, 5 Mar 2017 08:17:17 +0000 (16:17 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Tue, 2 May 2017 14:10:50 +0000 (22:10 +0800)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
include/rootfs.mk
package/Makefile

index c014b1d14ab0963687417809431abc0bf314830c..74785cbbd39cfbd50d087ec157323f64fb52995b 100644 (file)
@@ -80,6 +80,7 @@ define prepare_rootfs
        @-find $(1) -name .svn  | $(XARGS) rm -rf
        @-find $(1) -name .git  | $(XARGS) rm -rf
        @-find $(1) -name '.#*' | $(XARGS) rm -f
+       rm -rf $(1)/tmp/*
        rm -f $(1)/usr/lib/opkg/lists/*
        rm -f $(1)/usr/lib/opkg/info/*.postinst*
        rm -f $(1)/usr/lib/opkg/info/*.prerm*
index ac8faecef29bcc7f150b2686d8d3c592e507c9eb..4fdf4150469434428c7970e3ebce53f050f992a6 100644 (file)
@@ -63,7 +63,7 @@ endif
 $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index)
        - find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
        rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG)
-       [ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp
+       mkdir -p $(TARGET_DIR)/tmp
        $(call opkg,$(TARGET_DIR)) install \
                $(call opkg_package_files,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null))
        @for file in $(PACKAGE_INSTALL_FILES); do \