Skip to content

Commit

Permalink
Simplify autogen
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ejohnstown committed Jan 15, 2025
1 parent a2ed75e commit 2b28255
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 121 deletions.
46 changes: 1 addition & 45 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
42 changes: 0 additions & 42 deletions scripts/commit-tests.sh

This file was deleted.

34 changes: 0 additions & 34 deletions scripts/pre-commit.sh

This file was deleted.

0 comments on commit 2b28255

Please sign in to comment.