File shared.diff of Package ohcount
---
build | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
Index: ohcount/build
===================================================================
--- ohcount.orig/build
+++ ohcount/build
@@ -19,8 +19,10 @@ then
# You shouldn't have to change the following.
CFLAGS="-O3 $CFLAGS"
WARN="-Wall -Wno-pointer-to-int-cast -Wno-parentheses"
- SHARED=-shared
+ SHARED="-shared $SHARED"
+ if [ -z "$SHARED_NAME" ]; then
SHARED_NAME=libohcount.so
+ fi
RB_SHARED=-shared
RB_SHARED_NAME=ohcount.so
else
@@ -86,17 +88,16 @@ build_shared()
! -z `find src/*.{h,c} -newer src/$SHARED_NAME` ]]
then
echo "Building shared library"
- sh -c "$cc $SHARED $files -o src/$SHARED_NAME" || exit 1
+ sh -c "$cc $SHARED $files -o src/$SHARED_NAME -lpcre -lmagic" || exit 1
fi
}
build_ohcount()
{
- build_hash_headers
- build_parser_o
+ build_shared
echo "Building Ohcount"
mkdir -p bin/
- sh -c "$cc src/ohcount.c $files -o bin/ohcount -lpcre -lmagic" || exit 1
+ sh -c "$cc src/ohcount.c -o bin/ohcount -Lsrc -lohcount -lpcre -lmagic" || exit 1
}
build_test_suite()
@@ -119,10 +120,9 @@ build_ruby_bindings()
echo "Generating Ruby bindings for $arch"
sh -c "swig -ruby -o ruby/ohcount_wrap.c ruby/ohcount.i" || exit 1
mkdir -p ruby/$arch
- sh -c "$cc $RB_SHARED ruby/ohcount_wrap.c $files -o ruby/$arch/$RB_SHARED_NAME \
+ sh -c "$cc $RB_SHARED ruby/ohcount_wrap.c -o ruby/$arch/$RB_SHARED_NAME \
-I`ruby -rmkmf -e 'print Config::expand(CONFIG["archdir"])'` \
- -lpcre -lmagic" || exit 1
- sh -c "cd test/unit/ruby && ruby ruby_test.rb" || exit 1
+ -Lsrc -lohcount" || exit 1
}
if [ $# -eq 0 ] || [ $1 == "all" ]