mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-03 01:32:33 +00:00
Smarter autogen.sh script.
This commit is contained in:
parent
d140427a90
commit
0aa0a0667f
25
autogen.sh
25
autogen.sh
@ -1,12 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
cwd="$PWD"
|
||||||
|
bs_dir="$(dirname $(readlink -f $0))"
|
||||||
|
rm -rf "${bs_dir}"/autom4te.cache
|
||||||
|
rm -f "${bs_dir}"/aclocal.m4 "${bs_dir}"/ltmain.sh
|
||||||
|
|
||||||
# You need autoconf 2.5x, preferably 2.57 or later
|
echo 'Running autoreconf -if...'
|
||||||
# You need automake 1.7 or later. 1.6 might work.
|
autoreconf -if || exit 1
|
||||||
|
if test -z "$NOCONFIGURE" ; then
|
||||||
set -e
|
echo 'Configuring...'
|
||||||
|
cd "${bs_dir}" &> /dev/null
|
||||||
aclocal -I m4
|
test "$?" = "0" || e=1
|
||||||
autoheader
|
test "$cwd" != "$bs_dir" && cd "$bs_dir" &> /dev/null
|
||||||
automake --add-missing --copy
|
./configure $@
|
||||||
autoconf
|
test "$e" = "1" && exit 1
|
||||||
|
cd "$cwd"
|
||||||
|
fi
|
||||||
|
@ -81,9 +81,9 @@ case $dirmode in
|
|||||||
echo "mkdir -p -- $*"
|
echo "mkdir -p -- $*"
|
||||||
exec mkdir -p -- "$@"
|
exec mkdir -p -- "$@"
|
||||||
else
|
else
|
||||||
# On NextStep and OpenStep, the `mkdir' command does not
|
# On NextStep and OpenStep, the 'mkdir' command does not
|
||||||
# recognize any option. It will interpret all options as
|
# recognize any option. It will interpret all options as
|
||||||
# directories to create, and then abort because `.' already
|
# directories to create, and then abort because '.' already
|
||||||
# exists.
|
# exists.
|
||||||
test -d ./-p && rmdir ./-p
|
test -d ./-p && rmdir ./-p
|
||||||
test -d ./--version && rmdir ./--version
|
test -d ./--version && rmdir ./--version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user