File: build

package info (click to toggle)
console-bridge 1.0.1%2Bdfsg2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 180 kB
  • sloc: cpp: 401; sh: 17; makefile: 3
file content (28 lines) | stat: -rwxr-xr-x 641 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
28
#!/bin/sh
# autopkgtest check: Build and run a program against console-bridge,
# to verify that the headers and pkg-config file are installed
# correctly
# (C) 2013 Thomas Moulard
# Author: Thomas Moulard <thomas.moulard@gmail.com>

set -e

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > consolebridgetest.cpp
#include <console_bridge/console.h>

int main()
{
    CONSOLE_BRIDGE_logInform ("test");
    return 0;
}
EOF

g++ -o consolebridgetest consolebridgetest.cpp \
    `pkg-config --cflags --libs console_bridge`
echo "build: OK"
[ -x consolebridgetest ]
./consolebridgetest
echo "run: OK"