1 OCAMLFINDPACKAGES = "ulex,unix,expat,camlp4.macro"
2 OCAMLFINDSYNTAX = camlp4o
3 OCAMLFINDPPOPTS = $(addprefix "-ppopt ", @CAMLP4FLAGS@ -I include)
4 OCAMLFINDINCLUDES = $(addprefix "-I ", src)
5 OCAMLFINDFLAGS = -syntax $(OCAMLFINDSYNTAX) -package $(OCAMLFINDPACKAGES) \
6 $(OCAMLFINDPPOPTS) $(OCAMLFINDINCLUDES)
7 OCAMLFINDLINKFLAGS = -linkpkg
8 PACKAGE = @PACKAGE_TARNAME@
10 BIN = src/@PACKAGE_TARNAME@.native@EXE@
15 ODEPS = tools/odeps.sh $(OCAMLDEP)
18 OCAMLFLAGS = @OCAMLFLAGS@
19 OCAMLOPTFLAGS = @OCAMLOPTFLAGS@
20 OCAMLCFLAGS = @OCAMLCFLAGS@
21 OCAMLYACC = @OCAMLYACC@
25 tools: tools/xml_diff.native$(EXE) tools/XPathEval.class tools/split_path.native$(EXE)
27 Remakefile: Remakefile.in config.status
28 ./config.status Remakefile
30 configure config.status: configure.in
32 ./config.status --recheck
35 for dir in src tools; do
36 find $dir -name '*.cm*' -o -name '*.o' -o -name '*.byte' -o \
37 -name '*.native' -o -name '*.mll' -o -name '*.mly' -o \
38 -name '*.class' -o -name '*.dep' | while read file; do
41 rm -f "${file%.mll}.ml"
44 rm -f "${file%.mly}.ml" "${file%.mly}.mli"
53 distclean: clean test_clean
54 rm -rf config.status configure config.log autom4te.cache .remake Remakefile remake Makefile
59 %.native$(EXE): %.cmx %.dep
60 objects=`cat $*.dep | xargs | sed 's/[.]dep/.cmx/g'`
61 $(OCAMLOPT) -o $@ $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDLINKFLAGS) $(OCAMLFINDFLAGS) $objects $<
63 %.byte$(EXE): %.cmo %.dep
64 objects=`cat $*.dep | xargs | sed 's/[.]dep/.cmo/g'`
65 $(OCAMLC) -o $@ $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFINDLINKFLAGS) $(OCAMLFINDFLAGS) $objects $<
68 if test -f $*.mly; then
71 elif test -f $*.mll; then
80 REMAKE="$(REMAKE) -v OCAMLNATIVE=$NATIVE"
81 OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
83 COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS)"
84 . tools/ocamldriver.sh
90 REMAKE="$(REMAKE) -v OCAMLNATIVE=$NATIVE"
91 OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
93 COMPILE="$(OCAMLC) $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFINDFLAGS)"
94 . tools/ocamldriver.sh
100 REMAKE="$(REMAKE) -v OCAMLNATIVE=$NATIVE"
101 OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
103 if test -z "$NATIVE"; then
104 COMPILE="$(OCAMLC) $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFINDFLAGS)"
106 COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS)"
108 . tools/ocamldriver.sh
117 $(REMAKE) "$i".test"$j".summary
122 rm -rf tests/*.summary tests/*.results/*_"$(PACKAGE)"_*.*
124 %.summary: tools $(BIN)
131 SPLIT=tools/split_path.native$(EXE)
132 XMLDIFF=tools/xml_diff.native$(EXE)
134 $REMAKE $xml ${xml}.queries tests/${test}.sh