[LTP] Out-of-tree build missing some data files.
Li Wang
liwang@redhat.com
Thu Mar 30 12:33:23 CEST 2017
Hi,
I'm trying to build ltp out of tree but failed with errors like:
=========
make[2]: Leaving directory `/root/ltp-build/testcases/lib'
make[2]: Entering directory `/root/ltp-build/testcases/open_posix_testsuite'
/root/ltp/testcases/open_posix_testsuite/Makefile:38: Makefile.linux:
No such file or directory
make[2]: *** No rule to make target `Makefile.linux'. Stop.
make[2]: Leaving directory `/root/ltp-build/testcases/open_posix_testsuite'
make[1]: *** [all] Error 2
=========
Two problems here:
1. The open_posix_testuite is also compiling in this time, but I
remember I didn't pass any parameter to config that.
2. It obviously could not build open_posix_testsuite out of tree
successfully, should we fix this for LTP?
my test script is:
$ cat build-ltp-out-of-tree.sh
#!/bin/bash
TOP=$PWD
TOP_SRCDIR=$TOP/ltp
SYSROOT=$TOP/ltp-install
TOP_BUILDDIR=$TOP/ltp-build
test -d "$TOP_BUILDDIR" || mkdir -p "$TOP_BUILDDIR"
if [ -f $TOP_SRCDIR/.git/config ]; then
echo "LOG: ltp has been cloned in $TOP_SRCDIR"
pushd $TOP_SRCDIR; git pull > /dev/null 2>&1; make autotools; popd
else
cd $TOP && git clone https://github.com/linux-test-project/ltp --depth=1
pushd $TOP_SRCDIR; make autotools; popd
fi
pushd "$TOP_BUILDDIR" && "$TOP_SRCDIR/configure"
OUT_OF_BUILD_TREE_DIR=$TOP_BUILDDIR
make \
-C "$OUT_OF_BUILD_TREE_DIR" \
-f "$TOP_SRCDIR/Makefile" \
"top_srcdir=$TOP_SRCDIR" \
"top_builddir=$OUT_OF_BUILD_TREE_DIR"
make \
-C "$OUT_OF_BUILD_TREE_DIR" \
-f "$TOP_SRCDIR/Makefile" \
"top_srcdir=$TOP_SRCDIR" \
"top_builddir=$OUT_OF_BUILD_TREE_DIR" \
"DESTDIR=$SYSROOT" \
SKIP_IDCHECK=1 install
popd
--
Regards,
Li Wang
Email: liwang@redhat.com
More information about the ltp
mailing list