@@ -89,7 +89,6 @@ help-targets:
8989 @echo ' - templates : Copy templates'
9090 @echo ' - template_experimentals : Copy experimental templates to experimental/'
9191 @echo ' - default_template : Copy default.yaml template'
92- @echo ' - create-examples-link : Create a symlink at ../examples pointing to templates'
9392 @echo
9493 @echo ' Targets for files in _output/share/doc/lima:'
9594 @echo ' - documentation : Copy documentation to _output/share/doc/lima'
@@ -146,7 +145,7 @@ menuconfig: Kconfig
146145# ###############################################################################
147146.PHONY : binaries
148147binaries : limactl helpers guestagents \
149- templates template_experimentals create-examples-link \
148+ templates template_experimentals \
150149 documentation create-links-in-doc-dir
151150
152151# ###############################################################################
@@ -313,8 +312,8 @@ MKDIR_TARGETS += _output/share/lima
313312
314313# ###############################################################################
315314# _output/share/lima/templates
316- TEMPLATES = $(addprefix _output/share/lima/templates/,$(filter-out experimental,$(notdir $(wildcard examples /* ) ) ) )
317- TEMPLATE_EXPERIMENTALS = $(addprefix _output/share/lima/templates/experimental/,$(notdir $(wildcard examples /experimental/* ) ) )
315+ TEMPLATES = $(addprefix _output/share/lima/templates/,$(filter-out experimental,$(notdir $(wildcard templates /* ) ) ) )
316+ TEMPLATE_EXPERIMENTALS = $(addprefix _output/share/lima/templates/experimental/,$(notdir $(wildcard templates /experimental/* ) ) )
318317
319318.PHONY : default_template templates template_experimentals
320319default_template : _output/share/lima/templates/default.yaml
@@ -325,28 +324,14 @@ $(TEMPLATES): | _output/share/lima/templates
325324$(TEMPLATE_EXPERIMENTALS ) : | _output/share/lima/templates/experimental
326325MKDIR_TARGETS += _output/share/lima/templates _output/share/lima/templates/experimental
327326
328- _output/share/lima/templates/% : examples /%
327+ _output/share/lima/templates/% : templates /%
329328 cp -aL $< $@
330329
331330# returns "force" if GOOS==windows, or GOOS!=windows and the file $(1) is not a symlink.
332331# $(1): target file
333332# On Windows, always copy to ensure the target has the same file as the source.
334333force_link = $(if $(filter windows,$(GOOS ) ) ,force,$(shell test ! -L $(1 ) && echo force) )
335334
336- # ###############################################################################
337- # _output/share/lima/examples
338- .PHONY : create-examples-link
339- create-examples-link : _output/share/lima/examples
340- _output/share/lima/examples : _output/share/lima/templates $$(call force_link,$$@ )
341- # remove the existing directory or symlink
342- rm -rf $@
343- ifneq ($(GOOS ) ,windows)
344- ln -sf templates $@
345- else
346- # copy from templates built in build process
347- cp -aL $< $@
348- endif
349-
350335# ###############################################################################
351336# _output/share/doc/lima
352337DOCUMENTATION = $(addprefix _output/share/doc/lima/,$(wildcard * .md) LICENSE SECURITY.md VERSION)
@@ -366,7 +351,7 @@ _output/share/doc/lima/%: % | _output/share/doc/lima
366351MKDIR_TARGETS += _output/share/doc/lima
367352
368353.PHONY : create-links-in-doc-dir
369- create-links-in-doc-dir : _output/share/doc/lima/templates _output/share/doc/lima/examples
354+ create-links-in-doc-dir : _output/share/doc/lima/templates
370355_output/share/doc/lima/templates : _output/share/lima/templates $$(call force_link,$$@ )
371356# remove the existing directory or symlink
372357 rm -rf $@
@@ -376,15 +361,6 @@ else
376361# copy from templates built in build process
377362 cp -aL $< $@
378363endif
379- _output/share/doc/lima/examples : _output/share/doc/lima/templates $$(call force_link,$$@ )
380- # remove the existing directory or symlink
381- rm -rf $@
382- ifneq ($(GOOS ) ,windows)
383- ln -sf templates $@
384- else
385- # copy from templates built in build process
386- cp -aL $< $@
387- endif
388364
389365# ###############################################################################
390366# returns difference between GOOS GOARCH and GOHOSTOS GOHOSTARCH.
@@ -424,12 +400,12 @@ endif
424400# ###############################################################################
425401schema-limayaml.json : _output/bin/limactl$(exe )
426402ifeq ($(native_compiling ) ,true)
427- $< generate-jsonschema --schemafile $@ examples /default.yaml
403+ $< generate-jsonschema --schemafile $@ templates /default.yaml
428404endif
429405
430406.PHONY : check-jsonschema
431407check-jsonschema : schema-limayaml.json
432- check-jsonschema --schemafile $< examples /default.yaml
408+ check-jsonschema --schemafile $< templates /default.yaml
433409
434410# ###############################################################################
435411.PHONY : diagrams
@@ -523,8 +499,8 @@ artifact: $(addprefix $(ARTIFACT_PATH_COMMON),$(ARTIFACT_FILE_EXTENSIONS))
523499
524500ARTIFACT_DES = _output/bin/limactl$(exe ) $(LIMA_DEPS ) $(HELPERS_DEPS ) \
525501 $(ALL_GUESTAGENTS ) \
526- $(TEMPLATES ) $(TEMPLATE_EXPERIMENTALS ) _output/share/lima/examples \
527- $(DOCUMENTATION ) _output/share/doc/lima/templates _output/share/doc/lima/examples \
502+ $(TEMPLATES ) $(TEMPLATE_EXPERIMENTALS ) \
503+ $(DOCUMENTATION ) _output/share/doc/lima/templates \
528504 _output/share/man/man1/limactl.1
529505
530506# file targets
0 commit comments