-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.odoc
135 lines (97 loc) · 3.89 KB
/
Makefile.odoc
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
ODOC_WIKI := src/odoc_wiki/odoc_wiki.cma src/odoc_wiki/odoc_wiki.cmxs
ifeq "${OCAMLDUCE}" "YES"
ODOC_DUCE_WIKI := src/odoc_wiki/odoc_duce_wiki.cma src/odoc_wiki/odoc_duce_wiki.cmxs
else
ODOC_DUCE_WIKI := ${ODOC_WIKI}
endif
all::
${MAKE} -C src/odoc_wiki
src/odoc_wiki/odoc_wiki.cma:
${MAKE} -C src/odoc_wiki odoc_wiki.cma
src/odoc_wiki/odoc_wiki.cmxs:
${MAKE} -C src/odoc_wiki odoc_wiki.cmxs
src/odoc_wiki/odoc_duce_wiki.cma:
${MAKE} -C src/odoc_wiki odoc_duce_wiki.cma
src/odoc_wiki/odoc_duce_wiki.cmxs:
${MAKE} -C src/odoc_wiki odoc_duce_wiki.cmxs
api: lwt js_of_ocaml tyxml server eliom oclosure
api.install: lwt.install js_of_ocaml.install tyxml.install \
server.install eliom.install oclosure.install
deprecated_message=\
echo ;\
echo "Deprecated command! See: https://ocsigen.org/devarea/faq\#doc"; \
echo ;\
echo " - Go to $(1) sources and run: '$(2)'" ;\
echo " - To install copy '$(3)' into" ;\
echo " '/var/www/data/apiwiki/$(1)/_version_$(4)' on ocsigen.org as www-data" ;\
echo " after cleaning the target directory" ;\
echo
####### WIKIDOC LWT #######
.PHONY: lwt
lwt lwt.install:
@$(call deprecated_message,lwt,ocamlbuild lwt-api.wikidocdir/index.wiki,lwt-api.wikidocdir/*.wiki)
######## WIKIDOC JS_OF_OCAML ########
.PHONY:js_of_ocaml
js_of_ocaml js_of_ocaml.install:
@$(call deprecated_message,js_of_ocaml,make -C doc docwiki,doc/api-wiki/*.wiki)
######## WIKIDOC TYXML ########
.PHONY: tyxml
tyxml tyxml.install:
@$(call deprecated_message,tyxml,make -C doc docwiki,doc/api-wiki/*.wiki)
####### WIKIDOC OCSIGENSERVER #######
.PHONY: server
server server.install:
@$(call deprecated_message,ocsigenserver,make -C doc wikidoc,doc/api-wiki/*.wiki)
####### WIKIDOC ELIOM #######
.PHONY: eliom
eliom eliom.install:
@$(call deprecated_message,eliom,make -C doc/server wikidoc; make -C doc/client wikidoc,doc/server/api-wiki/*.wiki and doc/client/api-wiki/*.wiki,/server and .../client)
######## WIKIDOC OCSIGEN 1.3 ########
# OCSIGEN13_DIR=${SRCROOT}/ocsigen-1.3/
# -include Makefile.oldfilelist
# DOC13INCLUDES = ${addprefix -I ${OCSIGEN13_DIR}/,${DOC13INCLUDESDIR}} \
# -package ocsigen,ocamlduce,lwt
# .PHONY:ocserveliom13
# ocserveliom13: ${ODOC_WIKI}
# rm -rf wiki/odoc-$@
# mkdir -p wiki/odoc-$@
# OCAMLPATH=${OCSIGEN13_DIR}/files:${OCAMLPATH} \
# ${OCAMLDUCEDOC} -g ${ODOC_DUCE_WIKI} \
# -d wiki/odoc-$@ -intro ${OCSIGEN13_DIR}/files/indexdoc -colorize-code \
# ${DOC13INCLUDES} ${addprefix ${OCSIGEN13_DIR}/,${DOC13}}
# OCSIGEN13_VERSION ?= 1.3
# ocserveliom13.install:
# ${call odoc_wiki_install,wiki/odoc-ocserveliom13,oscigenserver,${OCSIGEN13_VERSION}}
######## WIKIDOC OCSIGEN 1.2 ########
# OCSIGEN12_DIR=${SRCROOT}/ocsigen-1.2/
# -include Makefile.oldfilelist
# DOC12INCLUDES = ${addprefix -I ${OCSIGEN12_DIR}/,${DOC12INCLUDESDIR}} \
# -package ocsigen,ocamlduce,lwt
# .PHONY:ocserveliom12
# ocserveliom12: ${ODOC_WIKI}
# rm -rf wiki/odoc-$@
# mkdir -p wiki/odoc-$@
# OCAMLPATH=${OCSIGEN12_DIR}:${OCAMLPATH} \
# ${OCAMLDUCEDOC} -g ${ODOC_DUCE_WIKI} \
# -d wiki/odoc-$@ -intro ${OCSIGEN12_DIR}/files/indexdoc -colorize-code \
# ${DOC12INCLUDES} ${addprefix ${OCSIGEN12_DIR}/,${DOC10}}
# OCSIGEN12_VERSION ?= 1.2
# ocserveliom12.install:
# ${call odoc_wiki_install,wiki/odoc-ocserveliom12,ocsigenserver,${OCSIGEN12_VERSION}}
######## WIKIDOC OCLOSURE ########
.PHONY: oclosure
oclosure oclosure.install:
@$(call deprecated_message,oclosure,make -C goog wikidoc,wikidoc/*.wiki)
####
odoc_wiki_install=\
sudo -u www-data rm -rf /var/www/data/apiwiki/$(2)/$(3)/; \
sudo -u www-data mkdir -p /var/www/data/apiwiki/$(2)/$(3)/; \
sudo -u www-data chmod 775 /var/www/data/apiwiki/$(2)/$(3); \
sudo -u www-data cp -r $(1)/* /var/www/data/apiwiki/$(2)/$(3)/
###
install::
${OCAMLFIND} install wikidoc src/odoc_wiki/META ${ODOC_WIKI} ${ODOC_DUCE_WIKI}
uninstall::
${OCAMLFIND} remove wikidoc
clean::
${MAKE} -C src/odoc_wiki clean