mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles: app_dirs.inc.mk initial commit
This helper Makefile is supposed to unify finding folders with applications that can be built.
This commit is contained in:
parent
e8dfabd4c4
commit
de64a85b74
14
makefiles/app_dirs.inc.mk
Normal file
14
makefiles/app_dirs.inc.mk
Normal file
@ -0,0 +1,14 @@
|
||||
# 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
|
||||
APPLICATION_DIRS := $(sort $(patsubst ./%,%,$(patsubst %/,%,$(dir $(wildcard \
|
||||
$(RIOTBASE)/examples/*/Makefile \
|
||||
$(RIOTBASE)/tests/*/Makefile \
|
||||
)))))
|
||||
|
||||
info-applications:
|
||||
@for dir in $(APPLICATION_DIRS); do echo $$dir; done
|
Loading…
Reference in New Issue
Block a user