aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Dunlap <dunlapadam@gmail.com>2012-08-17 11:50:05 -0700
committerSudar <sudar@sudarmuthu.com>2012-12-15 19:31:37 +0530
commit9ebae306d0604273112f19e1311b9923c6a4af18 (patch)
treeea3356368e9bc0765b64bd2b30064387ebcb2441
parent3afe25ba5af8fdc5496a812e89151845441fa4b4 (diff)
Show original line number for error messages
-rw-r--r--README.md1
-rw-r--r--arduino-mk/Arduino.mk5
2 files changed, 4 insertions, 2 deletions
diff --git a/README.md b/README.md
index 44a8d9f..593369c 100644
--- a/README.md
+++ b/README.md
@@ -118,6 +118,7 @@ The following are the list of changes that I have made or merged in this fork. H
### 0.10.2 15.xii.2012 Sudar
- Added sketch size verification. (https://github.com/fornellas)
+- Show original line number for error messages (https://github.com/WizenedEE)
## Know Issues
- Because of the way the makefile is structured, the configuration parameters gets printed twice.
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk
index 57680b5..605cbc1 100644
--- a/arduino-mk/Arduino.mk
+++ b/arduino-mk/Arduino.mk
@@ -143,6 +143,7 @@
#
# 0.10.2 15.xii.2012 Sudar
# - Added sketch size verification. (https://github.com/fornellas)
+# - Show original line number for error messages (https://github.com/WizenedEE)
#
########################################################################
#
@@ -812,12 +813,12 @@ $(OBJDIR)/%.d: %.s $(COMMON_DEPS)
# We should check for Arduino version, if the file is .pde because a .pde file might be used in Arduino 1.0
# the pde -> cpp -> o file
$(OBJDIR)/%.cpp: %.pde $(COMMON_DEPS)
- $(ECHO) '#if ARDUINO >= 100\n #include "Arduino.h"\n#else\n #include "WProgram.h"\n#endif' > $@
+ $(ECHO) '#if ARDUINO >= 100\n #include "Arduino.h"\n#else\n #include "WProgram.h"\n#endif\n#line 1' > $@
$(CAT) $< >> $@
# the ino -> cpp -> o file
$(OBJDIR)/%.cpp: %.ino $(COMMON_DEPS)
- $(ECHO) '#include <Arduino.h>' > $@
+ $(ECHO) '#include <Arduino.h>\n#line 1' > $@
$(CAT) $< >> $@
$(OBJDIR)/%.o: $(OBJDIR)/%.cpp $(COMMON_DEPS)