build: cleanup tmp/ dir of target rootfs
[openwrt/openwrt.git] / package / Makefile
index 1ef501736b5db5e243c5371cb9dcb1a633b26724..4fdf4150469434428c7970e3ebce53f050f992a6 100644 (file)
@@ -56,12 +56,14 @@ $(curdir)/merge:
 $(curdir)/merge-index: $(curdir)/merge
        (cd $(PACKAGE_DIR_ALL) && $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages; )
 
-$(curdir)/compile: $(curdir)/system/opkg/host/compile
+ifndef SDK
+  $(curdir)/compile: $(curdir)/system/opkg/host/compile
+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 \