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
70 elif test -f $*.mll; then
78 REMAKE="$(REMAKE) -v OCAMLNATIVE=$NATIVE"
79 OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
81 COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS)"
82 . tools/ocamldriver.sh
88 REMAKE="$(REMAKE) -v OCAMLNATIVE=$NATIVE"
89 OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
91 COMPILE="$(OCAMLC) $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFINDFLAGS)"
92 . tools/ocamldriver.sh
98 REMAKE="$(REMAKE) -v OCAMLNATIVE=$NATIVE"
99 OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
101 if test -z "$NATIVE"; then
102 COMPILE="$(OCAMLC) $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFINDFLAGS)"
104 COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS)"
106 . tools/ocamldriver.sh
115 $(REMAKE) "$i".test"$j".summary
120 rm -rf tests/*.summary tests/*.results/*_"$(PACKAGE)"_*.*
122 %.summary: tools $(BIN)
129 SPLIT=tools/split_path.native$(EXE)
130 XMLDIFF=tools/xml_diff.native$(EXE)
132 $REMAKE $xml ${xml}.queries tests/${test}.sh