Skip to content

Commit ea7cf13

Browse files
authored
Merge pull request #396 from dgarske/autogen
Cleanups for autogen.sh
2 parents bcf2647 + c96ffb9 commit ea7cf13

File tree

1 file changed

+3
-25
lines changed

1 file changed

+3
-25
lines changed

autogen.sh

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,6 @@ if [ -n "$WSL_DISTRO_NAME" ]; then
1818
fi
1919
fi
2020

21-
# Git hooks should come before autoreconf.
22-
if test -d .git; then
23-
if [ -n "$no_links" ]; then
24-
echo "Linux ln does not work on shared Windows file system in WSL."
25-
if [ ! -e .git/hooks/pre-commit ]; then
26-
echo "The pre-commit.sh file will not be copied to .git/hooks/pre-commit"
27-
# shell scripts do not work on Windows; TODO create equivalent batch file
28-
# cp ./pre-commit.sh .git/hooks/pre-commit || exit $?
29-
fi
30-
if [ ! -e .git/hooks/pre-push ]; then
31-
echo "The pre-push.sh file will not be copied to .git/hooks/pre-commit"
32-
# shell scripts do not work on Windows; TODO create equivalent batch file
33-
# cp ./pre-push.sh .git/hooks/pre-push || exit $?
34-
fi
35-
else
36-
if ! test -d .git/hooks; then
37-
mkdir .git/hooks
38-
fi
39-
ln -s -f ../../pre-commit.sh .git/hooks/pre-commit
40-
fi
41-
fi
42-
4321
# if get an error about libtool not setup
4422
# " error: Libtool library used but 'LIBTOOL' is undefined
4523
# The usual way to define 'LIBTOOL' is to add 'LT_INIT' "
@@ -63,10 +41,10 @@ fi
6341

6442

6543
# If this is a source checkout then call autoreconf with error as well
66-
if test -d .git; then
67-
WARNINGS="all,error"
44+
if [ -e .git ]; then
45+
export WARNINGS="all,error"
6846
else
69-
WARNINGS="all"
47+
export WARNINGS="all"
7048
fi
7149

7250
autoreconf --install --force --verbose

0 commit comments

Comments
 (0)