summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kconfig18
-rw-r--r--mk/initialpath.mk7
2 files changed, 22 insertions, 3 deletions
diff --git a/Kconfig b/Kconfig
index f926924..c9baf27 100644
--- a/Kconfig
+++ b/Kconfig
@@ -88,5 +88,23 @@ menu "Embtoolkit build options"
config EMBTK_NUMBER_BUILD_JOBS
int "Number of parallel build jobs"
default 1
+
+config EMBTK_DOWNLOAD_DIR
+ string "Download directory"
+ default "$(EMBTK_ROOT)/dl"
+ help
+ Directory where downloaded packages are stored.
+
+ You must specify here an absolute directory location, if you choose to
+ use an alternate location.
+
+ Note:
+ If you want to preserve downloaded packages from being removed when
+ you do make distclean, you must specify an alternate location.
+ If you leave this option in the default location under Embtoolkit,
+ $(EMBTK_ROOT)/dl, then make distclean will remove downloaded packages.
+ But keep in mind that only a make distclean command will remove
+ downloaded packages in the default location under EmbToolkit,
+ not make clean.
endmenu
diff --git a/mk/initialpath.mk b/mk/initialpath.mk
index bab8c4a..a334044 100644
--- a/mk/initialpath.mk
+++ b/mk/initialpath.mk
@@ -29,8 +29,9 @@ TOOLS_BUILD:=$(EMBTK_ROOT)/build/tools_build-$(GNU_TARGET)-$(EMBTK_MCU_FLAG)
PACKAGES_BUILD:=$(EMBTK_ROOT)/build/packages_build-$(GNU_TARGET)-$(EMBTK_MCU_FLAG)
ROOTFS:=$(EMBTK_ROOT)/rootfs-$(GNU_TARGET)-$(EMBTK_MCU_FLAG)
HOSTTOOLS :=$(EMBTK_ROOT)/host-tools-$(EMBTK_MCU_FLAG)
+DOWNLOAD_DIR := $(subst ",,$(strip $(CONFIG_EMBTK_DOWNLOAD_DIR)))
-export SYSROOT TOOLS TOOLS_BUILD PACKAGES_BUILD ROOTFS HOSTTOOLS
+export SYSROOT TOOLS TOOLS_BUILD PACKAGES_BUILD ROOTFS HOSTTOOLS DOWNLOAD_DIR
mkinitialpath:
@mkdir -p $(SYSROOT)
@@ -65,6 +66,6 @@ ifeq ($(CONFIG_EMBTK_HAVE_ROOTFS),y)
endif
rmallpath:
- @rm -Rf build rootfs-* sysroot-* tools-* $(DOWNLOAD_DIR)/eglibc* \
- initramfs-*
+ @rm -Rf build rootfs-* sysroot-* tools-* initramfs-*
+ @rm -Rf $(EMBTK_ROOT)/dl/*