File: Makefile

package info (click to toggle)
sqlite3-pcre2 0.1.1~git20220105-e3e02a4a-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 144 kB
  • sloc: sh: 193; ansic: 134; sql: 103; makefile: 58
file content (44 lines) | stat: -rw-r--r-- 1,091 bytes parent folder | download
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
VERSION=0.1.1
CC=cc
PLANTUML=plantuml
INSTALL=install
MY_CFLAGS=$(shell pkg-config --cflags sqlite3) $(shell pcre2-config --cflags) -fPIC
LIBS=$(shell pcre2-config --libs8)
prefix=/usr

.PHONY : doc check install dist clean

pcre2.so: pcre2.c
	${CC} -shared -o $@ ${CFLAGS} ${MY_CFLAGS} -W -Werror $^ ${LIBS} ${LDFLAGS}


doc: test/50-run.svg


%.svg: %.puml
	${PLANTUML} -tsvg $<

# Generate the test spec
test/db.sqlite3: test/10-init/*.sql
	cat $^ | sqlite3 test/db.sqlite3

# Run the test execution
test/50-run.phony: test/db.sqlite3 test/50-run.sh pcre2.so test/lib.sh
	# sqlite3 -cmd '.load ./pcre2' test/db.sqlite3 .selftest
	test/50-run.sh test/db.sqlite3 './pcre2'
	touch $@

# Run the test report commands
check: test/50-run.phony test/70-print-summary.sh
	test/70-print-summary.sh

install: pcre2.so
	sudo ${INSTALL} -p $^ ${prefix}/lib/sqlite3/pcre2.so

dist: clean
	mkdir sqlite3-pcre2-${VERSION}
	cp -f pcre2.c Makefile readme.txt sqlite3-pcre2-${VERSION}
	tar -czf sqlite3-pcre2-${VERSION}.tar.gz sqlite3-pcre2-${VERSION}

clean:
	-rm -f pcre2.so test/db.sqlite3 test/*.phony