forked from ocsigen/eliom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
104 lines (74 loc) · 1.73 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
include Makefile.config
### Building
.PHONY: all byte opt doc
all:
${MAKE} -C src all
byte:
${MAKE} -C src byte
opt:
${MAKE} -C src opt
odoc:
$(MAKE) -C src odoc
doc:
$(MAKE) -C doc doc
### Testing ###
.PHONY: run.local run.opt.local top
run.local: tests.byte fifo
ocsigenserver -c local/etc/${PROJECTNAME}.conf
tests.byte: byte
${MAKE} -C tests byte
run.opt.local: tests.opt fifo
ocsigenserver.opt -c local/etc/${PROJECTNAME}.conf
tests.opt: opt
${MAKE} -C tests opt
fifo:
[ -p local/var/run/${PROJECTNAME}_command ] || \
{ mkfifo local/var/run/${PROJECTNAME}_command; \
chmod 660 local/var/run/${PROJECTNAME}_command; }
### Cleaning ###
clean: clean.local
${MAKE} -C src clean
${MAKE} -C tests clean
clean.local:
-rm -f $(PROJECTNAME)-*.tar.gz
distclean: clean.local
${MAKE} -C src distclean
${MAKE} -C tests distclean
-${MAKE} -C doc clean
-rm Makefile.config
-rm -f *~ \#* .\#*
### Installation ####
.PHONY: install uninstall reinstall
install:
$(MAKE) -C src install
@echo
@echo "## Run \"make doc\" and \"make install.doc\" to build and install the ocamldoc."
install.byte:
$(MAKE) -C src install.byte
install.opt:
$(MAKE) -C src install.opt
uninstall:
-$(MAKE) -C src uninstall
reinstall:
$(MAKE) -C src reinstall
reinstall.byte:
$(MAKE) -C src reinstall.byte
reinstall.opt:
$(MAKE) -C src reinstall.opt
install.doc:
${MAKE} -C doc install
###
.PHONY: dist
VERSION := $(shell head -n 1 VERSION)
dist:
DARCS_REPO=$(PWD) darcs dist -d $(PROJECTNAME)-$(VERSION)
###
.PHONY: depend
depend:
${MAKE} -C src syntax.depend
${MAKE} -C src/syntax
${MAKE} -C src tools.depend
${MAKE} -C src/tools
${MAKE} -C src files/META.${PROJECTNAME}
${MAKE} -C src server.depend client.depend
${MAKE} -C tests depend