aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.test.include
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile.test.include')
-rw-r--r--src/Makefile.test.include16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 4a70b0f9e9..14288ee218 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -85,3 +85,19 @@ bitcoin_test_check: $(TEST_BINARY) FORCE
bitcoin_test_clean : FORCE
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
+
+%.json.h: %.json
+ @$(MKDIR_P) $(@D)
+ @echo "namespace json_tests{" > $@
+ @echo "static unsigned const char $(*F)[] = {" >> $@
+ @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@
+ @echo "};};" >> $@
+ @echo "Generated $@"
+
+%.raw.h: %.raw
+ @$(MKDIR_P) $(@D)
+ @echo "namespace alert_tests{" > $@
+ @echo "static unsigned const char $(*F)[] = {" >> $@
+ @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@
+ @echo "};};" >> $@
+ @echo "Generated $@"