Initial packaging
[pkg-ocaml-eliom.git] / Makefile
blobb628ed4b4a2adc9c99a8242e8d16ff0045bf57d1
1 include Makefile.config
3 ### Building
5 .PHONY: all byte opt doc
7 all:
8 ${MAKE} -C src all
10 byte:
11 ${MAKE} -C src byte
13 opt:
14 ${MAKE} -C src opt
16 doc:
17 $(MAKE) -C doc
19 ### Testing ###
21 .PHONY: run.local run.opt.local top
23 run.local: tests.byte fifo
24 ocsigenserver -c local/etc/${PROJECTNAME}.conf
26 tests.byte: byte
27 ${MAKE} -C tests byte
29 run.opt.local: tests.opt fifo
30 ocsigenserver.opt -c local/etc/${PROJECTNAME}.conf
32 tests.opt: opt
33 ${MAKE} -C tests opt
35 fifo:
36 [ -p local/var/run/${PROJECTNAME}_command ] || \
37 { mkfifo local/var/run/${PROJECTNAME}_command; \
38 chmod 660 local/var/run/${PROJECTNAME}_command; }
41 ### Cleaning ###
43 clean: clean.local
44 ${MAKE} -C src clean
45 ${MAKE} -C tests clean
47 clean.local:
48 -rm -f $(PROJECTNAME)-*.tar.gz
50 distclean: clean.local
51 ${MAKE} -C src distclean
52 ${MAKE} -C tests distclean
53 -${MAKE} -C doc clean
54 -rm Makefile.config
55 -rm -f *~ \#* .\#*
57 ### Installation ####
59 .PHONY: install uninstall reinstall
61 install:
62 $(MAKE) -C src install
63 @echo
64 @echo "## Run \"make doc\" and \"make install.doc\" to build and install the ocamldoc."
65 install.byte:
66 $(MAKE) -C src install.byte
67 install.opt:
68 $(MAKE) -C src install.opt
70 uninstall:
71 -$(MAKE) -C src uninstall
73 reinstall:
74 $(MAKE) -C src reinstall
75 reinstall.byte:
76 $(MAKE) -C src reinstall.byte
77 reinstall.opt:
78 $(MAKE) -C src reinstall.opt
80 install.doc:
81 ${MAKE} -C doc install
83 ###
85 .PHONY: dist
87 VERSION := $(shell head -n 1 VERSION)
88 dist:
89 DARCS_REPO=$(PWD) darcs dist -d $(PROJECTNAME)-$(VERSION)
91 ###
93 .PHONY: depend
94 depend:
95 ${MAKE} -C src/syntax
96 ${MAKE} -C src/tools
97 ${MAKE} -C src files/META.${PROJECTNAME} depend
98 ${MAKE} -C tests depend