[CRIU] [PATCH 5/6] build/nmk: declare build-as as a recursive
Cyrill Gorcunov
gorcunov at openvz.org
Mon Jul 18 12:22:47 PDT 2016
From: Dmitry Safonov <dsafonov at virtuozzo.com>
So, how it was working:
1. build-as was declared with $$(1) and $$(2) which were expanded
on entering the submake;
2. function $(call build-as,...) performed the second expansion of
build-as.
Cons: build-as works only in sub-makefile, no sub-sub-makefile, no
upper/top makefile.
Simplify this by single $(1).
Then build-as variable will be used _only_ in makefile, not in
sub-makefiles.
This is for now fine, as each file, that calls $(MAKE) with
$(build)=dir or $(call build-as,makefile,dir) will include main.mk
from NMK, which has build-as definition (from include.mk).
In the future, we'll get rid of $(build) and $(build-as) workarounds
as finally switch to building from a global makefile.
Cc: Cyrill Gorcunov <gorcunov at openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
scripts/nmk/scripts/include.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/nmk/scripts/include.mk b/scripts/nmk/scripts/include.mk
index 1ba65292381b..4c496f72ae9c 100644
--- a/scripts/nmk/scripts/include.mk
+++ b/scripts/nmk/scripts/include.mk
@@ -47,7 +47,7 @@ build := -r -R -f $(__nmk_dir)main.mk makefile=Makefile obj
export build
# With specified Makefile
-build-as := -r -R -f $(__nmk_dir)main.mk makefile=$$(1) obj=$$(2)
+build-as = -r -R -f $(__nmk_dir)main.mk makefile=$(1) obj=$(2)
export build-as
#
--
2.7.4
More information about the CRIU
mailing list