From c032061bf7c6e397ba52a2026e66e1f84bb018e8 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Wed, 2 May 2018 15:11:00 +0100 Subject: [PATCH] Makefile: add missing dependencies to install targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "make install" fails on a clean working directory: $ make install install: cannot stat ‘data/kata-collect-data.sh’: No such file or directory This happens because install and install-scripts do not depend on the runtime. Make doesn't know it needs to build the runtime before it can be installed. Add the missing dependencies to the install targets so that "make install" works on a clean working directory and rebuilds when source files have been modified. Note that SCRIPTS contains the generated kata-collect-data.sh script. That file needs to be generated before it can be installed, so make SCRIPTS a dependency of install-scripts. Fixes: #283 Signed-off-by: Stefan Hajnoczi --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7e14884137..a9055ec236 100644 --- a/Makefile +++ b/Makefile @@ -377,11 +377,11 @@ check-go-static: coverage: $(QUIET_TEST).ci/go-test.sh html-coverage -install: default install-scripts +install: default runtime install-scripts $(QUIET_INST)install -D $(TARGET) $(DESTTARGET) $(QUIET_INST)install -D $(CONFIG) $(DESTCONFIG) -install-scripts: +install-scripts: $(SCRIPTS) $(foreach f,$(SCRIPTS),$(call INSTALL_EXEC,$f,$(SCRIPTS_DIR))) clean: