|
1 | 1 | JSONSCHEMA ?= jsonschema |
2 | 2 | SHELLCHECK ?= shellcheck |
| 3 | +JQ ?= jq |
3 | 4 | PYTHON ?= python3 |
4 | 5 | CURL ?= curl |
5 | 6 | TAR ?= tar |
@@ -42,10 +43,32 @@ test: |
42 | 43 |
|
43 | 44 | build/iso/currency/list-%.json: scripts/xml2json.py vendor/data/iso/currency/list-%.xml |
44 | 45 | $(PYTHON) $< $(word 2,$^) $@ |
45 | | -generate-iso-currency: generate/iso/currency/main.py \ |
46 | | - build/iso/currency/list-one.json \ |
47 | | - build/iso/currency/list-three.json |
48 | | - $(PYTHON) $< |
| 46 | +schemas/iso/currency/2015/%.json: build/iso/currency/list-one.json templates/iso/currency/2015/%.jq |
| 47 | + $(MKDIRP) $(dir $@) |
| 48 | + $(JQ) --from-file $(word 2,$^) $< > $@ |
| 49 | +schemas/iso/currency/2015/historical/%.json: build/iso/currency/list-three.json templates/iso/currency/2015/historical/%.jq |
| 50 | + $(MKDIRP) $(dir $@) |
| 51 | + $(JQ) --from-file $(word 2,$^) $< > $@ |
| 52 | + |
| 53 | +generate-iso-currency: \ |
| 54 | + schemas/iso/currency/2015/alpha-code.json \ |
| 55 | + schemas/iso/currency/2015/alpha-currency.json \ |
| 56 | + schemas/iso/currency/2015/alpha-fund.json \ |
| 57 | + schemas/iso/currency/2015/alpha-precious-metal.json \ |
| 58 | + schemas/iso/currency/2015/alpha-test.json \ |
| 59 | + schemas/iso/currency/2015/alpha-unknown.json \ |
| 60 | + schemas/iso/currency/2015/numeric-code-additional.json \ |
| 61 | + schemas/iso/currency/2015/numeric-code.json \ |
| 62 | + schemas/iso/currency/2015/numeric-currency.json \ |
| 63 | + schemas/iso/currency/2015/numeric-fund.json \ |
| 64 | + schemas/iso/currency/2015/numeric-precious-metal.json \ |
| 65 | + schemas/iso/currency/2015/numeric-test.json \ |
| 66 | + schemas/iso/currency/2015/numeric-unknown.json \ |
| 67 | + schemas/iso/currency/2015/historical/alpha-code.json \ |
| 68 | + schemas/iso/currency/2015/historical/alpha-currency.json \ |
| 69 | + schemas/iso/currency/2015/historical/numeric-code.json \ |
| 70 | + schemas/iso/currency/2015/historical/numeric-currency.json |
| 71 | + |
49 | 72 | generate-iso-language: generate/iso/language/main.py |
50 | 73 | $(PYTHON) $< |
51 | 74 | generate-iso-country: generate/iso/country/main.py |
|
0 commit comments