X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=Remakefile.in;h=1b54199365041008a4537d5657ed9c50a5b3e0b3;hp=a4fe1c993e164e2b0aae48485d31c5c1a0fc8435;hb=91d60f0cf46661abde8df94fead3688ec43a2db9;hpb=e56b9fbeaed04c1f2fb7019de34f7d8e87d6db73 diff --git a/Remakefile.in b/Remakefile.in index a4fe1c9..1b54199 100644 --- a/Remakefile.in +++ b/Remakefile.in @@ -3,8 +3,8 @@ OCAMLFINDPACKAGES = "ulex,unix,expat,camlp4.macro,bigarray" OCAMLFINDSYNTAX = camlp4o OCAMLFINDPPOPTS = $(addprefix "-ppopt ", @CAMLP4FLAGS@ -I include) OCAMLFINDINCLUDES = $(addprefix "-I ", src) -OCAMLFINDFLAGS = -syntax $(OCAMLFINDSYNTAX) -package $(OCAMLFINDPACKAGES) \ - $(OCAMLFINDPPOPTS) $(OCAMLFINDINCLUDES) +OCAMLFINDFLAGSNOSYNTAX = -package $(OCAMLFINDPACKAGES) $(OCAMLFINDPPOPTS) $(OCAMLFINDINCLUDES) +OCAMLFINDFLAGS = -syntax $(OCAMLFINDSYNTAX) $(OCAMLFINDFLAGSNOSYNTAX) OCAMLFINDLINKFLAGS = -linkpkg PACKAGE = @PACKAGE_TARNAME@ SRC = src @@ -17,13 +17,18 @@ OCAMLDEP = @OCAMLDEP@ ODEPS = tools/odeps.sh $(OCAMLDEP) OCAMLC = @OCAMLC@ OCAMLOPT = @OCAMLOPT@ -OCAMLFLAGS = @OCAMLFLAGS@ +OCAMLFLAGS = @OCAMLFLAGS@ OCAMLOPTFLAGS = @OCAMLOPTFLAGS@ OCAMLCFLAGS = @OCAMLCFLAGS@ -OCAMLYACC = @OCAMLYACC@ +MENHIR = @MENHIR@ + + all: $(BIN) +src/xpath/xpath_internal_parser.cmx: OCAMLFINDFLAGS = $(OCAMLFINDFLAGSNOSYNTAX) +src/xpath/xpath_internal_parser.cmo: OCAMLFINDFLAGS = $(OCAMLFINDFLAGSNOSYNTAX) + tools: tools/xml_diff.native$(EXE) tools/XPathEval.class tools/split_path.native$(EXE) Remakefile: Remakefile.in config.status @@ -37,7 +42,7 @@ clean: for dir in src tools; do find $dir -name '*.cm*' -o -name '*.o' -o -name '*.byte' -o \ -name '*.native' -o -name '*.mll' -o -name '*.mly' -o \ - -name '*.class' -o -name '*.depo' -o -name '*.depx' | while read file; do + -name '*.class' -o -name '*.depo' -o -name '*.depx' -o -name '*.ml.str' | while read file; do case "$file" in *.mll) rm -f "${file%.mll}.ml" @@ -45,8 +50,11 @@ clean: *.mly) rm -f "${file%.mly}.ml" "${file%.mly}.mli" ;; + *.ml.str) + rm -f "${file%.ml.str}.ml" + ;; *) - rm -f "$file" + rm -f "$file" ;; esac done @@ -74,10 +82,16 @@ distclean: clean test_clean %.ml: if test -f $*.mly; then $(REMAKE) $*.mly - $(OCAMLYACC) $*.mly + $(MENHIR) $*.mly elif test -f $*.mll; then $(REMAKE) $*.mll $(OCAMLLEX) $*.mll + elif test -f $*.ml.str; then + $(REMAKE) $*.ml.str + echo -n 'let content = "' > $*.ml + sed -e 's/\(["\\]\)/\\\1/g' $*.ml.str | sed -e 's/^\(.*\)$/\1\\n\\/g' >> $*.ml + echo '' >> $*.ml + echo '"' >> $*.ml fi %.cmx %.depx: @@ -88,10 +102,7 @@ distclean: clean test_clean REMAKE="$(REMAKE) OCAMLNATIVE=$NATIVE" OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)" SRC=$(SRC) - if test -f "$base".flags; then - FLAGS=`cat "$base".flags` - fi - COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS) $FLAGS" + COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS)" . tools/ocamldriver.sh %.cmo %.depo: @@ -100,9 +111,10 @@ distclean: clean test_clean DEPEXT=depo NATIVE="" REMAKE="$(REMAKE) OCAMLNATIVE=$NATIVE" - OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)" + OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS) $(OCAMLFIND_EXTRAFLAGS)" SRC=$(SRC) - COMPILE="$(OCAMLC) $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFINDFLAGS)" + COMPILE="$(OCAMLC) $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFIND_EXTRAFLAGS) " + . tools/ocamldriver.sh %.cmi: