Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 79 lines (63 sloc) 2.47 kB
38ca0c1 @LeventErkok Add missing bits of the SMTLib2 translator
authored
1 # (c) Copyright Levent Erkok. All rights reserved.
2 #
3 # The sbv library is distributed with the BSD3 license. See the LICENSE file
4 # in the distribution for details.
4e521c5 @LeventErkok do not build for profiling, saves build time
authored
5 SHELL := /usr/bin/env bash
b317cfd @LeventErkok more build infrastructure
authored
6 SRCS = $(shell find . -name '*.hs' -or -name '*.lhs' | grep -v SBVUnitTest/SBVUnitTest.hs | grep -v buildUtils/simplify.hs)
4e521c5 @LeventErkok do not build for profiling, saves build time
authored
7 LINTSRCS = $(shell find . -name '*.hs' -or -name '*.lhs' | grep -v Paths_sbv.hs)
8 STAMPFILE = SBVUnitTest/SBVUnitTestBuildTime.hs
9 DEPSRCS = $(shell find . -name '*.hs' -or -name '*.lhs' | grep -v Paths_sbv.hs | grep -v $(STAMPFILE))
10 CABAL = cabal
c636d32 @LeventErkok 7.4.1 dev environment adaptations
authored
11 CABPFLAGS = --disable-library-profiling --enable-documentation --ghc-options=-Werror
b317cfd @LeventErkok more build infrastructure
authored
12 SIMPLIFY = ./buildUtils/simplify
26c488d @LeventErkok use a consistent time implementation
authored
13 TIME = /usr/bin/time
38ca0c1 @LeventErkok Add missing bits of the SMTLib2 translator
authored
14
93f6170 @LeventErkok more flexible, with regard to different cabal versions
authored
15 # Add --force-reinstalls if we have the new cabal
16 CABALVERSION=$(word 3, $(shell cabal --version))
17 ifeq ("$(CABALVERSION)", "0.10.2")
18 else
19 CABPFLAGS+=--force-reinstalls
20 endif
38ca0c1 @LeventErkok Add missing bits of the SMTLib2 translator
authored
21
93f6170 @LeventErkok more flexible, with regard to different cabal versions
authored
22 define mkStamp
e773c46 @LeventErkok reorganize the test suite
authored
23 @echo "-- Auto-generated, don't edit" > ${STAMPFILE}
24 @echo "module SBVUnitTestBuildTime (buildTime) where" >> ${STAMPFILE}
25 @echo "" >> ${STAMPFILE}
26 @echo "buildTime :: String" >> ${STAMPFILE}
27 @echo "buildTime = \"$(shell date)\"" >> ${STAMPFILE}
93f6170 @LeventErkok more flexible, with regard to different cabal versions
authored
28 endef
29
30 define mkTags
55093e8 @LeventErkok make it a bit smarter when rebuilding is not necessary
authored
31 @find . -name \*.\*hs | xargs hasktags -c
32 @sort -o tags tags
93f6170 @LeventErkok more flexible, with regard to different cabal versions
authored
33 endef
34
dfae882 @LeventErkok add a tags target
authored
35 .PHONY: all install test sdist clean docs gold stamp hlint tags
93f6170 @LeventErkok more flexible, with regard to different cabal versions
authored
36
37 all: install
38
39 install: $(STAMPFILE)
40
41 $(STAMPFILE): $(DEPSRCS)
42 @(make -s -C buildUtils)
43 $(call mkStamp)
44 $(call mkTags)
45 @((set -o pipefail; $(CABAL) $(CABPFLAGS) install 2>&1 | $(SIMPLIFY)) || (rm $(STAMPFILE) && false))
eb6445c @LeventErkok print build time when SBVUnitTest is run
authored
46
7f8653c @LeventErkok update gold
authored
47 test: install
82ad5ed @LeventErkok Re-enable doctests, now that there's a version of dockets that works …
authored
48 @echo "Executing inline tests.."
ad52f4e @LeventErkok don't filter doctest output
authored
49 @(set -o pipefail; $(TIME) doctest ${SRCS} 2>&1)
38ca0c1 @LeventErkok Add missing bits of the SMTLib2 translator
authored
50 @echo "Starting external test suite.."
26c488d @LeventErkok use a consistent time implementation
authored
51 @$(TIME) SBVUnitTests
38ca0c1 @LeventErkok Add missing bits of the SMTLib2 translator
authored
52
7f8653c @LeventErkok update gold
authored
53 sdist: install
b317cfd @LeventErkok more build infrastructure
authored
54 @(set -o pipefail; $(CABAL) sdist | $(SIMPLIFY))
38ca0c1 @LeventErkok Add missing bits of the SMTLib2 translator
authored
55
c636d32 @LeventErkok 7.4.1 dev environment adaptations
authored
56 veryclean: clean
57 make -C buildUtils clean
38ca0c1 @LeventErkok Add missing bits of the SMTLib2 translator
authored
58 clean:
55093e8 @LeventErkok make it a bit smarter when rebuilding is not necessary
authored
59 rm -rf dist $(STAMPFILE)
38ca0c1 @LeventErkok Add missing bits of the SMTLib2 translator
authored
60
10636e6 @LeventErkok Finalize the semantics of constrain: Conjunctive for sat, implicative…
authored
61 docs:
b40f7b3 @LeventErkok turn of haddock warnings
authored
62 @(set -o pipefail; $(CABAL) haddock --haddock-option=--no-warnings --hyperlink-source 2>&1 | $(SIMPLIFY))
38ca0c1 @LeventErkok Add missing bits of the SMTLib2 translator
authored
63
dca60f3 @LeventErkok minor tweak
authored
64 release: clean install sdist docs hlint test
639a04a @LeventErkok tweak
authored
65 @echo "*** SBV is ready for release!"
38ca0c1 @LeventErkok Add missing bits of the SMTLib2 translator
authored
66
fc42351 @LeventErkok clean-up + comment
authored
67 # use this as follows: make gold TGTS="cgUSB5"
68 # where the tag is one (or many) given in the SBVUnitTest.hs file
69 # if TGTS is not specified, then all gold files are regenerated
7f8653c @LeventErkok update gold
authored
70 gold: install
93f6170 @LeventErkok more flexible, with regard to different cabal versions
authored
71 dist/build/SBVUnitTests/SBVUnitTests -c ${TGTS}
38ca0c1 @LeventErkok Add missing bits of the SMTLib2 translator
authored
72
7f8653c @LeventErkok update gold
authored
73 hlint: install
df9e604 @LeventErkok makefile tweaks
authored
74 @echo "Running HLint.."
75 @hlint ${LINTSRCS} -q -rhlintReport.html -i "Use otherwise" -i "Parse error"
dfae882 @LeventErkok add a tags target
authored
76
77 tags:
78 $(call mkTags)
Something went wrong with that request. Please try again.