summaryrefslogtreecommitdiff
path: root/gnu-taler-error-codes/Makefile
diff options
context:
space:
mode:
authorJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-22 01:06:20 -0400
committerJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-22 01:06:20 -0400
commit007b2a19f8d9bdf926aa584d85beb5bdac32bf9d (patch)
treeb0a7df56e904d7547a90fe57c474510f7b4bcc44 /gnu-taler-error-codes/Makefile
parent05d427aafa7f9e637db969e4933905be2a8d9b9c (diff)
generate c function for looking up ec hints
Diffstat (limited to 'gnu-taler-error-codes/Makefile')
-rw-r--r--gnu-taler-error-codes/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/gnu-taler-error-codes/Makefile b/gnu-taler-error-codes/Makefile
index c0bb208..2837753 100644
--- a/gnu-taler-error-codes/Makefile
+++ b/gnu-taler-error-codes/Makefile
@@ -1,4 +1,5 @@
FILES=taler-error-codes.h \
+ taler-error-codes.c \
taler-error-codes.ts \
taler-error-codes.kt
all: check $(FILES)
@@ -17,12 +18,27 @@ prep:
combined.tmp: registry.rec prep
recsel -t TalerErrorCode -j HttpStatus -p Description,Name,Value,HttpStatus,HttpStatus.Value,HttpStatus.Identifier ../http-status-codes/registry.rec registry.rec > $@
+combined-escaped.tmp: combined.tmp
+ sed 's/"/\\"/g' $^ > $@
+
+length.tmp: combined.tmp
+ recsel -p "Count(Description):ECS_LENGTH" combined.tmp > $@
+
taler-error-codes.h.tmp: combined.tmp h.template
../format.sh h.template < combined.tmp > $@
taler-error-codes.h: h.header taler-error-codes.h.tmp h.footer
cat $^ > $@
+taler-error-codes.c.tmp: combined-escaped.tmp c.template
+ ../format.sh c.template < combined-escaped.tmp > $@
+
+taler-error-codes-length.c.tmp: length.tmp c-length.template
+ ../format.sh c-length.template < length.tmp > $@
+
+taler-error-codes.c: c.header taler-error-codes.c.tmp taler-error-codes-length.c.tmp c.footer
+ cat $^ > $@
+
taler-error-codes.ts.tmp: combined.tmp ts.template
../format.sh ts.template < combined.tmp > $@