lyx_mirror/3rdparty/boost/extract.sh
Jean-Marc Lasgouttes d9c39232ac Reduce the amount of needed boost headers
boost/signals2.hpp is a convenience header, it seems that
boost/signals2/signal.hpp is enough for our needs.

This allows to get rid of 6MiB of header files in 3rdparty/boost (and
probably to speed-up compilation).
2020-12-09 14:50:18 +01:00

48 lines
827 B
Bash
Executable File

#!/bin/bash
#
# Script to extract only needed boost files using the bcp tool:
#
# http://www.boost.org/doc/libs/1_47_0/tools/bcp/doc/html/index.html
#
# Does also work with an outdated bcp version
#
# Usage: extract.sh <path to new boost version>
#
if [ -z $1 ]
then
echo "Usage: extract.sh <path to new boost version>"
exit 1
fi
rm -rf needed
mkdir needed
bcp --boost=$1 \
boost/any.hpp \
boost/assert.hpp \
boost/crc.hpp \
boost/lexical_cast.hpp \
boost/signals2/signal.hpp \
\
needed
# we do not use the provided MSVC project files
find needed -name '*.vcpro*' | xargs rm
find boost -name \*.hpp | xargs rm
#find libs -name \*.cpp | xargs rm
cp -vR needed/boost .
#cp -vR needed/libs .
rm -rf needed
# found by bcp but not needed by us
rm -rf boost/typeof
rm -rf libs/config
rm -rf libs/smart_ptr