1 .OPTIONS = variable-propagation
2 OCAMLFINDPACKAGES = "ulex,unix,expat,camlp4.macro"
3 OCAMLFINDSYNTAX = camlp4o
4 OCAMLFINDPPOPTS = $(addprefix "-ppopt ", @CAMLP4FLAGS@ -I include)
5 OCAMLFINDINCLUDES = $(addprefix "-I ", src)
6 OCAMLFINDFLAGS = -syntax $(OCAMLFINDSYNTAX) -package $(OCAMLFINDPACKAGES) \
7 $(OCAMLFINDPPOPTS) $(OCAMLFINDINCLUDES)
8 OCAMLFINDLINKFLAGS = -linkpkg
9 PACKAGE = @PACKAGE_TARNAME@
11 BIN = src/@PACKAGE_TARNAME@.native@EXE@
16 ODEPS = tools/odeps.sh $(OCAMLDEP)
19 OCAMLFLAGS = @OCAMLFLAGS@
20 OCAMLOPTFLAGS = @OCAMLOPTFLAGS@
21 OCAMLCFLAGS = @OCAMLCFLAGS@
22 OCAMLYACC = @OCAMLYACC@
26 tools: tools/xml_diff.native$(EXE) tools/XPathEval.class tools/split_path.native$(EXE)
28 Remakefile: Remakefile.in config.status
29 ./config.status Remakefile
31 configure config.status: configure.in
33 ./config.status --recheck
36 for dir in src tools; do
37 find $dir -name '*.cm*' -o -name '*.o' -o -name '*.byte' -o \
38 -name '*.native' -o -name '*.mll' -o -name '*.mly' -o \
39 -name '*.class' -o -name '*.dep' | while read file; do
42 rm -f "${file%.mll}.ml"
45 rm -f "${file%.mly}.ml" "${file%.mly}.mli"
54 distclean: clean test_clean
55 rm -rf config.status configure config.log autom4te.cache .remake Remakefile remake Makefile
60 %.native$(EXE): %.cmx %.dep
61 objects=`cat $*.dep | xargs | sed 's/[.]dep/.cmx/g'`
62 $(OCAMLOPT) -o $@ $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDLINKFLAGS) $(OCAMLFINDFLAGS) $objects $<
64 %.byte$(EXE): %.cmo %.dep
65 objects=`cat $*.dep | xargs | sed 's/[.]dep/.cmo/g'`
66 $(OCAMLC) -o $@ $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFINDLINKFLAGS) $(OCAMLFINDFLAGS) $objects $<
69 if test -f $*.mly; then
72 elif test -f $*.mll; then
81 REMAKE="$(REMAKE) OCAMLNATIVE=$NATIVE"
82 OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
84 COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS)"
85 . tools/ocamldriver.sh
91 REMAKE="$(REMAKE) OCAMLNATIVE=$NATIVE"
92 OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
94 COMPILE="$(OCAMLC) $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFINDFLAGS)"
95 . tools/ocamldriver.sh
100 NATIVE=$(OCAMLNATIVE)
101 REMAKE="$(REMAKE) OCAMLNATIVE=$NATIVE"
102 OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
104 if test -z "$NATIVE"; then
105 COMPILE="$(OCAMLC) $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFINDFLAGS)"
107 COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS)"
109 . tools/ocamldriver.sh
118 $(REMAKE) "$i".test"$j".summary
123 rm -rf tests/*.summary tests/*.results/*_"$(PACKAGE)"_*.*
125 %.summary: tools $(BIN)
132 SPLIT=tools/split_path.native$(EXE)
133 XMLDIFF=tools/xml_diff.native$(EXE)
135 $REMAKE $xml ${xml}.queries tests/${test}.sh