rules: allow arbitrary log destination
authorPaul Spooren <mail@aparcar.org>
Sat, 28 Sep 2019 21:12:21 +0000 (11:12 -1000)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 28 Sep 2019 22:08:20 +0000 (00:08 +0200)
Add option BUILD_LOG_DIR to menuconfig to change log destination.

The mix-up of *DIR* and *FOLDER* is confusing however.

Signed-off-by: Paul Spooren <mail@aparcar.org>
config/Config-devel.in
rules.mk

index fd7c3ead1e8e6dcb6176216a4509f12845085c0b..70ec0ce9a7728f8c99517e9114c07928153a5e33 100644 (file)
@@ -105,6 +105,13 @@ menuconfig DEVEL
                help
                  If enabled, log files will be written to the ./log directory.
 
+       config BUILD_LOG_DIR
+               string "Log folder" if DEVEL
+               default ""
+               help
+                 Store build logs in this directory.
+                 If not set, uses './logs'
+
        config SRC_TREE_OVERRIDE
                bool "Enable package source tree override" if DEVEL
                help
index 80cb3d63f449fa9e8d9ca72448d7bfe61e9c650d..b140fbca7091633fbe48d00c69d1d1257414b4c1 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -159,7 +159,7 @@ TARGET_ROOTFS_DIR?=$(if $(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(call qstrip
 TARGET_DIR:=$(TARGET_ROOTFS_DIR)/root-$(BOARD)
 STAGING_DIR_ROOT:=$(STAGING_DIR)/root-$(BOARD)
 STAGING_DIR_IMAGE:=$(STAGING_DIR)/image
-BUILD_LOG_DIR:=$(TOPDIR)/logs
+BUILD_LOG_DIR:=$(if $(call qstrip,$(CONFIG_BUILD_LOG_DIR)),$(call qstrip,$(CONFIG_BUILD_LOG_DIR)),$(TOPDIR)/logs)
 PKG_INFO_DIR := $(STAGING_DIR)/pkginfo
 
 BUILD_DIR_HOST:=$(if $(IS_PACKAGE_BUILD),$(BUILD_DIR_BASE)/hostpkg,$(BUILD_DIR_BASE)/host)