forked from wolfSSL/wolfssl
autogen.sh: refactor to not disrupt modtimes of fips/async source files if they already exist. also, assert success on any file ops, and properly export WARNINGS to autoreconf.
This commit is contained in:
95
autogen.sh
95
autogen.sh
@ -4,58 +4,59 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Git hooks should come before autoreconf.
|
# Git hooks should come before autoreconf.
|
||||||
if test -d .git; then
|
if [ -d .git ]; then
|
||||||
if ! test -d .git/hooks; then
|
if [ ! -d .git/hooks ]; then
|
||||||
mkdir .git/hooks
|
mkdir .git/hooks || exit $?
|
||||||
fi
|
fi
|
||||||
if [ ! -e .git/hooks/pre-commit ]; then
|
if [ ! -e .git/hooks/pre-commit ]; then
|
||||||
ln -s ../../pre-commit.sh .git/hooks/pre-commit
|
ln -s ../../pre-commit.sh .git/hooks/pre-commit || exit $?
|
||||||
fi
|
fi
|
||||||
if [ ! -e .git/hooks/pre-push ]; then
|
if [ ! -e .git/hooks/pre-push ]; then
|
||||||
ln -s ../../pre-push.sh .git/hooks/pre-push
|
ln -s ../../pre-push.sh .git/hooks/pre-push || exit $?
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# touch options.h (make sure it exists)
|
# if and as needed, create empty dummy versions of various files, mostly
|
||||||
touch ./wolfssl/options.h
|
# associated with fips/self-test and asynccrypt:
|
||||||
|
|
||||||
# touch fips files for non fips distribution
|
for dir in \
|
||||||
touch ./ctaocrypt/src/fips.c
|
./wolfssl/wolfcrypt/port/intel \
|
||||||
touch ./ctaocrypt/src/fips_test.c
|
./wolfssl/wolfcrypt/port/cavium
|
||||||
touch ./wolfcrypt/src/fips.c
|
do
|
||||||
touch ./wolfcrypt/src/fips_test.c
|
if [ ! -e "$dir" ]; then
|
||||||
touch ./wolfcrypt/src/wolfcrypt_first.c
|
mkdir "$dir" || exit $?
|
||||||
touch ./wolfcrypt/src/wolfcrypt_last.c
|
fi
|
||||||
touch ./wolfssl/wolfcrypt/fips.h
|
done
|
||||||
|
|
||||||
# touch CAVP selftest files for non-selftest distribution
|
for file in \
|
||||||
touch ./wolfcrypt/src/selftest.c
|
./wolfssl/options.h \
|
||||||
|
./ctaocrypt/src/fips.c \
|
||||||
# touch async crypt files
|
./ctaocrypt/src/fips_test.c \
|
||||||
touch ./wolfcrypt/src/async.c
|
./wolfcrypt/src/fips.c \
|
||||||
touch ./wolfssl/wolfcrypt/async.h
|
./wolfcrypt/src/fips_test.c \
|
||||||
|
./wolfcrypt/src/wolfcrypt_first.c \
|
||||||
# touch async port files
|
./wolfcrypt/src/wolfcrypt_last.c \
|
||||||
touch ./wolfcrypt/src/port/intel/quickassist.c
|
./wolfssl/wolfcrypt/fips.h \
|
||||||
touch ./wolfcrypt/src/port/intel/quickassist_mem.c
|
./wolfcrypt/src/selftest.c \
|
||||||
touch ./wolfcrypt/src/port/cavium/cavium_nitrox.c
|
./wolfcrypt/src/async.c \
|
||||||
if [ ! -d ./wolfssl/wolfcrypt/port/intel ]; then
|
./wolfssl/wolfcrypt/async.h \
|
||||||
mkdir ./wolfssl/wolfcrypt/port/intel
|
./wolfcrypt/src/port/intel/quickassist.c \
|
||||||
fi
|
./wolfcrypt/src/port/intel/quickassist_mem.c \
|
||||||
touch ./wolfssl/wolfcrypt/port/intel/quickassist.h
|
./wolfcrypt/src/port/cavium/cavium_nitrox.c \
|
||||||
touch ./wolfssl/wolfcrypt/port/intel/quickassist_mem.h
|
./wolfssl/wolfcrypt/port/intel/quickassist.h \
|
||||||
if [ ! -d ./wolfssl/wolfcrypt/port/cavium ]; then
|
./wolfssl/wolfcrypt/port/intel/quickassist_mem.h \
|
||||||
mkdir ./wolfssl/wolfcrypt/port/cavium
|
./wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h
|
||||||
fi
|
do
|
||||||
touch ./wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h
|
if [ ! -e "$file" ]; then
|
||||||
|
> "$file" || exit $?
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# If this is a source checkout then call autoreconf with error as well
|
# If this is a source checkout then call autoreconf with error as well
|
||||||
if test -e .git; then
|
#if [ -e .git ]; then
|
||||||
WARNINGS="all,error"
|
# export WARNINGS="all,error"
|
||||||
|
#else
|
||||||
else
|
export WARNINGS="all"
|
||||||
WARNINGS="all"
|
#fi
|
||||||
fi
|
|
||||||
|
|
||||||
autoreconf --install --force --verbose
|
autoreconf --install --force --verbose
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user