aboutsummaryrefslogtreecommitdiffstats
path: root/target/imagebuilder/files/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-06-01 06:15:39 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-06-01 06:15:39 +0000
commit6baf2052a2a01f363b1432de8500d723ca180c1e (patch)
treeeed7860c095a982ec6394be5397f935212e7be51 /target/imagebuilder/files/Makefile
parentb78ea40b462d58c7f39acce54a18d2113f02a306 (diff)
downloadmaster-187ad058-6baf2052a2a01f363b1432de8500d723ca180c1e.tar.gz
master-187ad058-6baf2052a2a01f363b1432de8500d723ca180c1e.tar.bz2
master-187ad058-6baf2052a2a01f363b1432de8500d723ca180c1e.zip
imagebuilder: create cache directory if needed (#18629)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45866 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/imagebuilder/files/Makefile')
-rw-r--r--target/imagebuilder/files/Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 0f0fe42b59..e28660f2f6 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -1,6 +1,6 @@
# Makefile for OpenWrt
#
-# Copyright (C) 2007-2010 OpenWrt.org
+# Copyright (C) 2007-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -55,16 +55,16 @@ help: FORCE
PACKAGE_DIR:=$(TOPDIR)/packages
OPKG:= \
IPKG_NO_SCRIPT=1 \
- IPKG_TMP="$(TOPDIR)/tmp/ipkgtmp" \
+ IPKG_TMP="$(TMP_DIR)/ipkgtmp" \
IPKG_INSTROOT="$(TARGET_DIR)" \
- IPKG_CONF_DIR="$(TOPDIR)/tmp" \
+ IPKG_CONF_DIR="$(TMP_DIR)" \
IPKG_OFFLINE_ROOT="$(TARGET_DIR)" \
$(STAGING_DIR_HOST)/bin/opkg \
-f $(TOPDIR)/repositories.conf \
--force-depends \
--force-overwrite \
--force-postinstall \
- --cache $(TOPDIR)/dl \
+ --cache $(DL_DIR) \
--offline-root $(TARGET_DIR) \
--add-dest root:/ \
--add-arch all:100 \
@@ -101,7 +101,7 @@ _call_image:
echo 'Packages: $(BUILD_PACKAGES)'
echo
rm -rf $(TARGET_DIR)
- mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR)
+ mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(DL_DIR)
if [ ! -f "$(PACKAGE_DIR)/Packages" ] || [ ! -f "$(PACKAGE_DIR)/Packages.gz" ] || [ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/Packages.gz`" ]; then \
echo "Package list missing or not up-to-date, generating it.";\
$(MAKE) package_index; \
@@ -119,7 +119,7 @@ endif
package_index: FORCE
@echo
@echo Building package index...
- @mkdir -p $(TOPDIR)/tmp $(TOPDIR)/dl $(TARGET_DIR)/tmp
+ @mkdir -p $(TMP_DIR) $(TARGET_DIR)/tmp
(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages && \
gzip -9c Packages > Packages.gz \
) >/dev/null 2>/dev/null
@@ -161,7 +161,7 @@ build_image: FORCE
$(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)")
clean:
- rm -rf $(TOPDIR)/tmp $(TOPDIR)/dl $(TARGET_DIR) $(BIN_DIR)
+ rm -rf $(TMP_DIR) $(DL_DIR) $(TARGET_DIR) $(BIN_DIR)
info: