{% if abort_on_error %}# Set propagation of error to exit on first error
set -e
{% endif %}
ROOT="{{ root }}"
{% if compilation_mode == 'separate' %}{% for group in srcs %}{% if group.file_type != '' %}{% if source_annotations %}
{% if group.file_type == 'verilog' %}{{ vlogan_bin }} -sverilog \
-full64 \
{% for tmp_arg in vlogan_args %}{{ tmp_arg }} \
{% endfor %}{% for define in group.defines %}"+define+{{ define.0 }}{% if define.1 %}={{ define.1 }}{% endif %}" \
{% endfor %}{% for incdir in group.incdirs %}"+incdir+{{ incdir | replace(from=root, to='$ROOT') }}" \
{% endfor %}{% elif group.file_type == 'vhdl' %}{{ vhdlan_bin }} \
{% for tmp_arg in vhdlan_args %}{{ tmp_arg }} \
{% endfor %}{% endif %}{% for file in group.files %}"{{ file.file | replace(from=root, to='$ROOT') }}" {% if not loop.last %}\
{% endif %}{% endfor %}
{% endif %}{% endfor %}
{% else %}{# compilation_mode == 'common' -full64 \
{% for tmp_arg in vlogan_args %}{{ tmp_arg }} \
{% endfor %}{% for define in all_defines %}"+define+{{ define.0 }}{% if define.1 %}={{ define.1 }}{% endif %}" \
{% endfor %}{% for incdir in all_incdirs %}"+incdir+{{ incdir | replace(from=root, to='$ROOT') }}" \
{% endfor %}{% endif %}"{{ file.file | replace(from=root, to='$ROOT') }}" {% if not loop.last %}\
{% endif %}{% if loop.last %}
{% endif %}{% endfor %}
{% for file in all_vhdl %}{% if loop.first %}{{ vhdlan_bin }} \
{% for tmp_arg in vhdlan_args %}{{ tmp_arg }} \
{% endfor %}{% endif %}"{{ file.file | replace(from=root, to='$ROOT') }}" {% if not loop.last %}\
{% endif %}{% if loop.last %}
{% endif %}{% endfor %}
{% endif %}