Skip to content

Commit 1bf475c

Browse files
authored
Merge pull request #4043 from norio-nomura/makefile-fix-template-subdirs
`Makefile`: Fix `templates/{_default,_images}` handling
2 parents 85e0c77 + ffe99e4 commit 1bf475c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,16 +380,20 @@ MKDIR_TARGETS += _output/share/lima
380380
################################################################################
381381
# _output/share/lima/templates
382382
TEMPLATES = $(addprefix _output/share/lima/templates/,$(filter-out experimental,$(notdir $(wildcard templates/*))))
383+
TEMPLATE_DEFAULTS = ${addprefix _output/share/lima/templates/_default/,$(notdir $(wildcard templates/_default/*))}
384+
TEMPLATE_IMAGES = $(addprefix _output/share/lima/templates/_images/,$(notdir $(wildcard templates/_images/*)))
383385
TEMPLATE_EXPERIMENTALS = $(addprefix _output/share/lima/templates/experimental/,$(notdir $(wildcard templates/experimental/*)))
384386

385387
.PHONY: default_template templates template_experimentals
386388
default_template: _output/share/lima/templates/default.yaml
387-
templates: $(TEMPLATES)
389+
templates: $(TEMPLATES) $(TEMPLATE_DEFAULTS) $(TEMPLATE_IMAGES)
388390
template_experimentals: $(TEMPLATE_EXPERIMENTALS)
389391

390392
$(TEMPLATES): | _output/share/lima/templates
393+
$(TEMPLATE_DEFAULTS): | _output/share/lima/templates/_default
394+
$(TEMPLATE_IMAGES): | _output/share/lima/templates/_images
391395
$(TEMPLATE_EXPERIMENTALS): | _output/share/lima/templates/experimental
392-
MKDIR_TARGETS += _output/share/lima/templates _output/share/lima/templates/experimental
396+
MKDIR_TARGETS += _output/share/lima/templates _output/share/lima/templates/_default _output/share/lima/templates/_images _output/share/lima/templates/experimental
393397

394398
_output/share/lima/templates/%: templates/%
395399
cp -aL $< $@

0 commit comments

Comments
 (0)