aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRonan Barzic <rbarzic@gmail.com>2014-06-05 22:56:17 +0200
committerSudar <sudar@sudarmuthu.com>2014-06-10 16:05:08 +0530
commit05a0c7d37722183390f6c2f8699a569589049006 (patch)
tree8ee51d3325f2258118d03cb010638694e7c7889f /README.md
parenta4dc43b58f5f3766c4594472a28b7180fd65e160 (diff)
Make Arduino.mk compatible with Flymake
If Flymake is configured to parse .ino files the same way as for c/c++ files, it creates a temporary file (_flymake.ino) in the same directory as the original file. It fails with the current Arduino.mk because of the check for multiple .ino files. This fix removes the check only when flymake is calling the Makefile (Flymake will call make with the variable CHK_SOURCES set to the temporary file name) To make Flymake working with .ino file : Add : check-syntax: $(CXX_NAME) -c -include Arduino.h -x c++ $(CXXFLAGS) $(CPPFLAGS) -fsyntax-only $(CHK_SOURCES) in the project Makefile after the inclusion of the Arduino.mk file Edit the flymake configuration : M-x customize-option RET flymake-allowed-file-name-masks RET (using auto completion !) Add the line : ("\\.ino\\'" flymake-simple-make-init) Then click on "Apply and Save" button Fix #211
Diffstat (limited to 'README.md')
-rw-r--r--README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7f4b8e8..d3f3171 100644
--- a/README.md
+++ b/README.md
@@ -150,6 +150,34 @@ To upload compiled files, `avrdude` is used. This Makefile tries to find `avrdud
It is possible to use [`colorgcc`](https://github.com/colorgcc/colorgcc) with this makefile. Check out [this comment](http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile#comment-1408) to find usage instructions.
+## Emacs/Flymake support
+
+On-the-fly syntax checking in Emacs using the [Flymake](http://www.emacswiki.org/emacs/FlyMake) minor mode is now possible.
+
+First, the flymake mode must be configured to recognize ino files :
+
+Edit the flymake configuration :
+
+```
+ M-x customize-option RET
+ flymake-allowed-file-name-masks RET
+```
+
+Add the line :
+
+```
+ ("\\.ino\\'" flymake-simple-make-init)
+```
+
+Then click on "Apply and Save" button
+
+Then, the following line must be added to the project Makefile :
+
+```
+ check-syntax:
+ $(CXX_NAME) -c -include Arduino.h -x c++ $(CXXFLAGS) $(CPPFLAGS) -fsyntax-only $(CHK_SOURCES)
+```
+
## Versioning
The current version of the makefile is `1.3.3`. You can find the full history in the [HISTORY.md](HISTORY.md) file