Arduino-Makefile
Arduino-Makefile copied to clipboard
Configuration goes wrong when LOCAL_SRCS contains generated files
ARDUINO_LIBS
variable is calculated during configuration and it uses LOCAL_SRCS
variable for this: https://github.com/sudar/Arduino-Makefile/blob/6f786a96b0acfb0c9b2d2f4e39911d2803088729/Arduino.mk#L974
But when LOCAL_SRCS
contains files that are to be generated by some target in the user's makefile, we get sed
piss off during configuration:
...
- [MANUAL] NO_CORE_MAIN_CPP set so core library will not include main.cpp
- [ASSUMED] MONITOR_BAUDRATE = 9600
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
sed: can't read Blink.c: No such file or directory
- [DEFAULT] OPTIMIZATION_LEVEL = s
...
Blink.c
here is those C-file that was added manually to LOCAL_C_SRCS
and is generated by user-defined target.