From 9ea52c1d83780878201c37b78c8a6dbdb114ac58 Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Mon, 24 Jan 2022 17:32:30 +0900 Subject: [PATCH] Makefile: Fix make export for CONFIG_BUILD_KERNEL=y Summary: - I noticed that 'make export' does not work with swama5d4-ek:knsh - This commit fixes this issue by always creating the registry directory but not copying pdat files for CONFIG_BUILD_KERNEL=y - This commit also fixes the delimiter issue on Windows - NOTE: nuttx needs to be updated as well Impact: - CONFIG_BUILD_KERNEL=y only Testing: - Build (make and make export) with sama5d-ek:knsh Signed-off-by: Masayuki Ishikawa --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 75460305e..ae870817c 100644 --- a/Makefile +++ b/Makefile @@ -154,13 +154,15 @@ preconfig: Kconfig export: ifneq ($(EXPORTDIR),) + $(Q) mkdir -p "${EXPORTDIR}"$(DELIM)registry || exit 1; +ifneq ($(CONFIG_BUILD_KERNEL),y) ifneq ($(BUILTIN_REGISTRY),) - $(Q) mkdir -p "${EXPORTDIR}"/registry || exit 1; \ - for f in "${BUILTIN_REGISTRY}"/*.bdat "${BUILTIN_REGISTRY}"/*.pdat ; do \ - [ -f "$${f}" ] && cp -f "$${f}" "${EXPORTDIR}"/registry ; \ + for f in "${BUILTIN_REGISTRY}"$(DELIM)*.bdat "${BUILTIN_REGISTRY}"$(DELIM)*.pdat ; do \ + [ -f "$${f}" ] && cp -f "$${f}" "${EXPORTDIR}"$(DELIM)registry ; \ done endif endif +endif .depdirs: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_depend)