forked from msgpack/msgpack-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preprocess
executable file
·34 lines (30 loc) · 868 Bytes
/
preprocess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
preprocess() {
ruby -r erb -e 'puts ERB.new(ARGF.read).result' $1.erb > $1.tmp
if [ "$?" != 0 ]; then
echo ""
echo "** preprocess failed **"
echo ""
exit 1
else
mv $1.tmp $1
fi
}
if [ "$1" = "clean" ];then
rm -f src/msgpack/type/tuple.hpp
rm -f src/msgpack/type/define.hpp
rm -f src/msgpack/zone.hpp
else
preprocess src/msgpack/type/tuple.hpp
preprocess src/msgpack/type/define.hpp
preprocess src/msgpack/zone.hpp
fi
cp -f sysdep.h src/msgpack/
cp -f pack_define.h src/msgpack/
cp -f pack_template.h src/msgpack/
cp -f unpack_define.h src/msgpack/
cp -f unpack_template.h src/msgpack/
cp -f cases.mpac test/
cp -f cases_compact.mpac test/
sed -e 's/8\.00/9.00/' < msgpack_vc8.vcproj > msgpack_vc2008.vcproj
sed -e 's/9\.00/10.00/' -e 's/msgpack_vc8/msgpack_vc2008/' < msgpack_vc8.sln > msgpack_vc2008.sln