Skip to content

Commit c64f38a

Browse files
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.
1 parent e1bed90 commit c64f38a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arduino-mk/Arduino.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,10 @@ LOCAL_OBJS = $(patsubst %,$(OBJDIR)/%,$(LOCAL_OBJ_FILES))
619619
# Dependency files
620620
DEPS = $(LOCAL_OBJS:.o=.d)
621621

622+
ifneq ($(words $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS)), 1)
623+
$(error Need exactly one .pde or .ino file)
624+
endif
625+
622626
# core sources
623627
ifeq ($(strip $(NO_CORE)),)
624628
ifdef ARDUINO_CORE_PATH

0 commit comments

Comments
 (0)