|
Boost : |
Subject: Re: [boost] What would make tool authors happier..
From: Robert Ramey (ramey_at_[hidden])
Date: 2015-06-03 16:46:21
I frankly don't understand why this is so hard.
Shouldn't the build/test of all of boost just be the sequence of
buid/test of each library?
In a short time I following proof of concept:
# Bash shell script - run from boost root
# set debug output
#set -x
# set extended globs
shopt -s extglob
# expand null files lists to ... null file lists
shopt -s nullglob
function walk_subdirectories () {
for dir in */
do
# drop into the directory
cd $dir >/dev/null
#if it's the subdirectory that interests us
if test ${dir%/} = "$1"
then
# invoke the requested command inside the directory
echo $PWD
echo $2
else
# check subdirectories
walk_subdirectories "$1" "$2"
fi
cd ..
done
}
Then I can run all the library build/tests with:
. build.sh
then
cd libs
walk_subdirectories test 'echo b2 ...'
cd ..
Or if I want to create test tables for all the libraries I can use
cd libs
walk_subdirectories test 'echo library_status ...'
cd ..
Of if I want to invoke the build test for the libraries which support
CMake I can
cd libs
walk_subdirectories CMake 'echo b2 ...'
cd ..
Of course to build all the tools I'd just move to another dirctory.
etc.
Note that this already handles the multi-level libraries. Also I
realize that it fails to include boost test because of a naming conflict
so let's not start spitballing this on this basis. Also note that is
this trivial to debug and fix by anyone if something fails. The same
can't be said for other boost tools.
I realize that one might not want to use shell scripts - though they
work pretty well here. If you're building this with C++ or bjam or
whatever, it shouldn't be that much more complicated than this. I can't
help but believe that all our build/test/release stuff is over engineered.
Robert Ramey
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk