mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
Makefile: add .FORCE target
Sorry for introducing that, but we need to force-rebuild implicit
rules on the level of main Makefile. All the sub-makefiles should
decide if the force-rebuilding target really needs a rebuild,
because they know it's dependencies.
Pattern-specific rules are implicit, so something like:
.PHONY: compel/% criu/% #...
will not work.
.FORCE target seems the simplest way to solve this
"going to submake on rebuild" problem.
But maybe there is more elegant proposal?
FWIW, before this patch:
[criu]$ make compel/compel
make[1]: Entering directory '~/tools/criu'
HOSTDEP compel/handle-elf-32.d
...
HOSTLINK compel/compel
make[1]: Leaving directory '~/tools/criu'
[criu]$ touch compel/main.c
[criu]$ make compel/compel
make: 'compel/compel' is up to date.
[criu]$ touch compel/Makefile
[criu]$ make compel/compel
make: 'compel/compel' is up to date.
After the patch:
[criu]$ touch compel/main.c
[criu]$ make compel/compel
make[1]: Entering directory '~/tools/criu'
HOSTDEP compel/main.d
HOSTCC compel/main.o
HOSTLINK compel/compel
make[1]: Leaving directory '~/tools/criu'
[criu]$ touch compel/Makefile
[criu]$ make compel/compel
make[1]: Entering directory '~/tools/criu'
HOSTDEP compel/handle-elf-32.d
...
HOSTLINK compel/compel
make[1]: Leaving directory '~/tools/criu'
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>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
80a5f519f3
commit
6f58ca5ace
1 changed files with 2 additions and 2 deletions
4
Makefile
4
Makefile
|
|
@ -202,10 +202,10 @@ $(eval $(call gen-built-in,images))
|
|||
.PHONY: .FORCE
|
||||
|
||||
# Compel get used by CRIU, build it earlier
|
||||
compel/%:
|
||||
compel/%: .FORCE
|
||||
$(Q) $(MAKE) $(build)=compel $@
|
||||
|
||||
test/compel/%:
|
||||
test/compel/%: .FORCE
|
||||
$(Q) $(MAKE) $(build)=compel $@
|
||||
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue