Simplify autogen

The autogen script is doing too many things. The tests that are set up
in the git hooks are already tested by GitHub with actions on branch
push. Also they don't work if you install wolfSSL somewhere specific.
All one needs to do is run `autoreconf -ivf` to make the configure
script. This is all autogen does now, with the addition of warnings.
pull/758/head
John Safranek 2025-01-15 15:32:37 -08:00
parent a2ed75ed73
commit 2b2825560e
3 changed files with 1 additions and 121 deletions

View File

@ -2,52 +2,8 @@
#
# Create configure and makefile stuff...
# Check environment
if [ -n "$WSL_DISTRO_NAME" ]; then
# we found a non-blank WSL environment distro name
current_path="$(pwd)"
pattern="/mnt/?"
if [ "$(echo "$current_path" | grep -E "^$pattern")" ]; then
# if we are in WSL and shared Windows file system, 'ln' does not work.
no_links=true
else
no_links=
fi
fi
# Git hooks should come before autoreconf.
if [ -d .git ]; then
if [ ! -d .git/hooks ]; then
mkdir .git/hooks || exit $?
fi
if [ -n "$no_links" ]; then
echo "Linux ln does not work on shared Windows file system in WSL."
if [ ! -e .git/hooks/pre-commit ]; then
echo "The pre-commit.sh file will not be copied to .git/hooks/pre-commit"
# shell scripts do not work on Windows; TODO create equivalent batch file
# cp ./pre-commit.sh .git/hooks/pre-commit || exit $?
fi
# unlike wolfssl, wolfssh is not using pre-push.sh at this time. Enable as needed:
# if [ ! -e .git/hooks/pre-push ]; then
# echo "The pre-push.sh file will not be copied to .git/hooks/pre-commit"
# # shell scripts do not work on Windows; TODO create equivalent batch file
# # cp ./pre-push.sh .git/hooks/pre-push || exit $?
# fi
else
if [ ! -e .git/hooks/pre-commit ]; then
ln -sf ../../scripts/pre-commit.sh .git/hooks/pre-commit || exit $?
fi
# unlike wolfssl, wolfssh is not using pre-push.sh at this time Enable as needed:
# if [ ! -e .git/hooks/pre-push ]; then
# ln -s ../../pre-push.sh .git/hooks/pre-push || exit $?
# fi
fi
fi
# 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"
else
WARNINGS="all"

View File

@ -1,42 +0,0 @@
#!/bin/sh
# commit-tests.sh
# make sure current config is ok
echo "Testing current config..."
if ! make clean check
then
echo "Current config make test failed"
exit 1
fi
# make sure basic config is ok
echo "Testing basic config..."
if ! ./configure
then
echo "Basic config ./configure failed"
exit 1
fi
if ! make check
then
echo "Basic config make test failed"
exit 1
fi
# make sure the all enabled config is ok
echo "Testing enabled all config..."
if ! ./configure --enable-all
then
echo "Enabled all config ./configure failed"
exit 1
fi
if ! make check
then
echo "Enabled all config make test failed"
exit 1
fi
exit 0

View File

@ -1,34 +0,0 @@
#!/bin/sh
#
#
# Our "pre-commit" hook.
# save current config
echo "\n\nSaving current config\n\n"
cp config.status tmp.status
# stash modified files not part of this commit, don't test them
echo "\n\nStashing any modified files not part of commit\n\n"
git stash -q --keep-index
# do the commit tests
echo "\n\nRunning commit tests...\n\n"
./scripts/commit-tests.sh
RESULT=$?
# restore modified files not part of this commit
echo "\n\nPopping any stashed modified files not part of commit\n"
git stash pop -q
# restore current config
echo "\nRestoring current config\n"
mv tmp.status config.status
# don't show output incase error from above
./config.status >/dev/null 2>&1
make clean >/dev/null 2>&1
make -j 8 >/dev/null 2>&1
[ $RESULT -ne 0 ] && echo "\nOops, your commit failed\n" && exit 1
echo "\nCommit tests passed!\n"
exit 0