diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-04-06 14:48:59 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-04-06 14:48:59 +0000 |
commit | 81120132960507edcaa2106206f215f2ea9c3d64 (patch) | |
tree | 7443d4543abcbd22f0b4df12f65d77d9690796ed /include | |
parent | be05754678d8b698163399598617b01fe21c7d0c (diff) | |
download | upstream-81120132960507edcaa2106206f215f2ea9c3d64.tar.gz upstream-81120132960507edcaa2106206f215f2ea9c3d64.tar.bz2 upstream-81120132960507edcaa2106206f215f2ea9c3d64.zip |
build: log package dump failures to logs to avoid forcing user to write cryptic commands to figure out what's going on
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26499 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r-- | include/scan.mk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/scan.mk b/include/scan.mk index 288a10050b..b2b202d12b 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 |