File: make-check-dev

package info (click to toggle)
primecount 7.16%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,724 kB
  • sloc: cpp: 18,769; ansic: 102; makefile: 89; sh: 86
file content (50 lines) | stat: -rwxr-xr-x 997 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
# autopkgtest check based on upstream cmake test ($ make test)
set -ue

mkdir -p $AUTOPKGTEST_TMP/tests
mkdir -p $AUTOPKGTEST_TMP/include

for h in include/*.h include/*.hpp ; do
	case ${h#include/} in
		primecount.h|primecount.hpp)
			;;
		*)
			cp -vpd -t $AUTOPKGTEST_TMP/include ${h}
			;;
	esac
done

##cp -vpd -t $AUTOPKGTEST_TMP/tests test/*.c
cp -vpd -t $AUTOPKGTEST_TMP/tests test/*.cpp

cd $AUTOPKGTEST_TMP

cat > $AUTOPKGTEST_TMP/tests/GNUmakefile << EOF
#!/usr/bin/make -f

PROGRAMS = \
	\$(patsubst %.c,%,\$(wildcard *.c)) \
	\$(patsubst %.cpp,%,\$(wildcard *.cpp) )

default: all

##CFLAGS = \$(shell pkg-config primecount --cflags)
CXXFLAGS = -I../include \$(shell pkg-config primecount --cflags)
LDLIBS = \$(shell pkg-config primecount primesieve --libs) ##-pthread

all: build

build: \$(PROGRAMS)

check: build
	\$(foreach tst, \$(PROGRAMS), echo "+-+-+-+ \$(tst) +-+-+-+" ; ./\$(tst) ; )

clean:
	\$(RM) \$(PROGRAMS)

EOF

make -C $AUTOPKGTEST_TMP/tests check

exit 0