os/mm: use printf instead of echo
In some shell configurations, newline character(\n) may
not work properly with echo command.
When HEAPINFO_USER_GROUP is enabled, it could generate
macros without newline in heapinfo_internal.h and resulting
in build error
This commit uses "printf" instead of "echo" in Makefile
@@ -126,7 +126,7 @@ context:
GROUP_DELIM_NUM = "${shell echo $(CONFIG_HEAPINFO_USER_GROUP_LIST) | grep -o '/' | wc -l}"
THREAD_DELIM_NUM = "${shell echo $(CONFIG_HEAPINFO_USER_GROUP_LIST) | grep -o ',' | wc -l}"
-${shell echo '#define HEAPINFO_USER_GROUP_DELIM_NUM' "$(GROUP_DELIM_NUM)\n"'#define HEAPINFO_THREAD_DELIM_NUM' "$(THREAD_DELIM_NUM)\n"'#define HEAPINFO_USER_GROUP_NUM (HEAPINFO_USER_GROUP_DELIM_NUM + 1)\n#define HEAPINFO_THREAD_NUM (HEAPINFO_USER_GROUP_NUM + HEAPINFO_THREAD_DELIM_NUM)' > $(TOPDIR)$(DELIM)include$(DELIM)tinyara$(DELIM)mm$(DELIM)heapinfo_internal.h}
+${shell printf '%s\n%s\n%s\n%s\n' "#define HEAPINFO_USER_GROUP_DELIM_NUM $(GROUP_DELIM_NUM)" "#define HEAPINFO_THREAD_DELIM_NUM $(THREAD_DELIM_NUM)" "#define HEAPINFO_USER_GROUP_NUM (HEAPINFO_USER_GROUP_DELIM_NUM + 1)" "#define HEAPINFO_THREAD_NUM (HEAPINFO_USER_GROUP_NUM + HEAPINFO_THREAD_DELIM_NUM)"> $(TOPDIR)$(DELIM)include$(DELIM)tinyara$(DELIM)mm$(DELIM)heapinfo_internal.h}
endif
# Dependencies
