File: Makefile

package info (click to toggle)
haskell-edison 1.2.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 848 kB
  • ctags: 7
  • sloc: haskell: 11,307; makefile: 214; sh: 179
file content (103 lines) | stat: -rw-r--r-- 3,957 bytes parent folder | download
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
RUNHS=runhaskell
VERSION=1.2

help:
	@echo ""
	@echo "****************************************************************"
	@echo "****************************************************************"
	@echo "*** Edison $(VERSION)   Makefile help"
	@echo ""
	@echo "This Makefile will assist you to compile Edison.  The Edison source"
	@echo "distribution is broken into a number of Cabal sub-packages, some of which"
	@echo "depend on others.  If you prefer, you may invoke the cabal build system for"
	@echo "the sub-packages manually.  This will allow you to have greater control over"
	@echo "exactily which packages are installed in which places."
	@echo ""
	@echo "To install all Edison packages into your home directory, type 'make user'."
	@echo ""
	@echo "To install all Edison packages in the system-wide package repository,"
	@echo "type 'make system'.  This may require superuser privliges."
	@echo ""
	@echo "To run the unit tests, type 'make test'.  This will install Edison into your"
	@echo "home directory and run the unit tests."
	@echo ""
	@echo "See the README file for more details."
	@echo ""
	@echo "To collect all source files together for use in Hugs, type 'make hugs'."
	@echo "This will create a directory named 'hugs' which will contain the source code"
	@echo "from all the subprojects.  You can then copy this directory to an appropriate"
	@echo "place.  Call hugs with your package search path (the -P option) set to contain"
	@echo "this directory. Also be sure to use the -98 option when calling Hugs to enable"
	@echo "extensions."
	@echo ""
	@echo "To generate the API documentation, type 'make docs'.  This will generate Haddock"
	@echo "documentation in the 'dist/doc/html' directory."

user : api-user core-user
system : api-system core-system
clean : api-clean core-clean test-clean
	- rm -r hugs/
	- rm -r *.tar.gz
	find . -name '*~' -exec rm '{}' ';'
	find . -type d -and -name 'dist' -exec rm -r '{}' ';'

api-system :
	cd edison-api && \
          $(RUNHS) Setup.hs configure && \
          $(RUNHS) Setup.hs build && \
          $(RUNHS) Setup.hs install

api-user :
	cd edison-api && \
          $(RUNHS) Setup.hs configure --prefix=$(HOME) --user && \
          $(RUNHS) Setup.hs build && \
          $(RUNHS) Setup.hs install --user

api-clean :
	- cd edison-api && $(RUNHS) Setup.hs clean

core-system : api-system
	cd edison-core && \
          $(RUNHS) Setup.hs configure && \
          $(RUNHS) Setup.hs build && \
          $(RUNHS) Setup.hs install

core-user : api-user
	cd edison-core && \
          $(RUNHS) Setup.hs configure --prefix=$(HOME) --user && \
          $(RUNHS) Setup.hs build && \
          $(RUNHS) Setup.hs install --user

core-clean :
	- cd edison-core && $(RUNHS) Setup.hs clean

test : api-user core-user
	cd test && \
          $(RUNHS) Setup.hs configure --prefix=$(HOME) --user && \
          $(RUNHS) Setup.hs build && \
          ./dist/build/testSuite/testSuite

test-clean :
	- cd test && $(RUNHS) Setup.hs clean

hugs :
	mkdir hugs/
	cp -r edison-api/src/* hugs/
	cp -r edison-core/src/* hugs/

docs :
	mkdir -p dist/doc/html
	find edison-api/src edison-core/src -name '*.hs' -or -name '*.lhs' | xargs haddock -o dist/doc/html -h -t Edison-$(VERSION)

tarball : docs
	darcs dist -d edison-$(VERSION)-source
	mkdir edison-api-$(VERSION)-source && \
           cp -r COPYRIGHT README edison-api edison-api-$(VERSION)-source && \
           tar cfz edison-api-$(VERSION)-source.tar.gz edison-api-$(VERSION)-source
	mkdir edison-core-$(VERSION)-source && \
           cp -r COPYRIGHT README edison-core edison-core-$(VERSION)-source && \
           tar cfz edison-core-$(VERSION)-source.tar.gz edison-core-$(VERSION)-source
	mkdir edison-$(VERSION)-docs && \
           cp -r ./dist/doc/html/* edison-$(VERSION)-docs && \
           tar cfz edison-$(VERSION)-docs.tar.gz edison-$(VERSION)-docs
	- rm -r edison-api-$(VERSION)-source edison-core-$(VERSION)-source edison-$(VERSION)-docs