@@ -194,27 +194,29 @@ force_build = $(if $(call compare_build_vars,$(1),$(call extract_build_vars,$(1)
194
194
force : # placeholder for force build
195
195
196
196
# dependencies for limactl
197
- DEPENDENCIES_FOR_LIMACTL = $(call dependencis_for_cmd,limactl)
197
+ LIMACTL_DEPS = $(call dependencis_for_cmd,limactl)
198
198
ifeq ($(GOOS ) ,darwin)
199
- DEPENDENCIES_FOR_LIMACTL += vz.entitlements
199
+ LIMACTL_DEPS += vz.entitlements
200
200
endif
201
201
202
202
# environment variables for limactl. this variable is used for checking force build.
203
203
ENVS__output/bin/limactl$(exe) = CGO_ENABLED=1 GOOS=$(GOOS ) GOARCH=$(GOARCH ) CC=$(CC )
204
204
205
- _output/bin/limactl$(exe ) : $(DEPENDENCIES_FOR_LIMACTL ) $$(call force_build,$$@ )
205
+ _output/bin/limactl$(exe ) : $(LIMACTL_DEPS ) $$(call force_build,$$@ )
206
206
# The hostagent must be compiled with CGO_ENABLED=1 so that net.LookupIP() in the DNS server
207
207
# calls the native resolver library and not the simplistic version in the Go library.
208
208
$(ENVS_$@ ) $(GO_BUILD ) -o $@ ./cmd/limactl
209
209
ifeq ($(GOOS ) ,darwin)
210
210
codesign -f -v --entitlements vz.entitlements -s - $@
211
211
endif
212
212
213
- LIMA_CMDS = lima lima$(bat )
214
- lima : $(addprefix _output/bin/,$(LIMA_CMDS ) )
213
+ LIMA_CMDS = $(sort lima lima$(bat ) ) # $(sort ...) deduplicates the list
214
+ LIMA_DEPS = $(addprefix _output/bin/,$(LIMA_CMDS ) )
215
+ lima : $(LIMA_DEPS )
215
216
216
217
HELPER_CMDS = nerdctl.lima apptainer.lima docker.lima podman.lima kubectl.lima
217
- helpers : $(addprefix _output/bin/,$(HELPER_CMDS ) )
218
+ HELPERS_DEPS = $(addprefix _output/bin/,$(HELPER_CMDS ) )
219
+ helpers : $(HELPERS_DEPS )
218
220
219
221
_output/bin/% : ./cmd/% | _output/bin
220
222
cp -a $< $@
@@ -462,11 +464,17 @@ ARTIFACT_PATH_COMMON = _artifacts/lima-$(VERSION_TRIMMED)-$(ARTIFACT_OS)-$(ARTIF
462
464
463
465
artifact : $(addprefix $(ARTIFACT_PATH_COMMON ) ,$(ARTIFACT_FILE_EXTENSIONS ) )
464
466
467
+ ARTIFACT_DES = _output/bin/limactl$(exe ) $(LIMA_DEPS ) $(HELPERS_DEPS ) \
468
+ $(NATIVE_GUESTAGENT ) $(ADDITIONAL_GUESTAGENTS ) \
469
+ $(TEMPLATES ) $(TEMPLATE_EXPERIMENTALS ) _output/share/lima/examples \
470
+ $(DOCUMENTATION ) _output/share/doc/lima/templates _output/share/doc/lima/examples \
471
+ _output/share/man/man1/limactl.1
472
+
465
473
# file targets
466
- $(ARTIFACT_PATH_COMMON ) .tar.gz : binaries | _artifacts
474
+ $(ARTIFACT_PATH_COMMON ) .tar.gz : $( ARTIFACT_DES ) | _artifacts
467
475
$(TAR ) -C _output/ --no-xattrs -czvf $@ ./
468
476
469
- $(ARTIFACT_PATH_COMMON ) .zip : binaries | _artifacts
477
+ $(ARTIFACT_PATH_COMMON ) .zip : $( ARTIFACT_DES ) | _artifacts
470
478
cd _output && $(ZIP ) -r ../$@ *
471
479
472
480
# generate manpages using native limactl.
0 commit comments