From d212bc4d606c53d3faee1265bd112894a1997118 Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Fri, 20 Mar 2020 19:21:15 +0100 Subject: [PATCH] ext: lib: Move fnmatch to lib/ Since we already have similarly licensed 3-clause BSD files in the tree, and in particular in our minimal libc, move the fnmatch functionality from ext/ to lib/. Signed-off-by: Carles Cufi --- CODEOWNERS | 1 + Kconfig.zephyr | 1 - ext/CMakeLists.txt | 1 - ext/lib/CMakeLists.txt | 1 - lib/CMakeLists.txt | 1 + lib/Kconfig | 2 ++ {ext/lib => lib}/fnmatch/CMakeLists.txt | 1 - {ext/lib => lib}/fnmatch/Kconfig | 0 {ext/lib => lib}/fnmatch/fnmatch.c | 1 - {ext/lib => lib}/fnmatch/fnmatch.h | 1 - 10 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 ext/lib/CMakeLists.txt rename {ext/lib => lib}/fnmatch/CMakeLists.txt (99%) rename {ext/lib => lib}/fnmatch/Kconfig (100%) rename {ext/lib => lib}/fnmatch/fnmatch.c (97%) rename {ext/lib => lib}/fnmatch/fnmatch.h (97%) diff --git a/CODEOWNERS b/CODEOWNERS index f3118b1d164..6443a43e816 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -339,6 +339,7 @@ /include/toolchain/ @andrewboie @andyross /include/zephyr.h @andrewboie @andyross /kernel/ @andrewboie @andyross +/lib/fnmatch/ @carlescufi /lib/gui/ @vanwinkeljan /lib/os/ @andrewboie @andyross /lib/posix/ @pfalcon diff --git a/Kconfig.zephyr b/Kconfig.zephyr index 09a016011c5..6668933a568 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -32,7 +32,6 @@ source "dts/Kconfig" source "drivers/Kconfig" source "lib/Kconfig" source "subsys/Kconfig" -source "ext/Kconfig" osource "$(TOOLCHAIN_KCONFIG_DIR)/Kconfig" diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt index a8821947323..71bebdf6f8c 100644 --- a/ext/CMakeLists.txt +++ b/ext/CMakeLists.txt @@ -1,2 +1 @@ -add_subdirectory(lib) add_subdirectory(debug) diff --git a/ext/lib/CMakeLists.txt b/ext/lib/CMakeLists.txt deleted file mode 100644 index 1ed124a6f82..00000000000 --- a/ext/lib/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory_ifdef(CONFIG_FNMATCH fnmatch) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 4a17c7b32b2..e28df122ee0 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -6,6 +6,7 @@ add_subdirectory(posix) endif() add_subdirectory_ifdef(CONFIG_CMSIS_RTOS_V1 cmsis_rtos_v1) add_subdirectory_ifdef(CONFIG_CMSIS_RTOS_V2 cmsis_rtos_v2) +add_subdirectory_ifdef(CONFIG_FNMATCH fnmatch) add_subdirectory(gui) add_subdirectory(os) add_subdirectory_ifdef(CONFIG_UPDATEHUB updatehub) diff --git a/lib/Kconfig b/lib/Kconfig index cd731a0b591..18922927706 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -9,6 +9,8 @@ source "lib/cmsis_rtos_v1/Kconfig" source "lib/cmsis_rtos_v2/Kconfig" +source "lib/fnmatch/Kconfig" + source "lib/gui/Kconfig" source "lib/os/Kconfig" diff --git a/ext/lib/fnmatch/CMakeLists.txt b/lib/fnmatch/CMakeLists.txt similarity index 99% rename from ext/lib/fnmatch/CMakeLists.txt rename to lib/fnmatch/CMakeLists.txt index 480031f7913..b2d525b8c27 100644 --- a/ext/lib/fnmatch/CMakeLists.txt +++ b/lib/fnmatch/CMakeLists.txt @@ -12,4 +12,3 @@ zephyr_sources_ifdef( CONFIG_FNMATCH fnmatch.c ) - diff --git a/ext/lib/fnmatch/Kconfig b/lib/fnmatch/Kconfig similarity index 100% rename from ext/lib/fnmatch/Kconfig rename to lib/fnmatch/Kconfig diff --git a/ext/lib/fnmatch/fnmatch.c b/lib/fnmatch/fnmatch.c similarity index 97% rename from ext/lib/fnmatch/fnmatch.c rename to lib/fnmatch/fnmatch.c index f84feadead0..1319509529b 100644 --- a/ext/lib/fnmatch/fnmatch.c +++ b/lib/fnmatch/fnmatch.c @@ -205,4 +205,3 @@ int fnmatch(const char *pattern, const char *string, int flags) { return fnmatchx(pattern, string, flags, 64); } - diff --git a/ext/lib/fnmatch/fnmatch.h b/lib/fnmatch/fnmatch.h similarity index 97% rename from ext/lib/fnmatch/fnmatch.h rename to lib/fnmatch/fnmatch.h index 2696dd54ffc..731b472948b 100644 --- a/ext/lib/fnmatch/fnmatch.h +++ b/lib/fnmatch/fnmatch.h @@ -47,4 +47,3 @@ int fnmatch(const char *, const char *, int); #endif /* !_FNMATCH_H_ */ -