summaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorMichael Pratt <mcpratt@pm.me>2022-08-03 13:01:51 -0400
committerMichael Pratt <mcpratt@pm.me>2022-09-22 16:48:35 -0400
commit59db286814be3ebc1fb9d9ec580945920c2d68e7 (patch)
tree851f87759f4e52f062c32ede666a62d88b08f629 /rules.mk
parent211f4302e4f64e84e2895c6ed55fc1f43da56528 (diff)
downloadopenwrt-59db286814be3ebc1fb9d9ec580945920c2d68e7.tar.gz
openwrt-59db286814be3ebc1fb9d9ec580945920c2d68e7.tar.bz2
openwrt-59db286814be3ebc1fb9d9ec580945920c2d68e7.zip
rules.mk: add option to download files into a subdirectory
Some packages download a single raw file or set of raw files instead of an archive. The filenames of these download files have names and version numbers that do not directly correspond to the name and version of the package as it is defined in its Makefile. To better organize downloaded files, this adds the option of creating a subdirectory in the download directory for these files that can be named with package specific variables. DL_DIR is now a recursively expanded variable since the value now depends on whether DL_SUBDIR is defined. Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.mk b/rules.mk
index c893f61b0f..2072658e78 100644
--- a/rules.mk
+++ b/rules.mk
@@ -109,7 +109,7 @@ $(foreach t,$(DEFAULT_SUBDIR_TARGETS) $(1),
)
endef
-DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl)
+DL_DIR=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl)$(if $(DL_SUBDIR),/$(DL_SUBDIR))
OUTPUT_DIR:=$(if $(call qstrip,$(CONFIG_BINARY_FOLDER)),$(call qstrip,$(CONFIG_BINARY_FOLDER)),$(TOPDIR)/bin)
BIN_DIR:=$(OUTPUT_DIR)/targets/$(BOARD)/$(SUBTARGET)
INCLUDE_DIR:=$(TOPDIR)/include