diff options
author | Florian Dold <florian@dold.me> | 2023-07-31 10:52:34 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-07-31 10:52:34 +0200 |
commit | 3923530608d02130841f6daa2c2d07155655ac80 (patch) | |
tree | 1a17523de6ed73326dd7998b1a9764fb626a0a12 /contrib/gana-generate.sh | |
parent | dc81d01304e3cf93c4ae86ab8c11fa778aff583f (diff) | |
download | exchange-3923530608d02130841f6daa2c2d07155655ac80.tar.xz |
make sure gana files are built from pinned submodule
Previously the bootstrap script would always pull and build
from the latest gana.git master, which led to unreproducible
builds, and broke building older tags of the exchange from git when
gana did a breaking change.
Diffstat (limited to 'contrib/gana-generate.sh')
-rwxr-xr-x | contrib/gana-generate.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/contrib/gana-generate.sh b/contrib/gana-generate.sh new file mode 100755 index 000000000..4679e2003 --- /dev/null +++ b/contrib/gana-generate.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# This file is in the public domain. +# +# Helper script to recompute error codes based on submodule +# Run from exchange/ main directory. +set -eu + +domake () +{ + # $1 -- dir under contrib/ + dir="contrib/$1" + + make -C $dir +} + +ensure () +{ + # $1 -- filename + # $2 -- src dir under contrib/ + # $3 -- dst dir under ./ + fn="$1" + src="contrib/$2/$fn" + dst="./$3/$fn" + + if ! diff $src $dst > /dev/null + then + test ! -f $dst || chmod +w $dst + cp $src $dst + chmod -w $dst + fi +} + +domake gana/gnu-taler-error-codes +ensure taler_error_codes.c gana/gnu-taler-error-codes src/util +ensure taler_error_codes.h gana/gnu-taler-error-codes src/include + +domake gana/gnu-taler-db-events +ensure taler_dbevents.h gana/gnu-taler-db-events src/include + +domake sigp +ensure taler_signatures.h sigp src/include |