mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 01:02:33 +00:00
build: use MAKEFILE_LIST for a more complete Makefile dependency
Depending on Makefile is not enough to detect all changes. We must rebuild when included makefiles change, too. The MAKEFILE_LIST special variable contains the filenames of all included makefiles and Makefile itself. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
bbf92533f4
commit
1eb5d6c900
8
Makefile
8
Makefile
@ -444,10 +444,10 @@ GENERATED_CONFIG = $(CLI_DIR)/config-generated.go
|
||||
|
||||
GENERATED_GO_FILES += $(GENERATED_CONFIG)
|
||||
|
||||
$(GENERATED_CONFIG): Makefile VERSION
|
||||
$(GENERATED_CONFIG): $(MAKEFILE_LIST) VERSION
|
||||
$(QUIET_GENERATE)echo "$$GENERATED_CODE" >$@
|
||||
|
||||
$(TARGET_OUTPUT): $(EXTRA_DEPS) $(SOURCES) $(GENERATED_GO_FILES) $(GENERATED_FILES) Makefile | show-summary
|
||||
$(TARGET_OUTPUT): $(EXTRA_DEPS) $(SOURCES) $(GENERATED_GO_FILES) $(GENERATED_FILES) $(MAKEFILE_LIST) | show-summary
|
||||
$(QUIET_BUILD)(cd $(CLI_DIR) && go build $(BUILDFLAGS) -o $@ .)
|
||||
|
||||
$(SHIMV2_OUTPUT):
|
||||
@ -464,12 +464,12 @@ $(SHIMV2_OUTPUT):
|
||||
show-summary \
|
||||
show-variables
|
||||
|
||||
$(TARGET).coverage: $(SOURCES) $(GENERATED_FILES) Makefile
|
||||
$(TARGET).coverage: $(SOURCES) $(GENERATED_FILES) $(MAKEFILE_LIST)
|
||||
$(QUIET_TEST)go test -o $@ -covermode count
|
||||
|
||||
GENERATED_FILES += $(CONFIGS)
|
||||
|
||||
$(GENERATED_FILES): %: %.in Makefile VERSION
|
||||
$(GENERATED_FILES): %: %.in $(MAKEFILE_LIST) VERSION
|
||||
$(QUIET_CONFIG)$(SED) \
|
||||
-e "s|@COMMIT@|$(COMMIT)|g" \
|
||||
-e "s|@VERSION@|$(VERSION)|g" \
|
||||
|
Loading…
Reference in New Issue
Block a user