From ab6f9108b09b30428e6d85a51731afbbe6a41ab7 Mon Sep 17 00:00:00 2001 From: "mihlit@mihlit.cz" Date: Sat, 3 Mar 2012 09:07:20 +0000 Subject: [PATCH] make gcc error reporting better readable Originally, gcc would report that error is present on line 5432 in allsrc.cpp. This would not help much. We can use gcc preprocessor marks to make it report line number of original file together with its file name. --- src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index f45300040..ed99bc368 100644 --- a/src/Makefile +++ b/src/Makefile @@ -742,7 +742,8 @@ extcoff: $(TARGET).elf # Concatenate all sources files in one big file to optimize size allsrc: $(CPPSRC) - cat $(CPPSRC) > allsrc.cpp + @echo -n > allsrc.cpp + for f in $(CPPSRC); do echo "# 1 \"$$f\"" >> allsrc.cpp; cat "$$f" >> allsrc.cpp; done remallsrc: $(REMOVE) allsrc.cpp