File: compile-example-testcwidget

package info (click to toggle)
cwidget 0.5.18-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 3,624 kB
  • sloc: cpp: 15,709; sh: 4,834; makefile: 224; sed: 16; perl: 15
file content (26 lines) | stat: -rw-r--r-- 605 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

# Author: Manuel A. Fernandez Montecelo <mafm@debian.org>
#
# autopkgtest check: Build and run a program against the library, to verify that
# the headers and pkg-config file are installed correctly


set -e

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR

SRCFILE=testcwidget.cc
BINFILE=testcwidget

cp /usr/share/doc/libcwidget-dev/examples/$SRCFILE .

g++ -o $BINFILE $SRCFILE `pkg-config --cflags --libs cwidget` -I /usr/include/cwidget
echo "build: OK"

[ -x $BINFILE ]
# interactive, cannot invoke and close from command line
#./$BINFILE
echo "run: OK"