blob: 3e91401d189911339e79aef82bc68f11da85bacd (
plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/bin/sh
# This script generates rust compatible makefiles from libuv. When upgrading
# libuv, do:
# cd $RUST_DIR
# rm -r mk/libuv
# cd $LIBUV_DIR
# git archive --prefix libuv/ $REVISION > libuv.tar.gz
# cd $RUST_DIR/src/rt
# rm -r libuv
# tar -xvf $LIBUV_DIR/libuv.tar.gz
# mkdir -p libuv/build
# svn co http://gyp.googlecode.com/svn/trunk libuv/build/gyp
# cd ../..
# ./src/etc/gyp_uv
set -e
cd `dirname $0`
cd ../..
for ARCH in ia32 x86_64
do
args="--depth . -Dlibrary=static_library -Dtarget_arch=$ARCH"
./src/libuv/build/gyp/gyp src/libuv/uv.gyp $args \
-f make-mac \
--generator-output mk/libuv/$ARCH/mac \
-DOS=mac
./src/libuv/build/gyp/gyp src/libuv/uv.gyp $args \
-f make-linux \
--generator-output mk/libuv/$ARCH/unix \
-DOS=linux
./src/libuv/build/gyp/gyp src/libuv/uv.gyp $args \
-f make-linux \
--generator-output mk/libuv/$ARCH/win \
-DOS=win
# Comment out the gyp auto regeneration
for os in mac unix win; do
sed -i \
-e 's/^\(Makefile: $(srcdir)\/src\/rt\/libuv\/uv\.gyp\)/#\1/' \
mk/libuv/$ARCH/$os/Makefile
sed -i \
-e 's/^\( $(call do_cmd,regen_makefile)\)/#\1/' \
mk/libuv/$ARCH/$os/Makefile
done
done
# On Mac, GYP hardcodes a -arch i386 into the output. Fix that.
sed -i \
-e 's/-arch i386/-arch x86_64/' \
mk/libuv/x86_64/mac/src/libuv/*.mk
|