mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
Allow for ninja files to regenerate themselves
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
ninja_required_version = 1.3
|
||||
builddir = {{ buildroot }}
|
||||
srcroot = {{ srcroot }}
|
||||
|
||||
@@ -46,9 +47,24 @@ rule lib
|
||||
description = Archiving $name
|
||||
command = $ar qcs $out $in
|
||||
|
||||
rule regen
|
||||
generator = true
|
||||
description = Regenrating build files
|
||||
command = {{ generator }} ${builddir}
|
||||
|
||||
{% for target in targets %}
|
||||
subninja {{ target }}/target.ninja
|
||||
{% endfor %}
|
||||
|
||||
build $
|
||||
{%- for buildfile in buildfiles %}
|
||||
{{ buildfile }} $
|
||||
{%- endfor %}
|
||||
: regen | $
|
||||
{%- for template in templates %}
|
||||
{{ template }} $
|
||||
{%- endfor %}
|
||||
{{ generator }}
|
||||
|
||||
# vim: et ts=4 sts=4 sw=4
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ ccflags = $ccflags $
|
||||
{% endblock %}
|
||||
|
||||
{% for source in sources %}
|
||||
build ${moddir}/{{ source.output }} : {{ source.action }} {{ source.input }}
|
||||
build ${moddir}/{{ source.output }} : {{ source.action }} {{ source.input }} || {{ buildfile }}
|
||||
name = {{ source.name }}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user