aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)