]> Git — Sourcephile - comptalang.git/blob - Makefile
Modification : CLI.Command.* : rend -i optionnel.
[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 $(CABAL_FLAGS) $(CABAL_INSTALL_FLAGS) alex happy
18 cabal install -v --force-reinstalls $(CABAL_FLAGS) $(CABAL_INSTALL_FLAGS) ./web
19
20 #
21 ## clean
22 ###
23 clean: lib/clean cli/clean web/clean doc/clean
24 lib/clean:
25 (cd lib && cabal clean)
26 cli/clean:
27 (cd cli && cabal clean)
28 web/clean:
29 (cd web && cabal clean)
30
31 #
32 ## test
33 ###
34 test: lib/test cli/test web/test
35 lib/test:
36 (cd lib && cabal test --show-details=always $(CABAL_FLAGS) $(CABAL_TEST_FLAGS))
37 cli/test:
38 (cd cli && cabal test --show-details=always $(CABAL_FLAGS) $(CABAL_TEST_FLAGS))
39 web/test:
40 (cd web && cabal test --show-details=always $(CABAL_FLAGS) $(CABAL_TEST_FLAGS))
41 %/install/test: CABAL_INSTALL_FLAGS+=--enable-tests
42 %/install/test: %/install
43
44
45 #
46 ## doc
47 ###
48 .PHONY: doc
49 doc: doc/xhtml lib/doc cli/doc web/doc
50 lib/doc:
51 (cd lib && cabal haddock --hyperlink-source $(CABAL_FLAGS) $(CABAL_HADDOCK_FLAGS))
52 cli/doc:
53 (cd cli && cabal haddock --hyperlink-source $(CABAL_FLAGS) $(CABAL_HADDOCK_FLAGS))
54 web/doc:
55 (cd web && cabal haddock --hyperlink-source $(CABAL_FLAGS) $(CABAL_HADDOCK_FLAGS))
56 doc/%: .
57 $(MAKE) -C doc $*
58
59 #
60 ## dev
61 ###
62 %/dev: CABAL_INSTALL_FLAGS+=-fdev
63 %/dev: %
64
65
66 #
67 ## not-threaded
68 ###
69 %/not-threaded: CABAL_INSTALL_FLAGS+=-f-threaded
70 %/not-threaded: %
71
72 #