mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 18:07:57 +00:00
build: criu -- Drop redundant phonies
Everytime we build the executable we've to check all the deps and sources for changes, thus don't protvide criu/criu on toplevel as a target file (my bug in 496b51b64a6). Instead bring this target as a phony back but drop phony from criu/Makefile itself, as it should be from the beginning. Same time remove unneeded phonies over the targets which are real files. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Tested-by: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
1ec3a107fd
commit
38eacf5edb
11
Makefile
11
Makefile
@ -116,20 +116,21 @@ PHONY += images
|
|||||||
# the nmk so we can reuse it there.
|
# the nmk so we can reuse it there.
|
||||||
criu/%: images/built-in.o
|
criu/%: images/built-in.o
|
||||||
$(Q) $(MAKE) -C criu $@
|
$(Q) $(MAKE) -C criu $@
|
||||||
criu/criu: images/built-in.o
|
criu: images/built-in.o
|
||||||
$(Q) $(MAKE) -C criu criu
|
$(Q) $(MAKE) -C criu all
|
||||||
|
.PHONY: criu
|
||||||
|
|
||||||
#
|
#
|
||||||
# Libraries next once criu it ready
|
# Libraries next once criu it ready
|
||||||
# (we might generate headers and such
|
# (we might generate headers and such
|
||||||
# when building criu itself).
|
# when building criu itself).
|
||||||
lib/%: criu/criu
|
lib/%: criu
|
||||||
$(Q) $(MAKE) -C lib $@
|
$(Q) $(MAKE) -C lib $@
|
||||||
lib: criu/criu
|
lib: criu
|
||||||
$(Q) $(MAKE) -C lib all
|
$(Q) $(MAKE) -C lib all
|
||||||
PHONY += lib
|
PHONY += lib
|
||||||
|
|
||||||
all: criu/criu lib
|
all: criu lib
|
||||||
PHONY += all
|
PHONY += all
|
||||||
|
|
||||||
clean-built:
|
clean-built:
|
||||||
|
@ -89,14 +89,12 @@ config: $(VERSION_HEADER)
|
|||||||
SYSCALL-LIB := $(ARCH_DIR)/syscalls.built-in.o
|
SYSCALL-LIB := $(ARCH_DIR)/syscalls.built-in.o
|
||||||
$(SYSCALL-LIB): config
|
$(SYSCALL-LIB): config
|
||||||
$(Q) $(MAKE) $(call build-as,Makefile.syscalls,$(ARCH_DIR)) all
|
$(Q) $(MAKE) $(call build-as,Makefile.syscalls,$(ARCH_DIR)) all
|
||||||
PHONY += $(SYSCALL-LIB)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Architecture dependant part.
|
# Architecture dependant part.
|
||||||
ARCH-LIB := $(ARCH_DIR)/crtools.built-in.o
|
ARCH-LIB := $(ARCH_DIR)/crtools.built-in.o
|
||||||
$(ARCH-LIB): config $(SYSCALL-LIB)
|
$(ARCH-LIB): config $(SYSCALL-LIB)
|
||||||
$(Q) $(MAKE) $(call build-as,Makefile,$(ARCH_DIR)) $@
|
$(Q) $(MAKE) $(call build-as,Makefile,$(ARCH_DIR)) $@
|
||||||
PHONY += $(ARCH-LIB)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# piegen tool needed for PIE code.
|
# piegen tool needed for PIE code.
|
||||||
@ -119,7 +117,7 @@ pie/lib.a: $(ARCH-LIB) $(SYSCALL-LIB)
|
|||||||
# PIE code blobs themseves.
|
# PIE code blobs themseves.
|
||||||
pie: $(piegen-bin) pie/lib.a
|
pie: $(piegen-bin) pie/lib.a
|
||||||
$(Q) $(MAKE) $(build)=pie all
|
$(Q) $(MAKE) $(build)=pie all
|
||||||
PHONY += pie
|
.PHONY: pie
|
||||||
|
|
||||||
#
|
#
|
||||||
# CRIU executable
|
# CRIU executable
|
||||||
@ -136,7 +134,6 @@ built-in.o: pie
|
|||||||
criu: $(PROGRAM-BUILTINS)
|
criu: $(PROGRAM-BUILTINS)
|
||||||
$(call msg-link, $@)
|
$(call msg-link, $@)
|
||||||
$(Q) $(CC) $(CFLAGS) $^ $(LIBS) $(LDFLAGS) $(GMONLDOPT) -rdynamic -o $@
|
$(Q) $(CC) $(CFLAGS) $^ $(LIBS) $(LDFLAGS) $(GMONLDOPT) -rdynamic -o $@
|
||||||
PHONY += criu
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cleanup everything.
|
# Cleanup everything.
|
||||||
@ -153,6 +150,7 @@ clean:
|
|||||||
$(Q) $(RM) $(VERSION_HEADER)
|
$(Q) $(RM) $(VERSION_HEADER)
|
||||||
$(Q) $(RM) $(CONFIG_HEADER)
|
$(Q) $(RM) $(CONFIG_HEADER)
|
||||||
$(Q) $(RM) criu
|
$(Q) $(RM) criu
|
||||||
|
.PHONY: clean
|
||||||
|
|
||||||
UAPI_HEADERS := include/criu-plugin.h include/criu-log.h
|
UAPI_HEADERS := include/criu-plugin.h include/criu-log.h
|
||||||
|
|
||||||
@ -162,10 +160,10 @@ install: criu
|
|||||||
$(Q) install -m 755 criu $(DESTDIR)$(SBINDIR)
|
$(Q) install -m 755 criu $(DESTDIR)$(SBINDIR)
|
||||||
$(Q) mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
$(Q) mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
||||||
$(Q) install -m 644 $(UAPI_HEADERS) $(DESTDIR)$(INCLUDEDIR)
|
$(Q) install -m 644 $(UAPI_HEADERS) $(DESTDIR)$(INCLUDEDIR)
|
||||||
|
.PHONY: install
|
||||||
|
|
||||||
#
|
#
|
||||||
# Final @all target.
|
# Final @all target.
|
||||||
all: $(PHONY)
|
all: criu
|
||||||
@true
|
@true
|
||||||
|
.PHONY: all
|
||||||
.PHONY: $(PHONY) clean install
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user