forked from dimitri/pgcopydb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
83 lines (59 loc) · 1.65 KB
/
Makefile
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright (c) 2021 The PostgreSQL Global Development Group.
# Licensed under the PostgreSQL License.
TOP := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
PGCOPYDB ?= $(TOP)src/bin/pgcopydb/pgcopydb
all: bin ;
GIT-VERSION-FILE:
@$(SHELL_PATH) ./GIT-VERSION-GEN > /dev/null 2>&1
bin: GIT-VERSION-FILE
$(MAKE) -C src/bin/ all
sqlite3:
$(MAKE) -C src/bin/lib/sqlite $@
clean:
rm -f GIT-VERSION-FILE
$(MAKE) -C src/bin/ clean
maintainer-clean:
rm -f GIT-VERSION-FILE
$(MAKE) -C src/bin/ maintainer-clean
rm -f version
docs:
$(MAKE) -C docs clean man html
update-docs: bin
bash ./docs/update-help-messages.sh
check-docs:
cat Dockerfile ci/Dockerfile.docs.template > ci/Dockerfile.docs
docker build --file=ci/Dockerfile.docs --tag test-docs .
docker run test-docs
test: build
$(MAKE) -C tests all
tests: test ;
tests/ci:
sh ./ci/banned.h.sh
tests/*: build
$(MAKE) -C tests $(notdir $@)
install: bin
$(MAKE) -C src/bin/ install
indent:
citus_indent
build: version
docker build -t pgcopydb .
echo-version: GIT-VERSION-FILE
@awk '{print $$3}' $<
version: GIT-VERSION-FILE
@awk '{print $$3}' $< > $@
@cat $@
# debian packages built from the current sources
deb:
docker build -f Dockerfile.debian -t pgcopydb_debian .
debsh: deb
docker run --rm -it pgcopydb_debian bash
# debian packages built from latest tag, manually maintained in the Dockerfile
deb-qa:
docker build -f Dockerfile.debian-qa -t pgcopydb_debian_qa .
debsh-qa: deb-qa
docker run --rm -it pgcopydb_debian_qa bash
.PHONY: all
.PHONY: bin clean install docs maintainer-clean update-docs
.PHONY: test tests tests/ci tests/*
.PHONY: deb debsh deb-qa debsh-qa
.PHONY: GIT-VERSION-FILE