Skip to content

Commit

Permalink
build: add $(STAGING_DIR) and $(BIN_DIR) preparation to target and pa…
Browse files Browse the repository at this point in the history
…ckage subdir compile dependencies

In a pristine build, these directories are created as dependencies of
the tools subdir compile, however this step never runs when the tools
compile stamp already exists. Since commit ed6ba28 ("tools: keep
stamp file in $(STAGING_DIR_HOST)"), this will happen after `make clean`:
$(STAGING_DIR) has been deleted, but the tools stamp still exists, so
the next build will fail because $(STAGING_DIR) has not been set up
correctly.

Fix builds after `make clean` by adding the preparation as dependencies
for the target and package directories as well.

Fixes: ed6ba28 ("tools: keep stamp file in $(STAGING_DIR_HOST)")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  • Loading branch information
neocturne committed Mar 3, 2024
1 parent 37bbed6 commit fbb924a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ endif

$(curdir)/flags-install:= -j1

$(curdir)//compile = $(STAGING_DIR)/.prepared $(BIN_DIR)

$(eval $(call stampfile,$(curdir),package,prereq,.config))
$(eval $(call stampfile,$(curdir),package,cleanup,$(TMP_DIR)/.build))
$(eval $(call stampfile,$(curdir),package,compile,$(TMP_DIR)/.build))
Expand Down
2 changes: 2 additions & 0 deletions target/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ $(curdir)/builddirs-install:=\
$(curdir)/sdk/install:=$(curdir)/linux/install
$(curdir)/imagebuilder/install:=$(curdir)/linux/install

$(curdir)//compile = $(STAGING_DIR)/.prepared $(BIN_DIR)

$(eval $(call stampfile,$(curdir),target,prereq,.config))
$(eval $(call stampfile,$(curdir),target,compile,$(TMP_DIR)/.build))
$(eval $(call stampfile,$(curdir),target,install,$(TMP_DIR)/.build))
Expand Down

0 comments on commit fbb924a

Please sign in to comment.