mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 22:43:50 +01:00
makefiles/app_dirs: find application folders recursively
Co-authored-by: Martine Lenders <martine.lenders@tu-dresden.de>
This commit is contained in:
parent
c96f901154
commit
d9280f14a7
21
makefiles/app_dirs.blacklist
Normal file
21
makefiles/app_dirs.blacklist
Normal file
@ -0,0 +1,21 @@
|
||||
examples/advanced_examples/bindist/
|
||||
examples/advanced_examples/pio_blink/
|
||||
examples/essentials/subfolders/
|
||||
examples/language_bindings/community_supported/wasm/
|
||||
tests/build_system/blob/
|
||||
tests/build_system/cpp_exclude/external_modules/
|
||||
tests/build_system/cpp_ext/external_modules/
|
||||
tests/build_system/external_board_dirs/esp-ci-boards/
|
||||
tests/build_system/external_board_dirs/netdev-ci-boards/
|
||||
tests/build_system/external_board_native/external_boards/
|
||||
tests/build_system/external_module_dirs/external_modules/
|
||||
tests/build_system/external_pkg_dirs/external_pkgs/
|
||||
tests/build_system/kconfig/external_modules/
|
||||
tests/build_system/kconfig/external_pkgs/
|
||||
tests/periph/qdec/boards_modded/
|
||||
tests/pkg/openwsn_sock_udp/external_modules/
|
||||
tests/pkg/tflite-micro/external_modules/
|
||||
tests/pkg/utensor/external_modules/
|
||||
tests/pkg/wolfcrypt-ed25519-verify/
|
||||
tests/sys/suit_manifest/native_flashpage/
|
||||
tests/unittests/
|
||||
@ -3,32 +3,18 @@
|
||||
# fallback so empty RIOTBASE won't lead to "/examples/"
|
||||
RIOTBASE ?= .
|
||||
|
||||
# 1. use wildcard to find Makefiles
|
||||
# 2. use patsubst to drop trailing "/"
|
||||
# 3. use patsubst to drop possible leading "./"
|
||||
# 4. sort
|
||||
APPS_BASE_DIRS = bootloaders examples fuzzing tests
|
||||
|
||||
# Prepare the list of application directories
|
||||
APPLICATION_DIRS := \
|
||||
fuzzing \
|
||||
bootloaders \
|
||||
examples \
|
||||
tests \
|
||||
tests/bench \
|
||||
tests/build_system \
|
||||
tests/core \
|
||||
tests/cpu \
|
||||
tests/drivers \
|
||||
tests/net \
|
||||
tests/periph \
|
||||
tests/pkg \
|
||||
tests/sys \
|
||||
#
|
||||
|
||||
APPLICATION_DIRS := $(addprefix $(RIOTBASE)/,$(APPLICATION_DIRS))
|
||||
APPLICATION_DIRS_RELATIVE := $(dir $(wildcard $(addsuffix /*/Makefile,$(APPLICATION_DIRS))))
|
||||
APPLICATION_DIRS_ABSOLUTE := $(abspath $(APPLICATION_DIRS_RELATIVE))
|
||||
APPLICATION_DIRS := $(sort $(patsubst ./%,%,$(patsubst %/,%,$(APPLICATION_DIRS_RELATIVE))))
|
||||
# 1. recursively find Makefiles
|
||||
# 2. take parent folders
|
||||
# 3. exclude build artifacts (below bin/)
|
||||
# 4. exclude false positives from app_dirs.blacklist
|
||||
# 5. sort
|
||||
APPLICATION_DIRS := $(shell find $(APPS_BASE_DIRS) -name Makefile -type f | \
|
||||
xargs dirname | \
|
||||
grep -vF "/bin/" | \
|
||||
grep -vFf $(RIOTBASE)/makefiles/app_dirs.blacklist | \
|
||||
sort | uniq)
|
||||
|
||||
info-applications:
|
||||
@for dir in $(APPLICATION_DIRS); do echo $$dir; done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user