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
This commit is contained in:
parent
a4dc43b58f
commit
a4ecdf2f9f
2 changed files with 15 additions and 11 deletions
|
@ -650,8 +650,11 @@ LOCAL_OBJS = $(patsubst %,$(OBJDIR)/%,$(LOCAL_OBJ_FILES))
|
||||||
ifeq ($(words $(LOCAL_SRCS)), 0)
|
ifeq ($(words $(LOCAL_SRCS)), 0)
|
||||||
$(error At least one source file (*.ino, *.pde, *.cpp, *c, *cc, *.S) is needed)
|
$(error At least one source file (*.ino, *.pde, *.cpp, *c, *cc, *.S) is needed)
|
||||||
endif
|
endif
|
||||||
|
# CHK_SOURCES is used by flymake
|
||||||
ifeq ($(strip $(NO_CORE)),)
|
# flymake creates a tmp file in the same directory as the file under edition
|
||||||
|
# we must skip the verification in this particular case
|
||||||
|
ifeq ($(strip $(CHK_SOURCES)),)
|
||||||
|
ifeq ($(strip $(NO_CORE)),)
|
||||||
|
|
||||||
# Ideally, this should just check if there are more than one file
|
# Ideally, this should just check if there are more than one file
|
||||||
ifneq ($(words $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS)), 1)
|
ifneq ($(words $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS)), 1)
|
||||||
|
@ -663,6 +666,7 @@ ifeq ($(strip $(NO_CORE)),)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# core sources
|
# core sources
|
||||||
|
|
|
@ -12,7 +12,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
|
||||||
- Add: List board name as well as tag in `make show_boards`. (Issue #204) (https://github.com/sej7278)
|
- Add: List board name as well as tag in `make show_boards`. (Issue #204) (https://github.com/sej7278)
|
||||||
- Fix: Add missing newlines at end of some echo's (Issue #207) (https://github.com/sej7278)
|
- Fix: Add missing newlines at end of some echo's (Issue #207) (https://github.com/sej7278)
|
||||||
- Fix: Add missing/reorder/reword targets in `make help` (https://github.com/sej7278)
|
- Fix: Add missing/reorder/reword targets in `make help` (https://github.com/sej7278)
|
||||||
|
- New: Automake.mk is now compatible with Flymake mode
|
||||||
### 1.3.3 (2014-04-12)
|
### 1.3.3 (2014-04-12)
|
||||||
- Fix: Make a new manpage for ard-reset-arduino. Fixes issue #188 (https://github.com/sej7278)
|
- Fix: Make a new manpage for ard-reset-arduino. Fixes issue #188 (https://github.com/sej7278)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue