Check that there is exactly one .pde or .ino file · sudar/Arduino-Makefile@c64f38a (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Commit c64f38a
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.
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -619,6 +619,10 @@ LOCAL_OBJS = (patsubst(patsubst %,(patsubst(OBJDIR)/%,$(LOCAL_OBJ_FILES)) | ||
619 | 619 | # Dependency files |
620 | 620 | DEPS = $(LOCAL_OBJS:.o=.d) |
621 | 621 | |
622 | +ifneq ($(words (LOCALPDESRCS)(LOCAL_PDE_SRCS) (LOCALPDESRCS)(LOCAL_INO_SRCS)), 1) | |
623 | + $(error Need exactly one .pde or .ino file) | |
624 | +endif | |
625 | + | |
622 | 626 | # core sources |
623 | 627 | ifeq ($(strip $(NO_CORE)),) |
624 | 628 | ifdef ARDUINO_CORE_PATH |