File: basicmeson

package info (click to toggle)
meson 1.10.1-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 24,696 kB
  • sloc: python: 90,629; ansic: 7,377; cpp: 2,434; f90: 482; asm: 218; sh: 143; xml: 109; java: 97; cs: 62; objc: 33; lex: 13; fortran: 12; makefile: 10; yacc: 9; javascript: 6
file content (25 lines) | stat: -rwxr-xr-x 486 bytes parent folder | download | duplicates (7)
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
#!/bin/sh

set -eu

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > meson.build
project('debian package test', 'c')
e = executable('prog', 'prog.c')
test('debtest', e)
EOF
cat <<EOF > prog.c
int main(int argc, char **argv) {
  return 0;
}
EOF
mkdir build
CC=gcc meson build
cd build
ninja test
# Test that conf tools and build regeneration works.
meson introspect . --tests > /dev/null
meson configure -Dbuildtype=debugoptimized
ninja test