mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
build/nmk: define map and newline
map is very good at generating rules. Just map gen function to array of it's parameters. Don't forget to eval the result. I'll use it in feature-tests generation and in someday coming compat 32-bit mode - in x86 makefiles. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
ab04ddc567
commit
e85638fd38
@@ -42,6 +42,17 @@ define msg-build
|
|||||||
$(E) " BUILD " $(1)
|
$(E) " BUILD " $(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define newline
|
||||||
|
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
|
# map funciton:
|
||||||
|
# $1 - func to call
|
||||||
|
# $2 - list over which map the $1 func
|
||||||
|
# result is divided with newlines
|
||||||
|
map = $(foreach x,$2,$(call $1,$x)$(newline))
|
||||||
|
|
||||||
#
|
#
|
||||||
# Footer.
|
# Footer.
|
||||||
$(__nmk_dir)scripts/msg.mk:
|
$(__nmk_dir)scripts/msg.mk:
|
||||||
|
Reference in New Issue
Block a user