Closed wridgers closed 6 years ago
Thanks for the contribution. I have a query.
Reading through the docs for the ESP Build System I see that:
component.mk
file.component.mk
file is an empty file. If the file is empty, the default component behaviour is set:
Your merge request delivers a component.mk
file that defines two override variables, COMPONENT_SRCDIRS and COMPONENT_ADD_INCLUDEDIRS.
After reading the documentation I conclude that the component.mk
only needs to have one entry which provides an override for COMPONENT_ADD_INCLUDEDIRS so that the .h
file can be found in the current directory, not in the default include
directory location.
I do not think the component.mk
needs to explicitly specify the COMPONENT_SRCDIRS as its default setting is the current directory, as indicated by the docs snippet below:
COMPONENT_SRCDIRS: Directory paths, must be relative to the component directory, which will be searched for source files (*.cpp, *.c, *.S). Defaults to ‘.’, ie the component directory itself. Override this to specify a different list of directories which contain source files.
Can you investigate whether COMPONENT_SRCDIRS is really needed by removing it from your component.mk
file and trying the component build again?
If COMPONENT_SRCDIRS is not required can you update the merge request to remove the redundant line?
Hi @claws, you're absolutely right - thanks for spotting this.
I can confirm that my project builds with the newer component.mk
file, and that it does not build if the file is empty.
Useful when writing code for ESP32.