summaryrefslogtreecommitdiff
path: root/include/scan.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-04-06 14:48:59 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-04-06 14:48:59 +0000
commit2238b949f130f5b2089986ced62cce2e8dff4d75 (patch)
tree0b21c8afb78d45ecddbaf3172b921fe0fb10c42c /include/scan.mk
parentcaf4747f0c0703bcae0f90c8b4885964c2a142b3 (diff)
downloadmtk-20170518-2238b949f130f5b2089986ced62cce2e8dff4d75.zip
mtk-20170518-2238b949f130f5b2089986ced62cce2e8dff4d75.tar.gz
mtk-20170518-2238b949f130f5b2089986ced62cce2e8dff4d75.tar.bz2
build: log package dump failures to logs to avoid forcing user to write cryptic commands to figure out what's going on
SVN-Revision: 26499
Diffstat (limited to 'include/scan.mk')
-rw-r--r--include/scan.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/scan.mk b/include/scan.mk
index 288a100..b2b202d 100644
--- a/include/scan.mk
+++ b/include/scan.mk
@@ -27,7 +27,12 @@ define PackageDir
{ \
$$(call progress,Collecting $(SCAN_NAME) info: $(SCAN_DIR)/$(2)) \
echo Source-Makefile: $(SCAN_DIR)/$(2)/Makefile; \
- $(NO_TRACE_MAKE) --no-print-dir -r DUMP=1 -C $(SCAN_DIR)/$(2) $(SCAN_MAKEOPTS) 2>/dev/null || { $$(call progress,ERROR: please fix $(SCAN_DIR)/$(2)/Makefile\n) rm -f $$@; }; \
+ $(NO_TRACE_MAKE) --no-print-dir -r DUMP=1 -C $(SCAN_DIR)/$(2) $(SCAN_MAKEOPTS) 2>/dev/null || { \
+ mkdir -p "$(TOPDIR)/logs/$(SCAN_DIR)/$(2)"; \
+ $(NO_TRACE_MAKE) --no-print-dir -r DUMP=1 -C $(SCAN_DIR)/$(2) $(SCAN_MAKEOPTS) > $(TOPDIR)/logs/$(SCAN_DIR)/$(2)/dump.txt 2>&1; \
+ $$(call progress,ERROR: please fix $(SCAN_DIR)/$(2)/Makefile - see logs/$(SCAN_DIR)/$(2)/dump.txt for details\n) \
+ rm -f $$@; \
+ }; \
echo; \
} > $$@ || true
endef