File: autogen.sh

package info (click to toggle)
sockperf 3.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 1,912 kB
  • sloc: cpp: 8,092; perl: 7,225; sh: 3,254; makefile: 114; awk: 93
file content (29 lines) | stat: -rwxr-xr-x 552 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
set -ex

oldpwd=$(pwd)
topdir=$(dirname "$0")
cd "$topdir"

CURRENT_VERSION_FILE=./build/current-version
. ./build/versioning.sh
echo ${VERSION}-${RELEASE} > $CURRENT_VERSION_FILE
echo $GIT_REF >> $CURRENT_VERSION_FILE

rm -rf autom4te.cache
mkdir -p config/m4 config/aux
autoreconf -v --install || exit 1
rm -rf autom4te.cache

cd "$oldpwd"

if [ "x$1" = "xc" ]; then
	shift
	$topdir/configure CXXFLAGS='-g -O0 -Wall -Werror' $@
	make clean
else
	printf "\nNow run '$topdir/configure' and 'make'.\n\n"
fi

rm -f $CURRENT_VERSION_FILE
exit 0