aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools/templates
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-05-27 15:16:12 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-05-27 15:16:12 +0200
commitd8bb3aa6f51b331ef6ce3558707627be7a50c7ad (patch)
tree780e426f8286fe9223d1fa6235464868bbef3d7c /src/ee/tools/templates
parent94e8537430ab7496e4b8e697581d65b06cf8b979 (diff)
downloadee-python-d8bb3aa6f51b331ef6ce3558707627be7a50c7ad.tar.gz
ee-python-d8bb3aa6f51b331ef6ce3558707627be7a50c7ad.tar.bz2
ee-python-d8bb3aa6f51b331ef6ce3558707627be7a50c7ad.tar.xz
ee-python-d8bb3aa6f51b331ef6ce3558707627be7a50c7ad.zip
souffle:
o Allowing to set MPNs when importing facts. o ninja: Allowing the user to have its own datalog files under ee/custom/kicad-souffle.dl and ee/custom/$supplier-souffle.dl. make_bom: Generate per-field URIs for custom URIs. Better than making values that contain custom field name + value.
Diffstat (limited to 'src/ee/tools/templates')
-rw-r--r--src/ee/tools/templates/build.ninja.j27
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2
index 894365b..5ae6085 100644
--- a/src/ee/tools/templates/build.ninja.j2
+++ b/src/ee/tools/templates/build.ninja.j2
@@ -98,8 +98,9 @@ build ee/sch.xml: part-apply-function ee/kicad/sch.xml
build ee/kicad/souffle/facts.dl: part-apply-souffle-pre ee/kicad/sch.xml
work = ee/kicad/souffle
-build ee/kicad/souffle/out/fact.csv: souffle {{ souffle_ee_src }}/kicad.dl | ee/kicad/souffle/facts.dl
+build ee/kicad/souffle/out/fact.csv: souffle {{ kicad_souffle_dl if kicad_souffle_dl else souffle_ee_src + "/kicad.dl" }} | ee/kicad/souffle/facts.dl
work = ee/kicad/souffle
+{#- includes = {{ (souffle_ee_src + "/kicad.dl") if kicad_souffle_dl else "" }}#}
build ee/sch.xml: part-apply-souffle-post ee/kicad/souffle/out/fact.csv
in_sch = ee/kicad/sch.xml
@@ -135,7 +136,9 @@ build ee/{{ s }}/parts.xml: part-apply-function ee/{{ s }}/downloaded.xml
build ee/{{ s }}/souffle/facts.dl: part-apply-souffle-pre ee/{{ s }}/downloaded.xml
work = ee/{{ s }}/souffle
-build ee/{{ s }}/souffle/out/fact.csv: souffle {{ souffle_ee_src }}/{{ s }}.dl | ee/{{ s }}/souffle/facts.dl
+{%- set main=souffle_ee_src + "/" + s + ".dl" %}
+{%- set alt="ee/custom/" + s + "-souffle.dl" %}
+build ee/{{ s }}/souffle/out/fact.csv: souffle {{ alt if is_file(alt) else main }} | ee/{{ s }}/souffle/facts.dl
work = ee/{{ s }}/souffle
build ee/{{ s }}/parts.xml: part-apply-souffle-post ee/{{ s }}/souffle/out/fact.csv