Skip to content

Commit ee37ba8

Browse files
committed
Makefile: stop depends on codesign target to avoid force rebuild
Set dependency to `codesign` target Signed-off-by: Norio Nomura <[email protected]>
1 parent bdd8088 commit ee37ba8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ binaries: clean \
118118

119119
# _output/bin
120120
.PHONY: limactl lima helpers
121-
limactl: _output/bin/limactl$(exe) codesign lima
121+
limactl: _output/bin/limactl$(exe) lima
122122

123123
### Listing Dependencies
124124

@@ -182,6 +182,9 @@ _output/bin/limactl$(exe): $(DEPENDENCIES_FOR_LIMACTL) $$(call force_build,$$@)
182182
# The hostagent must be compiled with CGO_ENABLED=1 so that net.LookupIP() in the DNS server
183183
# calls the native resolver library and not the simplistic version in the Go library.
184184
$(ENVS_$@) $(GO_BUILD) -o $@ ./cmd/limactl
185+
ifeq ($(GOOS),darwin)
186+
codesign -f -v --entitlements vz.entitlements -s - $@
187+
endif
185188

186189
LIMA_CMDS = lima lima$(bat)
187190
lima: $(addprefix _output/bin/,$(LIMA_CMDS))
@@ -412,9 +415,9 @@ artifacts-misc: | _artifacts
412415
$(TAR) -czf _artifacts/lima-$(VERSION_TRIMMED)-go-mod-vendor.tar.gz go.mod go.sum vendor
413416

414417
.PHONY: codesign
415-
codesign:
418+
codesign: _output/bin/limactl
416419
ifeq ($(GOOS),darwin)
417-
codesign --entitlements vz.entitlements -s - ./_output/bin/limactl
420+
codesign --entitlements vz.entitlements -s - $<
418421
endif
419422

420423
# This target must be placed after any changes to the `MKDIR_TARGETS` variable.

0 commit comments

Comments
 (0)