diff options
-rw-r--r-- | gnu-taler-error-codes/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu-taler-error-codes/Makefile b/gnu-taler-error-codes/Makefile index 6f3fbf7..e2faf3a 100644 --- a/gnu-taler-error-codes/Makefile +++ b/gnu-taler-error-codes/Makefile | |||
@@ -2,7 +2,9 @@ FILES=taler_error_codes.h \ | |||
2 | taler_error_codes.c \ | 2 | taler_error_codes.c \ |
3 | taler_error_codes.ts \ | 3 | taler_error_codes.ts \ |
4 | taler_error_codes.kt | 4 | taler_error_codes.kt |
5 | |||
5 | all: check $(FILES) | 6 | all: check $(FILES) |
7 | |||
6 | check: registry.rec | 8 | check: registry.rec |
7 | recfix --check registry.rec | 9 | recfix --check registry.rec |
8 | 10 | ||
@@ -15,8 +17,13 @@ clean: | |||
15 | prep: | 17 | prep: |
16 | cd ../http-status-codes; make ; cd - | 18 | cd ../http-status-codes; make ; cd - |
17 | 19 | ||
20 | # Because prep is phony, this rule always triggers. To avoid | ||
21 | # combined.tmp cascading into triggering the other rules even | ||
22 | # if nothing changed, we use 'diff' to make sure that 'recsel' | ||
23 | # actually changed the result. | ||
18 | combined.tmp: registry.rec prep | 24 | combined.tmp: registry.rec prep |
19 | recsel -t TalerErrorCode -j HttpStatus -p Description,Name,Value,HttpStatus,HttpStatus.Value,HttpStatus.Identifier ../http-status-codes/registry.rec registry.rec > $@ | 25 | recsel -t TalerErrorCode -j HttpStatus -p Description,Name,Value,HttpStatus,HttpStatus.Value,HttpStatus.Identifier ../http-status-codes/registry.rec registry.rec > combined.xtmp |
26 | if ! diff $@ combined.xtmp; then mv combined.xtmp $@; else rm combined.xtmp; fi | ||
20 | 27 | ||
21 | combined-escaped.tmp: combined.tmp | 28 | combined-escaped.tmp: combined.tmp |
22 | sed 's/"/\\"/g' $^ > $@ | 29 | sed 's/"/\\"/g' $^ > $@ |