diff options
Diffstat (limited to 'src/Makefile.test.include')
-rw-r--r-- | src/Makefile.test.include | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Makefile.test.include b/src/Makefile.test.include index b4ca01b1fe..f3fc6c706b 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -53,7 +53,8 @@ JSON_TEST_FILES = \ test/data/tx_invalid.json \ test/data/tx_valid.json -RAW_TEST_FILES = +RAW_TEST_FILES = \ + test/data/asmap.raw GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h) @@ -429,3 +430,12 @@ endif echo "};};"; \ } > "$@.new" && mv -f "$@.new" "$@" @echo "Generated $@" + +%.raw.h: %.raw + @$(MKDIR_P) $(@D) + @{ \ + echo "static unsigned const char $(*F)_raw[] = {" && \ + $(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \ + echo "};"; \ + } > "$@.new" && mv -f "$@.new" "$@" + @echo "Generated $@" |