mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 14:03:55 +01:00
Merge pull request #14350 from fjmolinas/pr_sketch_module
sys/arduino: include arduino_sketches in Makefile.dep
This commit is contained in:
commit
0c1718ee4b
16
dist/tools/buildsystem_sanity_check/check.sh
vendored
16
dist/tools/buildsystem_sanity_check/check.sh
vendored
@ -288,6 +288,21 @@ check_no_pseudomodules_in_makefile_dep() {
|
||||
| error_with_message "Don't define PSEUDOMODULES in Makefile.dep"
|
||||
}
|
||||
|
||||
check_no_usemodules_in_makefile_include() {
|
||||
local patterns=()
|
||||
local pathspec=()
|
||||
|
||||
patterns+=(-e 'USEMODULE[\t ]*[+:]*=')
|
||||
|
||||
pathspec+=('**/Makefile.include')
|
||||
pathspec+=(':!Makefile.include')
|
||||
pathspec+=(':!tests/**/Makefile.include')
|
||||
pathspec+=(':!examples/**/Makefile.include')
|
||||
|
||||
git -C "${RIOTBASE}" grep "${patterns[@]}" -- "${pathspec[@]}" \
|
||||
| error_with_message "Don't include USEMODULE in Makefile.include"
|
||||
}
|
||||
|
||||
error_on_input() {
|
||||
! grep ''
|
||||
}
|
||||
@ -305,6 +320,7 @@ all_checks() {
|
||||
checks_develhelp_not_defined_via_cflags
|
||||
check_files_in_boards_not_reference_board_var
|
||||
check_no_pseudomodules_in_makefile_dep
|
||||
check_no_usemodules_in_makefile_include
|
||||
}
|
||||
|
||||
main() {
|
||||
|
||||
@ -2,6 +2,8 @@ ifneq (,$(filter arduino,$(USEMODULE)))
|
||||
FEATURES_OPTIONAL += periph_i2c
|
||||
FEATURES_OPTIONAL += periph_spi
|
||||
FEATURES_REQUIRED += periph_uart
|
||||
SKETCH_MODULE ?= arduino_sketches
|
||||
USEMODULE += $(SKETCH_MODULE)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter eepreg,$(USEMODULE)))
|
||||
|
||||
@ -4,14 +4,16 @@ SKETCHES = $(wildcard $(APPDIR)/*.sketch)
|
||||
|
||||
ifneq (,$(SKETCHES))
|
||||
# Define application sketches module, it will be generated into $(BINDIR)
|
||||
SKETCH_MODULE ?= arduino_sketches
|
||||
SKETCH_MODULE_DIR ?= $(BINDIR)/$(SKETCH_MODULE)
|
||||
include $(RIOTBASE)/sys/arduino/sketches.inc.mk
|
||||
|
||||
# Depends on module
|
||||
USEMODULE += $(SKETCH_MODULE)
|
||||
DIRS += $(SKETCH_MODULE_DIR)
|
||||
BUILDDEPS += $(SKETCH_GENERATED_FILES)
|
||||
else
|
||||
# arduino_sketches is now always included if arduino is, but if there
|
||||
# are no sketches then no %.a will be present, so declare PSEUDOMODULE
|
||||
PSEUDOMODULES += $(SKETCH_MODULE)
|
||||
endif
|
||||
|
||||
# include the Arduino headers
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user