Commit e8ca542c authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

make: pie -- Add generation of dep files

Otherwise pie may not be re-built if headers
are changed.

https://bugzilla.openvz.org/show_bug.cgi?id=2465Reported-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 96dd1d22
...@@ -14,7 +14,9 @@ ASMFLAGS := -D__ASSEMBLY__ ...@@ -14,7 +14,9 @@ ASMFLAGS := -D__ASSEMBLY__
.DEFAULT_GOAL := pie .DEFAULT_GOAL := pie
LIB-OBJS = log-simple.o blob-util-net.o $(SYSCALL-LIB) LIB-OBJS := log-simple.o blob-util-net.o
DEPS := $(RESTORER-ARCH-OBJS:.o=.d) $(LIB-OBJS:.o=.d)
LIB-OBJS += $(SYSCALL-LIB)
$(PARASITE): $(LIB-OBJS) $(PASM-OBJS) $(PIELDS) $(PARASITE): $(LIB-OBJS) $(PASM-OBJS) $(PIELDS)
$(RESTORER): $(LIB-OBJS) $(RESTORER-ARCH-OBJS) $(PIELDS) $(RESTORER): $(LIB-OBJS) $(RESTORER-ARCH-OBJS) $(PIELDS)
...@@ -24,6 +26,11 @@ $(PIELDS): $(PIELDS).in ...@@ -24,6 +26,11 @@ $(PIELDS): $(PIELDS).in
$(Q) $(SH) -c "echo 'OUTPUT_ARCH($(LDARCH))' > $(PIELDS)" $(Q) $(SH) -c "echo 'OUTPUT_ARCH($(LDARCH))' > $(PIELDS)"
$(Q) $(SH) -c "cat $(PIELDS).in >> $(PIELDS)" $(Q) $(SH) -c "cat $(PIELDS).in >> $(PIELDS)"
blob-util-net.d: $(SRC_DIR)/util-net.c
%.d: %.c
$(E) " DEP " $@
$(Q) $(CC) -M -MT $@ -MT $(patsubst %.d,%.o,$@) $(CFLAGS) $< -o $@
blob-util-net.o: $(SRC_DIR)/util-net.c blob-util-net.o: $(SRC_DIR)/util-net.c
$(E) " CC " $@ $(E) " CC " $@
$(Q) $(CC) $(CFLAGS) $< -o $@ $(Q) $(CC) $(CFLAGS) $< -o $@
...@@ -50,6 +57,10 @@ blob-util-net.o: $(SRC_DIR)/util-net.c ...@@ -50,6 +57,10 @@ blob-util-net.o: $(SRC_DIR)/util-net.c
pie: $(BLOBS) pie: $(BLOBS)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPS)
endif
clean: clean:
$(E) " CLEAN PIE" $(E) " CLEAN PIE"
$(Q) $(RM) -f ./*-blob.h $(Q) $(RM) -f ./*-blob.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment