File: build

package info (click to toggle)
hkl 5.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 26,708 kB
  • sloc: ansic: 56,730; haskell: 5,991; sh: 4,991; cpp: 1,854; makefile: 1,124; python: 925; xml: 76; lisp: 55
file content (32 lines) | stat: -rw-r--r-- 677 bytes parent folder | download | duplicates (5)
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
#!/bin/sh
# autopkgtest check: Build and run a program against libxml2, to verify that the
# headers and pkg-config file are installed correctly
# (C) 2012 Canonical Ltd.
# Author: Daniel Holbach <daniel.holbach@ubuntu.com>
#         Picca Frédéric-Emmnauel <picca@debian.org>

set -e

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > hkltest.c
#include <hkl.h>

int
main(void)
{
    size_t n;
    HklFactory **factory = hkl_factory_get_all(&n);

    if (factory == NULL)
        return (1);
    return (0);
}
EOF

gcc -o hkltest hkltest.c `pkg-config --cflags --libs hkl`
echo "build: OK"
[ -x hkltest ]
./hkltest
echo "run: OK"