-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
169 lines (131 loc) · 6.1 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
PWSH = pwsh
.PHONY: build
build: build-ghc-8.4 build-ghc-8.6 build-ghc-8.8 build-nightly
.PHONY: build-ghc-8.4
build-ghc-8.4: build-deps-ghc-8.4 src
stack --stack-yaml stack-ghc-8.4.yaml build --ghc-options -Werror
.PHONY: build-ghc-8.6
build-ghc-8.6: build-deps-ghc-8.6 src
stack --stack-yaml stack-ghc-8.6.yaml build --ghc-options -Werror
.PHONY: build-ghc-8.8
build-ghc-8.8: build-deps-ghc-8.8 src
stack --stack-yaml stack-ghc-8.8.yaml build --ghc-options -Werror
.PHONY: build-nightly
build-nightly: build-deps-nightly src
stack --stack-yaml stack-nightly.yaml --resolver nightly build --ghc-options -Werror
.PHONY: build-deps-ghc-8.4
build-deps-ghc-8.4: stack-ghc-8.4.yaml package.yaml
stack --stack-yaml stack-ghc-8.4.yaml build --only-dependencies
.PHONY: build-deps-ghc-8.6
build-deps-ghc-8.6: stack-ghc-8.6.yaml package.yaml
stack --stack-yaml stack-ghc-8.6.yaml build --only-dependencies
.PHONY: build-deps-ghc-8.8
build-deps-ghc-8.8: stack-ghc-8.8.yaml package.yaml
stack --stack-yaml stack-ghc-8.8.yaml build --only-dependencies
.PHONY: build-deps-nightly
build-deps-nightly: stack-nightly.yaml package.yaml
stack --stack-yaml stack-nightly.yaml --resolver nightly build --only-dependencies
.PHONY: test
test: test-ghc-8.4 test-ghc-8.6 test-ghc-8.8 test-nightly
.PHONY: test-ghc-8.4
test-ghc-8.4: test-doctest-ghc-8.4 test-original-ghc-8.4 test-hdbc-postgresql-ghc-8.4 test-relational-record-ghc-8.4
.PHONY: test-doctest-ghc-8.4
test-doctest-ghc-8.4: build-ghc-8.4
stack --stack-yaml stack-ghc-8.4.yaml build --ghc-options -Werror postgresql-pure:test:doctest
.PHONY: test-original-ghc-8.4
test-original-ghc-8.4: build-ghc-8.4
stack --stack-yaml stack-ghc-8.4.yaml build --ghc-options -Werror postgresql-pure:test:original
.PHONY: test-hdbc-postgresql-ghc-8.4
test-hdbc-postgresql-ghc-8.4: build-ghc-8.4
stack --stack-yaml stack-ghc-8.4.yaml build --ghc-options -Werror postgresql-pure:test:hdbc-postgresql
.PHONY: test-relational-record-ghc-8.4
test-relational-record-ghc-8.4: build-ghc-8.4
stack --stack-yaml stack-ghc-8.4.yaml build --ghc-options -Werror postgresql-pure:test:relational-record
.PHONY: test-ghc-8.6
test-ghc-8.6: test-doctest-ghc-8.6 test-original-ghc-8.6 test-hdbc-postgresql-ghc-8.6 test-relational-record-ghc-8.6
.PHONY: test-doctest-ghc-8.6
test-doctest-ghc-8.6: build-ghc-8.6
stack --stack-yaml stack-ghc-8.6.yaml build --ghc-options -Werror postgresql-pure:test:doctest
.PHONY: test-original-ghc-8.6
test-original-ghc-8.6: build-ghc-8.6
stack --stack-yaml stack-ghc-8.6.yaml build --ghc-options -Werror postgresql-pure:test:original
.PHONY: test-hdbc-postgresql-ghc-8.6
test-hdbc-postgresql-ghc-8.6: build-ghc-8.6
stack --stack-yaml stack-ghc-8.6.yaml build --ghc-options -Werror postgresql-pure:test:hdbc-postgresql
.PHONY: test-relational-record-ghc-8.6
test-relational-record-ghc-8.6: build-ghc-8.6
stack --stack-yaml stack-ghc-8.6.yaml build --ghc-options -Werror postgresql-pure:test:relational-record
.PHONY: test-ghc-8.8
test-ghc-8.8: test-doctest-ghc-8.8 test-original-ghc-8.8 test-hdbc-postgresql-ghc-8.8 test-relational-record-ghc-8.8
.PHONY: test-doctest-ghc-8.8
test-doctest-ghc-8.8: build-ghc-8.8
stack --stack-yaml stack-ghc-8.8.yaml build --ghc-options -Werror postgresql-pure:test:doctest
.PHONY: test-original-ghc-8.8
test-original-ghc-8.8: build-ghc-8.8
stack --stack-yaml stack-ghc-8.8.yaml build --ghc-options -Werror postgresql-pure:test:original
.PHONY: test-hdbc-postgresql-ghc-8.8
test-hdbc-postgresql-ghc-8.8: build-ghc-8.8
stack --stack-yaml stack-ghc-8.8.yaml build --ghc-options -Werror postgresql-pure:test:hdbc-postgresql
.PHONY: test-relational-record-ghc-8.8
test-relational-record-ghc-8.8: build-ghc-8.8
stack --stack-yaml stack-ghc-8.8.yaml build --ghc-options -Werror postgresql-pure:test:relational-record
.PHONY: test-nightly
test-nightly: test-doctest-nightly test-original-nightly test-hdbc-postgresql-nightly test-relational-record-nightly
.PHONY: test-doctest-nightly
test-doctest-nightly: build-nightly
stack --stack-yaml stack-nightly.yaml --resolver nightly build --ghc-options -Werror postgresql-pure:test:doctest
.PHONY: test-original-nightly
test-original-nightly: build-nightly
stack --stack-yaml stack-nightly.yaml --resolver nightly build --ghc-options -Werror postgresql-pure:test:original
.PHONY: test-hdbc-postgresql-nightly
test-hdbc-postgresql-nightly: build-nightly
stack --stack-yaml stack-nightly.yaml --resolver nightly build --ghc-options -Werror postgresql-pure:test:hdbc-postgresql
.PHONY: test-relational-record-nightly
test-relational-record-nightly: build-nightly
stack --stack-yaml stack-nightly.yaml --resolver nightly build --ghc-options -Werror postgresql-pure:test:relational-record
.PHONY: format
format:
$(PWSH) -Command "& { Get-ChildItem -Filter '*.hs' -Recurse src, test, test-doctest, test-relational-record, benchmark | Where-Object { $$_.Directory -notlike '*\src\Database\PostgreSQL\Simple\Time\Internal' } | ForEach-Object { stack exec -- stylish-haskell -i $$_.FullName } }"
stack exec -- stylish-haskell -i Setup.hs
.PHONY: lint
lint:
stack exec -- hlint\
src/Database/PostgreSQL/Pure.hs\
src/Database/PostgreSQL/Pure\
src/Database/HDBC\
test\
test-doctest\
test-relational-record\
benchmark
pages-path=../postgresql-pure-pages
.PHONY: doc
doc:
$(PWSH) -Command "& {\
Remove-Item -Recurse $(pages-path)\*;\
stack --stack-yaml stack-nightly.yaml haddock --haddock-arguments '--odir $(pages-path)';\
$$revision = $$(git rev-parse HEAD);\
Push-Location $(pages-path);\
git add .;\
git commit -m $$revision;\
Pop-Location\
}"
.PHONY: push-doc
push-doc:
$(PWSH) -Command "& {\
Push-Location $(pages-path);\
git push;\
Pop-Location\
}"
.PHONY: targets
targets:
$(PWSH) -Command "& { Get-Content .\Makefile | Where-Object { $$_ -like '.PHONY*' } | ForEach-Object { $$_.Substring(8) } }"
.PHONY: clean
clean:
stack --stack-yaml stack-ghc-8.4.yaml clean
stack --stack-yaml stack-ghc-8.6.yaml clean
stack --stack-yaml stack-ghc-8.8.yaml clean
.PHONY: clean-full
clean-full:
stack --stack-yaml stack-ghc-8.4.yaml clean --full
stack --stack-yaml stack-ghc-8.6.yaml clean --full
stack --stack-yaml stack-ghc-8.8.yaml clean --full