aboutsummaryrefslogtreecommitdiff
path: root/gnu-taler-error-codes/Makefile
blob: 6f3fbf74d704dd87244b152bb47ca32b0d294694 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FILES=taler_error_codes.h \
  taler_error_codes.c \
  taler_error_codes.ts \
  taler_error_codes.kt
all: check $(FILES)
check: registry.rec
	recfix --check registry.rec

distclean:
	rm -f *.tmp

clean:
	rm -f $(FILES) *.tmp

prep:
	cd ../http-status-codes; make ; cd -

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 > $@

taler_error_codes.ts: ts.header taler_error_codes.ts.tmp ts.footer
	cat $^ > $@

taler_error_codes.kt.tmp: combined.tmp kt.template
	../format.sh kt.template < combined.tmp > $@

taler_error_codes.kt: kt.header taler_error_codes.kt.tmp kt.footer
	cat $^ > $@


.PHONY: check clean distclean prep