From 5c38560d8f1bfe2bb9ee60e237466f8620e0d806 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 12 Aug 2019 11:51:51 +0200 Subject: build.ninja.j2: More template variables. --- src/ee/tools/templates/build.ninja.j2 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2 index 4817b7b..14be26c 100644 --- a/src/ee/tools/templates/build.ninja.j2 +++ b/src/ee/tools/templates/build.ninja.j2 @@ -4,6 +4,7 @@ uuid = {{ project.uuid }} public_dir = {{ project.public_dir }} report_dir = {{ project.report_dir }} orders_dir = {{ project.orders_dir }} +souffle_src = {{ souffle_ee_src }} {%- if sch is defined %} sch = {{ sch | ninja_path }} sch_files = {{ sch_files | ninja_path }} @@ -40,7 +41,7 @@ rule souffle -F $work/in -D $work/out $ --no-warn $ -I $work $ - -I "{{ souffle_ee_src }}" $in + -I $souffle_src $in rule part-apply-souffle-post command = $ee part-apply-souffle-post {{ log }} --in $in_sch --out $out --work $work @@ -104,9 +105,9 @@ build $public_dir/sch.xml: part-apply-function $public_dir/kicad/sch.xml build $public_dir/kicad/souffle/facts.dl: part-apply-souffle-pre $public_dir/kicad/sch.xml work = $public_dir/kicad/souffle -build $public_dir/kicad/souffle/out/fact.csv: souffle {{ kicad_souffle_dl if kicad_souffle_dl else souffle_ee_src + "/kicad.dl" }} | $public_dir/kicad/souffle/facts.dl +build $public_dir/kicad/souffle/out/fact.csv: souffle {{ kicad_souffle_dl if kicad_souffle_dl else "$souffle_src/kicad.dl" }} | $public_dir/kicad/souffle/facts.dl work = $public_dir/kicad/souffle -{#- includes = {{ (souffle_ee_src + "/kicad.dl") if kicad_souffle_dl else "" }}#} +{#- includes = {{ ("$souffle_src/kicad.dl") if kicad_souffle_dl else "" }}#} build $public_dir/sch.xml: part-apply-souffle-post $public_dir/kicad/souffle/out/fact.csv in_sch = $public_dir/kicad/sch.xml @@ -147,7 +148,7 @@ build $public_dir/{{ s.key }}/parts.xml: part-apply-function $public_dir/{{ s.ke build $public_dir/{{ s.key }}/souffle/facts.dl: part-apply-souffle-pre $public_dir/{{ s.key }}/downloaded.xml work = $public_dir/{{ s.key }}/souffle -{%- set main=souffle_ee_src + "/" + s.key + ".dl" %} +{%- set main="$souffle_src/" + s.key + ".dl" %} {%- set alt="$public_dir/custom/" + s.key + "-souffle.dl" %} build $public_dir/{{ s.key }}/souffle/out/fact.csv: souffle {{ alt if is_file(alt) else main }} | {{ main }} $public_dir/{{ s.key }}/souffle/facts.dl work = $public_dir/{{ s.key }}/souffle -- cgit v1.2.3