1 include ..
/Makefile.config
4 ## (tests do not require global installation of Eliom)
5 export OCAMLPATH
:= ${SRC}/src
/files
:${OCAMLPATH}
6 export PATH
:= ${SRC}/src
/tools
:${PATH}
8 ELIOMC
:= eliomc
${BYTEDBG}
9 ELIOMOPT
:= eliomopt
${OPTDBG}
11 JS_OF_ELIOM
:= js_of_eliom
13 ifeq "${NATDYNLINK}" "YES"
19 #### Main site : eliom_testsuite ####
24 SERVER_FILES
:= eliom_testsuite1.ml \
26 eliom_testsuite3.eliom \
29 CLIENT_FILES
:= eliom_testsuite3.eliom \
31 STATICDIR
:= ..
/local
/var
/www
/tests
33 byte
:: eliom_testsuite.cma
${STATICDIR}/eliom_testsuite.js
34 opt
:: eliom_testsuite.cmxs
${STATICDIR}/eliom_testsuite.js
36 #### Server side #######
38 SERVER_INC
:= ${addprefix -package
,${SERVER_PACKAGE}}
40 SERVER_OBJS
:= $(patsubst %.eliom
,_server
/%.cmo
, \
41 $(patsubst %.ml
,_server
/%.cmo
,${SERVER_FILES}))
43 eliom_testsuite.cma
: ${SERVER_OBJS}
45 eliom_testsuite.cmxa
: ${SERVER_OBJS
:.cmo
=.cmx
}
46 ${ELIOMOPT} -a
-o
$@
$^
48 _server
/%.type_mli
: %.eliom
49 ${ELIOMC} -infer
${SERVER_INC} -o
$@
$<
52 ${ELIOMC} -c
${SERVER_INC} $<
55 ${ELIOMC} -c
${SERVER_INC} $<
56 _server
/%.cmo
: %.eliom
57 ${ELIOMC} -c
-noinfer
${SERVER_INC} $<
60 ${ELIOMOPT} -c
${SERVER_INC} $<
61 _server
/%.cmx
: %.eliom
62 ${ELIOMOPT} -c
-noinfer
${SERVER_INC} $<
65 $(ELIOMOPT
) -shared
-linkall
-o
$@
$<
67 ##### Client side ####
69 CLIENT_LIBS
:= ${addprefix -package
,${CLIENT_PACKAGE}}
70 CLIENT_INC
:= ${addprefix -package
,${CLIENT_PACKAGE}}
72 CLIENT_OBJS
:= $(patsubst %.eliom
,_client
/%.cmo
, \
73 $(patsubst %.ml
,_client
/%.cmo
,${CLIENT_FILES}))
75 ${STATICDIR}/eliom_testsuite.js
: ${CLIENT_OBJS}
76 ${JS_OF_ELIOM} -o
$@
-jsopt
-pretty
-jsopt
-noinline
${CLIENT_LIBS} $^
79 ${JS_OF_ELIOM} -c
${CLIENT_INC} $<
81 _client
/%.cmo
: %.eliom
82 ${JS_OF_ELIOM} -c
${CLIENT_INC} $<
84 ${JS_OF_ELIOM} -c
${CLIENT_INC} $<
86 ####### Aux site: Ocamlduce #######
88 ifeq "${OCAMLDUCE}" "YES"
93 ocamlduce.byte
: _server
/eliom_testsuite1.cmo
94 $(MAKE
) -C ocamlduce byte
96 ocamlduce.opt
: _server
/eliom_testsuite1.cmx
97 $(MAKE
) -C ocamlduce opt
99 ####### Aux site: miniwiki #######
105 $(MAKE
) --no-print-directory
-C miniwiki byte
108 $(MAKE
) --no-print-directory
-C miniwiki opt
115 ${MAKE} -C ocamlduce
clean
116 ${MAKE} -C miniwiki
clean
118 -rm -f
*.cm
[ioax
] *.cmxa
*.cmxs
*.o
*.a
*.annot
120 -rm -f
${STATICDIR}/eliom_testsuite.js
121 -rm -rf _client
/* _server
/*
123 distclean: clean.local
125 ${MAKE} -C ocamlduce
distclean
126 ${MAKE} -C miniwiki
distclean
131 ifeq "${OCAMLDUCE}" "YES"
132 ${MAKE} -C ocamlduce depend
134 ${MAKE} -C miniwiki depend
135 $(ELIOMDEP
) -server
${SERVER_INC} ${SERVER_FILES} > .depend
136 $(ELIOMDEP
) -client
${CLIENT_INC} ${CLIENT_FILES} >> .depend
140 ## Dependencies towards *.eliom are not handled by eliomdep.
141 eliom_testsuite.cmo
: eliom_testsuite3.cmo
142 eliom_testsuite.cmx
: eliom_testsuite3.cmx
147 # cat $< | sed '1,/(\*wiki\*/d' | sed '/%<||2>%/,$$ d' | /bin/sh ./tutomake.sh > $@