forked from mirrors/0ad
Small updates to build scripts, refs #4419.
Tweak the coverage script. Update the clean-workspaces script to be able to avoid rebuilding libraries. Differential Revision: https://code.wildfiregames.com/D2 This was SVN commit r19074.
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Run "update-workspaces.sh --coverage" (in the appropriate directory) then
|
# Run "update-workspaces.sh --coverage" (in the appropriate directory) then
|
||||||
# do "make test Collada", before running this script.
|
# do "make test Collada config=debug", before running this script.
|
||||||
# Also make sure you don't build via ccache. Also you might need a patch like
|
# Also make sure you don't build via ccache. Also you might need a patch like
|
||||||
# http://ltp.cvs.sourceforge.net/viewvc/ltp/utils/analysis/lcov/bin/lcov?r1=1.33&r2=1.34
|
# http://ltp.cvs.sourceforge.net/viewvc/ltp/utils/analysis/lcov/bin/lcov?r1=1.33&r2=1.34
|
||||||
|
|
||||||
rm -f app.info
|
rm -f app.info
|
||||||
|
|
||||||
for APPDIR in ../workspaces/gcc/obj/*; do
|
for APPDIR in ../workspaces/gcc/obj/*; do
|
||||||
lcov -d $APPDIR --zerocounters
|
lcov -d "$APPDIR" --zerocounters
|
||||||
lcov -d $APPDIR -b ../workspaces/gcc --capture --initial -o temp.info
|
lcov -d "$APPDIR" -b ../workspaces/gcc --capture --initial -o temp.info
|
||||||
if [[ -e app.info ]]; then
|
if [ -e app.info ]; then
|
||||||
lcov -a app.info -a temp.info -o app.info
|
lcov -a app.info -a temp.info -o app.info
|
||||||
else
|
else
|
||||||
mv temp.info app.info
|
mv temp.info app.info
|
||||||
@@ -20,12 +20,14 @@ done
|
|||||||
(cd ../../binaries/system/; ./test_dbg)
|
(cd ../../binaries/system/; ./test_dbg)
|
||||||
|
|
||||||
for APPDIR in ../workspaces/gcc/obj/*; do
|
for APPDIR in ../workspaces/gcc/obj/*; do
|
||||||
lcov -d $APPDIR -b ../workspaces/gcc --capture -o temp.info &&
|
lcov -d "$APPDIR" -b ../workspaces/gcc --capture -o temp.info &&
|
||||||
lcov -a app.info -a temp.info -o app.info
|
lcov -a app.info -a temp.info -o app.info
|
||||||
done
|
done
|
||||||
|
|
||||||
lcov -r app.info '/usr/*' -o app.info
|
lcov -r app.info '/usr/*' -o app.info
|
||||||
lcov -r app.info '*/libraries/*' -o app.info
|
lcov -r app.info '*/libraries/*' -o app.info
|
||||||
|
lcov -r app.info '*/third_party/*' -o app.info
|
||||||
|
|
||||||
|
rm -rf output
|
||||||
mkdir output
|
mkdir output
|
||||||
(cd output; genhtml ../app.info)
|
(cd output; genhtml ../app.info)
|
||||||
|
|||||||
@@ -11,6 +11,15 @@ case "`uname -s`" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Check the preserve-libs CL option
|
||||||
|
preserve_libs=false
|
||||||
|
|
||||||
|
for i in "$@"; do
|
||||||
|
case "$i" in
|
||||||
|
--preserve-libs ) preserve_libs=true ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
# (We don't attempt to clean up every last file here - output in
|
# (We don't attempt to clean up every last file here - output in
|
||||||
# binaries/system/ will still be there, etc. This is mostly just
|
# binaries/system/ will still be there, etc. This is mostly just
|
||||||
# to quickly fix problems in the bundled dependencies.)
|
# to quickly fix problems in the bundled dependencies.)
|
||||||
@@ -18,20 +27,20 @@ esac
|
|||||||
cd "$(dirname $0)"
|
cd "$(dirname $0)"
|
||||||
# Now in build/workspaces/ (where we assume this script resides)
|
# Now in build/workspaces/ (where we assume this script resides)
|
||||||
|
|
||||||
# We don't want to clean bundled libs on OS X
|
if [ "$preserve_libs" != "true" ]; then
|
||||||
if [ "`uname -s`" != "Darwin" ]; then
|
|
||||||
echo "Cleaning bundled third-party dependencies..."
|
echo "Cleaning bundled third-party dependencies..."
|
||||||
|
|
||||||
(cd ../../libraries/source/fcollada/src && rm -rf ./output)
|
(cd ../../libraries/source/fcollada/src && rm -rf ./output)
|
||||||
|
(cd ../../libraries/source/nvtt/src && rm -rf ./build)
|
||||||
(cd ../../libraries/source/spidermonkey && rm -f .already-built)
|
(cd ../../libraries/source/spidermonkey && rm -f .already-built)
|
||||||
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-38.0.0)
|
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-38.0.0)
|
||||||
# Still delete the directory of the previous SpiderMonkey version to
|
|
||||||
# avoid wasting disk space if people clean workspaces after updating.
|
|
||||||
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs31)
|
|
||||||
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs24)
|
|
||||||
(cd ../../libraries/source/nvtt/src && rm -rf ./build)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Still delete the directory of previous SpiderMonkey versions to
|
||||||
|
# avoid wasting disk space if people clean workspaces after updating.
|
||||||
|
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs31)
|
||||||
|
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs24)
|
||||||
|
|
||||||
(cd ../premake/premake4/build/gmake.bsd && ${MAKE} clean)
|
(cd ../premake/premake4/build/gmake.bsd && ${MAKE} clean)
|
||||||
(cd ../premake/premake4/build/gmake.macosx && ${MAKE} clean)
|
(cd ../premake/premake4/build/gmake.macosx && ${MAKE} clean)
|
||||||
(cd ../premake/premake4/build/gmake.unix && ${MAKE} clean)
|
(cd ../premake/premake4/build/gmake.unix && ${MAKE} clean)
|
||||||
|
|||||||
Reference in New Issue
Block a user