Skip to content

Commit

Permalink
[Imp] build: Autotools: Support running autoconfiscate on BSD system.
Browse files Browse the repository at this point in the history
git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@20494 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
manxorist committed Apr 4, 2024
1 parent a2e7080 commit b7924bf
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions build/autotools/autoconfiscate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@ set -e
# checkout. The invests no effort in verifying this precondition.
#

echo "Detecting OS ..."
UNAME_S="$(uname -s)"
if [[ $UNAME_S == *"BSD"* ]]; then
MAKE=gmake
else
MAKE=make
fi

echo "Gathering version ..."
. libopenmpt/libopenmpt_version.mk

echo "Cleaning local build ..."
make clean
$MAKE clean

echo "Cleaning dist-autotools.tar ..."
rm -rf bin/dist-autotools.tar || true
Expand Down Expand Up @@ -188,14 +196,14 @@ echo " BUILD_SVNVERSION=${BUILD_SVNVERSION}"
echo " BUILD_SVNDATE=${BUILD_SVNDATE}"

echo "Building man pages ..."
make bin/openmpt123.1
$MAKE bin/openmpt123.1

echo "Copying man pages ..."
mkdir bin/dist-autotools/man
cp bin/openmpt123.1 bin/dist-autotools/man/openmpt123.1

echo "Cleaning local buid ..."
make clean
$MAKE clean

echo "Changing to autotools package directory ..."
OLDDIR="$(pwd)"
Expand Down Expand Up @@ -239,24 +247,23 @@ echo "Running './configure' ..."
./configure

echo "Running 'make dist' ..."
make dist
$MAKE dist

echo "Running 'make distcheck' ..."
#make distcheck
(
make distcheck 3>&1 1>&2 2>&3 | ( grep -v 'libtool: install: warning:' || true ) | ( grep -v 'libtool: warning: remember to run' || true ) | ( grep -v "libtool: warning: '.*la' has not been installed" || true )
$MAKE distcheck 3>&1 1>&2 2>&3 | ( grep -v 'libtool: install: warning:' || true ) | ( grep -v 'libtool: warning: remember to run' || true ) | ( grep -v "libtool: warning: '.*la' has not been installed" || true )
exit ${PIPESTATUS[0]}
) 3>&1 1>&2 2>&3

echo "Running 'make' ..."
make
$MAKE

echo "Running 'make check' ..."
make check
$MAKE check

echo "Building dist-autotools.tar ..."
cd "$OLDDIR"
MPT_LIBOPENMPT_VERSION=$(make distversion-tarball)
MPT_LIBOPENMPT_VERSION=$($MAKE distversion-tarball)
cd bin/dist-autotools
rm -rf libopenmpt
mkdir -p libopenmpt/src.autotools/$MPT_LIBOPENMPT_VERSION/
Expand Down

0 comments on commit b7924bf

Please sign in to comment.