{#- OZI 0.1
# ozi/templates/new_child.j2
# SPDX-License-Identifier: Unlicense
-#}
{%- if project.fix == 'source' %}
{%- set folder = project.name|underscorify|lower %}
{%- elif project.fix == 'test' %}
{%- set folder = 'tests' %}
{%- elif project.fix == 'root' %}
{%- set folder = '.' %}
{%- endif %}
{{ '# OZI ' ~ spec.version }} meson.build:{{ project.fix }}_child_{{ parent }}
{%- for line in project.copyright_head.split('\n') %}
{{ '# ' ~ line }}
{%- endfor %}
{{ '# DO NOT EDIT BY HAND - This file was generated for use with OZI tools.' }}
{{ '# ozi-fix -> meson rewrite is the standard editing pipeline.' }}
{{ project.fix }}_{{ parent }}_files = ['ozi.phony'{%- if project.fix == 'source' %}, '__init__.py'{% endif %}]
foreach file: {{ project.fix }}_{{ parent }}_files
    if file != 'ozi.phony'
        fs.copyfile(file)
        if not meson.is_subproject() or get_option('install-subprojects').enabled()
            python.install_sources(file, subdir: '{{ folder }}' / '{{ parent }}')
        endif
    endif
endforeach
if false
    executable('{{ project.fix }}_{{ parent }}_files', {{ project.fix }}_{{ parent }}_files)
endif
{{ project.fix }}_{{ parent }}_children = ['ozi.phony']
foreach child: {{ project.fix }}_{{ parent }}_children
    if child != 'ozi.phony'
        subdir(child)
    endif
endforeach
if false
    executable('{{ project.fix }}_{{ parent }}_children', {{ project.fix }}_{{ parent }}_children)
endif