summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-22 21:25:11 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-22 21:25:11 +0200
commit7f94ca8eba780b5ffc7220c69fa4d4937287095a (patch)
tree0f696d139a0029b20e3458c402cf416e51174ffe
parent1b6eacc58bdd71efb5afc476207efcd952f959b1 (diff)
avoid gana rule cascade
-rw-r--r--gnu-taler-error-codes/Makefile9
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 \
taler_error_codes.c \
taler_error_codes.ts \
taler_error_codes.kt
+
all: check $(FILES)
+
check: registry.rec
recfix --check registry.rec
@@ -15,8 +17,13 @@ clean:
prep:
cd ../http-status-codes; make ; cd -
+# Because prep is phony, this rule always triggers. To avoid
+# combined.tmp cascading into triggering the other rules even
+# if nothing changed, we use 'diff' to make sure that 'recsel'
+# actually changed the result.
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 > $@
+ recsel -t TalerErrorCode -j HttpStatus -p Description,Name,Value,HttpStatus,HttpStatus.Value,HttpStatus.Identifier ../http-status-codes/registry.rec registry.rec > combined.xtmp
+ if ! diff $@ combined.xtmp; then mv combined.xtmp $@; else rm combined.xtmp; fi
combined-escaped.tmp: combined.tmp
sed 's/"/\\"/g' $^ > $@