numam-spdk/autopackage.sh
Daniel Verkamp c2fdcfdd9b build: build with DEBUG=n during autopackage
Exercise both the DEBUG=y path (during autobuild) and DEBUG=n (during
autopackage).

Change-Id: Ie2f0fea42ac675cd18f49d0b3274aa2c3413b88a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-09-25 14:23:01 -07:00

42 lines
789 B
Bash
Executable File

#!/usr/bin/env bash
set -xe
DPDK_DIR=/usr/local/dpdk-2.1.0/x86_64-native-linuxapp-gcc
src=$(readlink -f $(dirname $0))
out=$PWD
MAKEFLAGS=${MAKEFLAGS:--j16}
cd $src
make clean
if [ `git status --porcelain | wc -l` -ne 0 ]; then
echo make clean left the following files:
git status --porcelain
exit 1
fi
pv=spdk-$(date +%Y_%m_%d)
find . -iname "spdk-*.tar.gz" -delete
git archive HEAD -9 --prefix=${pv}/ -o ${pv}.tar.gz
tarball=$(ls -1 spdk-*.tar.gz)
if [ $PWD != $out ]; then
mv $tarball $out/
fi
# Build from packaged source
tmpdir=$(mktemp -d)
echo "tmpdir=$tmpdir"
tar -C "$tmpdir" -xf $out/$tarball
(
cd "$tmpdir"/spdk-*
cp CONFIG CONFIG.orig
sed -e 's/CONFIG_DEBUG=y/CONFIG_DEBUG=n/' <CONFIG.orig >CONFIG
time make ${MAKEFLAGS} DPDK_DIR=$DPDK_DIR
)
rm -rf "$tmpdir"