Check that there is exactly one .pde or .ino file
When there are none (and no .cpp files either), the build would stall trying to cat all the .d files together (which would result in cat getting no arguments and thus waiting for input on stdin). When there are multiple .ino and/or .pde files, the build could technically work out, the Arduino IDE concatenates all .ino / .pde files together and compiles them as a single compile unit, so unless we implement that as well, it's better to just error out.
This commit is contained in:
parent
e1bed90404
commit
c64f38ae6d
1 changed files with 4 additions and 0 deletions
|
@ -619,6 +619,10 @@ LOCAL_OBJS = $(patsubst %,$(OBJDIR)/%,$(LOCAL_OBJ_FILES))
|
|||
# Dependency files
|
||||
DEPS = $(LOCAL_OBJS:.o=.d)
|
||||
|
||||
ifneq ($(words $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS)), 1)
|
||||
$(error Need exactly one .pde or .ino file)
|
||||
endif
|
||||
|
||||
# core sources
|
||||
ifeq ($(strip $(NO_CORE)),)
|
||||
ifdef ARDUINO_CORE_PATH
|
||||
|
|
Loading…
Reference in a new issue