Skip to content

Commit

Permalink
Makefile: add _artifacts to MKDIR_TARGETS again
Browse files Browse the repository at this point in the history
It seems that variable expansion in Makefile targets is not done recursively.

Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
  • Loading branch information
norio-nomura committed Sep 19, 2024
1 parent e3d963b commit b8b6bb3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ _output/share/doc/lima/%: % | _output/share/doc/lima

MKDIR_TARGETS += _output/share/doc/lima

$(MKDIR_TARGETS):
mkdir -p $@

.PHONY: create-links-in-documents
create-links-in-documents: _output/share/doc/lima/templates _output/share/doc/lima/examples
Expand Down Expand Up @@ -318,8 +316,7 @@ _artifacts/lima-%.tar.gz: | _artifacts
$(ENVS) make clean binaries
$(TAR) -C _output/ -czvf $@ ./

_artifacts:
mkdir -p $@
MKDIR_TARGETS += _artifacts

.PHONY: artifacts-misc
artifacts-misc: | _artifacts
Expand All @@ -331,3 +328,8 @@ codesign:
ifeq ($(GOOS),darwin)
codesign --entitlements vz.entitlements -s - ./_output/bin/limactl
endif

# This target must be placed after any changes to the `MKDIR_TARGETS` variable.
# It seems that variable expansion in Makefile targets is not done recursively.
$(MKDIR_TARGETS):
mkdir -p $@

0 comments on commit b8b6bb3

Please sign in to comment.