]> git.lyx.org Git - lyx.git/blob - 3rdparty/boost/extract.sh
Reduce the amount of needed boost headers
[lyx.git] / 3rdparty / boost / extract.sh
1 #!/bin/bash
2
3 #
4 # Script to extract only needed boost files using the bcp tool:
5 #
6 # http://www.boost.org/doc/libs/1_47_0/tools/bcp/doc/html/index.html
7 #
8 # Does also work with an outdated bcp version
9 #
10 # Usage: extract.sh <path to new boost version>
11 #
12
13 if [ -z $1 ]
14 then
15     echo "Usage: extract.sh <path to new boost version>"
16     exit 1
17 fi
18
19 rm -rf needed
20 mkdir needed
21
22 bcp --boost=$1 \
23         boost/any.hpp \
24         boost/assert.hpp \
25         boost/crc.hpp \
26         boost/lexical_cast.hpp \
27         boost/signals2/signal.hpp \
28         \
29         needed
30
31
32 # we do not use the provided MSVC project files
33 find needed -name '*.vcpro*' | xargs rm
34
35 find boost -name \*.hpp | xargs rm
36 #find libs  -name \*.cpp | xargs rm
37
38 cp -vR needed/boost .
39 #cp -vR needed/libs .
40
41 rm -rf needed
42
43 # found by bcp but not needed by us
44 rm -rf boost/typeof
45 rm -rf libs/config
46 rm -rf libs/smart_ptr
47