Skip to content

Commit fe72a9e

Browse files
authored
Merge pull request #21213 from mguetschow/list-examples
makefiles: fix output of info-applications
2 parents 8aa0859 + d9280f1 commit fe72a9e

File tree

11 files changed

+41
-34
lines changed

11 files changed

+41
-34
lines changed

examples/language_bindings/officially_supported/rust-async/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ portable-atomic = { version = "1", features = [ "critical-section" ] }
2828
# Rust, that may change; it is best practice for any RIOT application that has
2929
# its own top-level Rust crate to include rust_riotmodules from inside
3030
# RIOTBASE.
31-
rust_riotmodules = { path = "../../sys/rust_riotmodules/" }
31+
rust_riotmodules = { path = "../../../../sys/rust_riotmodules/" }

examples/language_bindings/officially_supported/rust-gcoap/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ riot-coap-handler-demos = { git = "https://gitlab.com/etonomy/riot-module-exampl
3030
# Rust, that may change; it is best practice for any RIOT application that has
3131
# its own top-level Rust crate to include rust_riotmodules from inside
3232
# RIOTBASE.
33-
rust_riotmodules = { path = "../../sys/rust_riotmodules/" }
33+
rust_riotmodules = { path = "../../../../sys/rust_riotmodules/" }
3434
static_cell = "2.1.0"
3535

3636
[patch.crates-io]

examples/language_bindings/officially_supported/rust-hello-world/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ riot-wrappers = { version = "0.9.0", features = [ "set_panic_handler" ] }
2121
# Rust, that may change; it is best practice for any RIOT application that has
2222
# its own top-level Rust crate to include rust_riotmodules from inside
2323
# RIOTBASE.
24-
rust_riotmodules = { path = "../../sys/rust_riotmodules/" }
24+
rust_riotmodules = { path = "../../../../sys/rust_riotmodules/" }

examples/networking/bluetooth_low_energy/misc_ble_examples/skald_eddystone/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ APPLICATION = skald_eddystone
55
BOARD ?= nrf52dk
66

77
# This has to be the absolute path to the RIOT base directory:
8-
RIOTBASE ?= $(CURDIR)/../../../..
8+
RIOTBASE ?= $(CURDIR)/../../../../..
99

1010
# include Skald
1111
USEMODULE += skald_eddystone

examples/networking/bluetooth_low_energy/misc_ble_examples/skald_ibeacon/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ APPLICATION = skald_ibeacon
55
BOARD ?= nrf52dk
66

77
# This has to be the absolute path to the RIOT base directory:
8-
RIOTBASE ?= $(CURDIR)/../../../..
8+
RIOTBASE ?= $(CURDIR)/../../../../..
99

1010
# include Skald
1111
USEMODULE += skald_ibeacon

examples/networking/bluetooth_low_energy/nimble/nimble_gatt/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ APPLICATION = nimble_gatt
55
BOARD ?= nrf52dk
66

77
# This has to be the absolute path to the RIOT base directory:
8-
RIOTBASE ?= $(CURDIR)/../../../..
8+
RIOTBASE ?= $(CURDIR)/../../../../..
99

1010
# Include NimBLE
1111
USEPKG += nimble

examples/networking/bluetooth_low_energy/nimble/nimble_heart_rate_sensor/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ APPLICATION = nimble_heart_rate_sensor
55
BOARD ?= nrf52dk
66

77
# This has to be the absolute path to the RIOT base directory:
8-
RIOTBASE ?= $(CURDIR)/../../../..
8+
RIOTBASE ?= $(CURDIR)/../../../../..
99

1010
# Some RIOT modules needed for this example
1111
USEMODULE += event_timeout_ztimer

examples/networking/bluetooth_low_energy/nimble/nimble_scanner/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ APPLICATION = nimble_scanner
55
BOARD ?= nrf52dk
66

77
# This has to be the absolute path to the RIOT base directory:
8-
RIOTBASE ?= $(CURDIR)/../../../..
8+
RIOTBASE ?= $(CURDIR)/../../../../..
99

1010
# We use the xtimer and the shell in this example
1111
USEMODULE += shell

examples/networking/gnrc_networking/gnrc_lorawan/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ APPLICATION = gnrc_lorawan
55
DEVELHELP ?= 1
66

77
BOARD ?= b-l072z-lrwan1
8-
RIOTBASE ?= ../../
8+
RIOTBASE ?= $(CURDIR)/../../../..
99

1010
# Include board's default network devices and auto-initialization of GNRC
1111
# interfaces

makefiles/app_dirs.blacklist

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
examples/advanced_examples/bindist/
2+
examples/advanced_examples/pio_blink/
3+
examples/essentials/subfolders/
4+
examples/language_bindings/community_supported/wasm/
5+
tests/build_system/blob/
6+
tests/build_system/cpp_exclude/external_modules/
7+
tests/build_system/cpp_ext/external_modules/
8+
tests/build_system/external_board_dirs/esp-ci-boards/
9+
tests/build_system/external_board_dirs/netdev-ci-boards/
10+
tests/build_system/external_board_native/external_boards/
11+
tests/build_system/external_module_dirs/external_modules/
12+
tests/build_system/external_pkg_dirs/external_pkgs/
13+
tests/build_system/kconfig/external_modules/
14+
tests/build_system/kconfig/external_pkgs/
15+
tests/periph/qdec/boards_modded/
16+
tests/pkg/openwsn_sock_udp/external_modules/
17+
tests/pkg/tflite-micro/external_modules/
18+
tests/pkg/utensor/external_modules/
19+
tests/pkg/wolfcrypt-ed25519-verify/
20+
tests/sys/suit_manifest/native_flashpage/
21+
tests/unittests/

makefiles/app_dirs.inc.mk

+11-25
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,18 @@
33
# fallback so empty RIOTBASE won't lead to "/examples/"
44
RIOTBASE ?= .
55

6-
# 1. use wildcard to find Makefiles
7-
# 2. use patsubst to drop trailing "/"
8-
# 3. use patsubst to drop possible leading "./"
9-
# 4. sort
6+
APPS_BASE_DIRS = bootloaders examples fuzzing tests
107

11-
# Prepare the list of application directories
12-
APPLICATION_DIRS := \
13-
fuzzing \
14-
bootloaders \
15-
examples \
16-
tests \
17-
tests/bench \
18-
tests/build_system \
19-
tests/core \
20-
tests/cpu \
21-
tests/drivers \
22-
tests/net \
23-
tests/periph \
24-
tests/pkg \
25-
tests/sys \
26-
#
27-
28-
APPLICATION_DIRS := $(addprefix $(RIOTBASE)/,$(APPLICATION_DIRS))
29-
APPLICATION_DIRS_RELATIVE := $(dir $(wildcard $(addsuffix /*/Makefile,$(APPLICATION_DIRS))))
30-
APPLICATION_DIRS_ABSOLUTE := $(abspath $(APPLICATION_DIRS_RELATIVE))
31-
APPLICATION_DIRS := $(sort $(patsubst ./%,%,$(patsubst %/,%,$(APPLICATION_DIRS_RELATIVE))))
8+
# 1. recursively find Makefiles
9+
# 2. take parent folders
10+
# 3. exclude build artifacts (below bin/)
11+
# 4. exclude false positives from app_dirs.blacklist
12+
# 5. sort
13+
APPLICATION_DIRS := $(shell find $(APPS_BASE_DIRS) -name Makefile -type f | \
14+
xargs dirname | \
15+
grep -vF "/bin/" | \
16+
grep -vFf $(RIOTBASE)/makefiles/app_dirs.blacklist | \
17+
sort | uniq)
3218

3319
info-applications:
3420
@for dir in $(APPLICATION_DIRS); do echo $$dir; done

0 commit comments

Comments
 (0)