File: build-lib

package info (click to toggle)
libhat-trie 0.1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 260 kB
  • sloc: ansic: 2,345; makefile: 39; sh: 17
file content (27 lines) | stat: -rwxr-xr-x 707 bytes parent folder | download | duplicates (4)
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
#!/bin/sh
# autopkgtest check: Build and run test tools against libhat-trie
# Author: Sascha Steinbiss <satta@debian.org>
set -e

TSRC=$(pwd)/test
SRC=$(pwd)/src
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR

# copy sources
cp -r $TSRC/* .
cp $SRC/misc.* .

# adjust include paths to system wide variant
sed -i 's/..\/src/hat-trie/g' *.c
sed -i 's/common.h/hat-trie\/common.h/g' *.h
sed -i 's/misc.h/hat-trie\/misc.h/g' *.h

# build and run tests
gcc -o check_ahtable check_ahtable.c str_map.c -lhat-trie
./check_ahtable
gcc -o check_hattrie check_hattrie.c str_map.c -lhat-trie
./check_hattrie
gcc -o bench_sorted_iter bench_sorted_iter.c -lhat-trie
./bench_sorted_iter