@@ -112,7 +112,8 @@ help-targets:
112112 @echo ' - limactl : Build limactl, and lima'
113113 @echo ' - lima : Copy lima, and lima.bat'
114114 @echo ' - helpers : Copy nerdctl.lima, apptainer.lima, docker.lima, podman.lima, and kubectl.lima'
115- # TODO: move CLI plugins to _output/libexec/lima/
115+ @echo
116+ @echo ' Targets for files in _output/libexec/lima/:'
116117 @echo ' - limactl-plugins : Build limactl-* CLI plugins'
117118 @echo
118119 @echo ' Targets for files in _output/share/lima/:'
@@ -282,25 +283,26 @@ ifeq ($(GOOS),darwin)
282283 codesign -f -v --entitlements vz.entitlements -s - $@
283284endif
284285
285- limactl-plugins : _output/bin/limactl-mcp $( exe )
286+ LIBEXEC_LIMA := _output/libexec/lima
286287
287- _output/bin/limactl-mcp$(exe ) : $(call dependencies_for_cmd,limactl-mcp) $$(call force_build,$$@ )
288- $(ENVS_$@ ) $(GO_BUILD ) -o $@ ./cmd/limactl-mcp
288+ limactl-plugins : $(LIBEXEC_LIMA ) /limactl-mcp$(exe )
289289
290- DRIVER_INSTALL_DIR := _output/libexec/lima
290+ $(LIBEXEC_LIMA ) /limactl-mcp$(exe ) : $(call dependencies_for_cmd,limactl-mcp) $$(call force_build,$$@ )
291+ @mkdir -p $(LIBEXEC_LIMA )
292+ $(ENVS_$@ ) $(GO_BUILD ) -o $@ ./cmd/limactl-mcp
291293
292294.PHONY : additional-drivers
293295additional-drivers :
294- @mkdir -p $(DRIVER_INSTALL_DIR )
296+ @mkdir -p $(LIBEXEC_LIMA )
295297 @for drv in $(ADDITIONAL_DRIVERS ) ; do \
296298 echo " Building $$ drv as external" ; \
297299 if [ " $( GOOS) " = " windows" ]; then \
298- $(GO_BUILD ) -o $(DRIVER_INSTALL_DIR ) /lima-driver-$$ drv.exe ./cmd/lima-driver-$$ drv; \
300+ $(GO_BUILD ) -o $(LIBEXEC_LIMA ) /lima-driver-$$ drv.exe ./cmd/lima-driver-$$ drv; \
299301 else \
300- $(GO_BUILD ) -o $(DRIVER_INSTALL_DIR ) /lima-driver-$$ drv ./cmd/lima-driver-$$ drv; \
302+ $(GO_BUILD ) -o $(LIBEXEC_LIMA ) /lima-driver-$$ drv ./cmd/lima-driver-$$ drv; \
301303 fi ; \
302304 if [ " $$ drv" = " vz" ] && [ " $( GOOS) " = " darwin" ]; then \
303- codesign -f -v --entitlements vz.entitlements -s - $(DRIVER_INSTALL_DIR ) /lima-driver-vz; \
305+ codesign -f -v --entitlements vz.entitlements -s - $(LIBEXEC_LIMA ) /lima-driver-vz; \
304306 fi ; \
305307 done
306308
@@ -523,7 +525,6 @@ uninstall:
523525 " $( DEST) /bin/lima" \
524526 " $( DEST) /bin/lima$( bat) " \
525527 " $( DEST) /bin/limactl$( exe) " \
526- " $( DEST) /bin/limactl-mcp$( exe) " \
527528 " $( DEST) /bin/nerdctl.lima" \
528529 " $( DEST) /bin/apptainer.lima" \
529530 " $( DEST) /bin/docker.lima" \
@@ -533,6 +534,7 @@ uninstall:
533534 " $( DEST) /share/man/man1/limactl" * " .1" \
534535 " $( DEST) /share/lima" \
535536 " $( DEST) /share/doc/lima" \
537+ " $( DEST) /libexec/lima/limactl-mcp$( exe) " \
536538 " $( DEST) /libexec/lima/lima-driver-qemu$( exe) " \
537539 " $( DEST) /libexec/lima/lima-driver-vz$( exe) " \
538540 " $( DEST) /libexec/lima/lima-driver-wsl2$( exe) "
0 commit comments