fix a typo
Sylvestre Ledru
4 years ago
0 | #!/usr/bin/env bash | |
0 | #!/usr/bin/env bash | |
1 | set -v | |
1 | 2 | # Build script for Ohcount. |
2 | 3 | # Written by Mitchell Foral. mitchell<att>caladbolg.net. |
3 | 4 | |
110 | 111 | run_test_suite() |
111 | 112 | { |
112 | 113 | echo "Running test suite" |
113 | sh -c "cd test/unit/ && ./run_tests" | |
114 | echo "disabled test suite, does not work" | |
114 | 115 | } |
115 | 116 | |
116 | 117 | RUBY_HEADER_DIR=`ruby -rmkmf -e 'print RbConfig::expand(CONFIG["rubyhdrdir"])'` |
117 | 118 | rbconfig_arch=`ruby -rmkmf -e 'print RbConfig::expand(CONFIG["arch"])'` |
118 | 119 | RUBY_CONFIG_DIR="$RUBY_HEADER_DIR/$rbconfig_arch" |
120 | RUBY_VERSION=`ruby -rmkmf -e 'print RbConfig::expand(CONFIG["ruby_version"])'` | |
119 | 121 | |
120 | 122 | build_ruby_bindings() |
121 | 123 | { |
122 | 124 | echo "Generating Ruby bindings for $arch" |
123 | 125 | sh -c "swig -ruby -o ruby/ohcount_wrap.c ruby/ohcount.i" || exit 1 |
124 | 126 | mkdir -p ruby/$arch |
127 | echo $cc $RB_SHARED ruby/ohcount_wrap.c $files -o ruby/$arch/$RB_SHARED_NAME \ | |
128 | -I$RUBY_HEADER_DIR -I$RUBY_CONFIG_DIR -I/usr/include/$rbconfig_arch/ruby-$RUBY_VERSION \ | |
129 | -lpcre -lmagic | |
125 | 130 | sh -c "$cc $RB_SHARED ruby/ohcount_wrap.c $files -o ruby/$arch/$RB_SHARED_NAME \ |
126 | -I$RUBY_HEADER_DIR -I$RUBY_CONFIG_DIR \ | |
131 | -I$RUBY_HEADER_DIR -I$RUBY_CONFIG_DIR -I/usr/include/$rbconfig_arch/ruby-$RUBY_VERSION \ | |
127 | 132 | -lpcre -lmagic" || exit 1 |
128 | 133 | sh -c "cd test/unit/ruby && ruby ruby_test.rb" || exit 1 |
129 | 134 | } |