improve error message output of metadata scan - fix newline break and do not hide...
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 27 May 2009 02:50:53 +0000 (02:50 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 27 May 2009 02:50:53 +0000 (02:50 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16101 3c298f89-4303-0410-b956-a3cf2f4a3e73

include/scan.mk

index 1cf45e5..288a100 100644 (file)
@@ -27,7 +27,7 @@ define PackageDir
        { \
                $$(call progress,Collecting $(SCAN_NAME) info: $(SCAN_DIR)/$(2)) \
                echo Source-Makefile: $(SCAN_DIR)/$(2)/Makefile; \
        { \
                $$(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 || echo "ERROR: please fix $(SCAN_DIR)/$(2)/Makefile" >&2; \
+               $(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 $$@; }; \
                echo; \
        } > $$@ || true
 endef
                echo; \
        } > $$@ || true
 endef
@@ -62,7 +62,7 @@ $(TARGET_STAMP)::
 
 $(TMP_DIR)/.$(SCAN_TARGET): $(TARGET_STAMP) $(SCAN_STAMP)
        $(call progress,Collecting $(SCAN_NAME) info: merging...)
 
 $(TMP_DIR)/.$(SCAN_TARGET): $(TARGET_STAMP) $(SCAN_STAMP)
        $(call progress,Collecting $(SCAN_NAME) info: merging...)
-       cat $(FILELIST) | awk '{gsub(/\//, "_", $$0);print "$(TMP_DIR)/info/.$(SCAN_TARGET)-" $$0}' | xargs cat > $@
+       -cat $(FILELIST) | awk '{gsub(/\//, "_", $$0);print "$(TMP_DIR)/info/.$(SCAN_TARGET)-" $$0}' | xargs cat > $@ 2>/dev/null
        $(call progress,Collecting $(SCAN_NAME) info: done)
        echo
 
        $(call progress,Collecting $(SCAN_NAME) info: done)
        echo
 
This page took 0.027363 seconds and 4 git commands to generate.