]> Git — Sourcephile - comptalang.git/blob - Makefile
Correction : Lib.Parsec : détection et propagation des erreurs.
[comptalang.git] / Makefile
1 all: install
2 .PHONY: .
3
4 #
5 ## install
6 ###
7 install: cabal/install lib/install cli/install web/install
8 cabal/install:
9 cabal update $(CABAL_FLAGS) $(CABAL_UPDATE_FLAGS)
10 cabal install -v $(CABAL_FLAGS) $(CABAL_INSTALL_FLAGS) cabal
11 .PHONY: lib cli web
12 lib lib/install:
13 cabal install -v --force-reinstalls $(CABAL_FLAGS) $(CABAL_INSTALL_FLAGS) ./lib
14 cli cli/install:
15 cabal install -v --force-reinstalls $(CABAL_FLAGS) $(CABAL_INSTALL_FLAGS) ./cli
16 web web/install:
17 cabal install -v --force-reinstalls $(CABAL_FLAGS) $(CABAL_INSTALL_FLAGS) ./web
18
19 #
20 ## clean
21 ###
22 clean: lib/clean cli/clean web/clean doc/clean
23 lib/clean:
24 (cd lib && cabal clean)
25 cli/clean:
26 (cd cli && cabal clean)
27 web/clean:
28 (cd web && cabal clean)
29
30 #
31 ## test
32 ###
33 test: lib/test cli/test web/test
34 lib/test:
35 (cd lib && cabal test --show-details=always $(CABAL_FLAGS) $(CABAL_TEST_FLAGS))
36 cli/test:
37 (cd cli && cabal test --show-details=always $(CABAL_FLAGS) $(CABAL_TEST_FLAGS))
38 web/test:
39 (cd web && cabal test --show-details=always $(CABAL_FLAGS) $(CABAL_TEST_FLAGS))
40 %/install/test: CABAL_INSTALL_FLAGS+=--enable-tests
41 %/install/test: %/install
42
43
44 #
45 ## doc
46 ###
47 .PHONY: doc
48 doc: doc/xhtml lib/doc cli/doc web/doc
49 lib/doc:
50 (cd lib && cabal haddock --hyperlink-source $(CABAL_FLAGS) $(CABAL_HADDOCK_FLAGS))
51 cli/doc:
52 (cd cli && cabal haddock --hyperlink-source $(CABAL_FLAGS) $(CABAL_HADDOCK_FLAGS))
53 web/doc:
54 (cd web && cabal haddock --hyperlink-source $(CABAL_FLAGS) $(CABAL_HADDOCK_FLAGS))
55 doc/%: .
56 $(MAKE) -C doc $*
57
58 #
59 ## dev
60 ###
61 %/dev: CABAL_INSTALL_FLAGS+=-fdev
62 %/dev: %
63
64 #