diff --git a/Arduino.mk b/Arduino.mk index 7f2e8db..b41746e 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -650,19 +650,23 @@ LOCAL_OBJS = $(patsubst %,$(OBJDIR)/%,$(LOCAL_OBJ_FILES)) ifeq ($(words $(LOCAL_SRCS)), 0) $(error At least one source file (*.ino, *.pde, *.cpp, *c, *cc, *.S) is needed) endif +# CHK_SOURCES is used by flymake +# 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)),) -ifeq ($(strip $(NO_CORE)),) - - # Ideally, this should just check if there are more than one file - ifneq ($(words $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS)), 1) - ifeq ($(words $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS)), 0) - $(call show_config_info,No .pde or .ino files found. If you are compiling .c or .cpp files then you need to explicitly include Arduino header files) - else - #TODO: Support more than one file. https://github.com/sudar/Arduino-Makefile/issues/49 - $(error Need exactly one .pde or .ino file. This makefile doesn't support multiple .ino/.pde files yet) + # Ideally, this should just check if there are more than one file + ifneq ($(words $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS)), 1) + ifeq ($(words $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS)), 0) + $(call show_config_info,No .pde or .ino files found. If you are compiling .c or .cpp files then you need to explicitly include Arduino header files) + else + #TODO: Support more than one file. https://github.com/sudar/Arduino-Makefile/issues/49 + $(error Need exactly one .pde or .ino file. This makefile doesn't support multiple .ino/.pde files yet) + endif endif - endif + endif endif # core sources diff --git a/HISTORY.md b/HISTORY.md index 8f2f613..9c96e95 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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) - 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) - +- New: Automake.mk is now compatible with Flymake mode ### 1.3.3 (2014-04-12) - Fix: Make a new manpage for ard-reset-arduino. Fixes issue #188 (https://github.com/sej7278)