Commit 984bc423 authored by POTTIER Francois's avatar POTTIER Francois

No need to remove _build (it is never created).

Whitespace.
parent c9b33241
......@@ -38,7 +38,7 @@ bootstrap: .versioncheck
.versioncheck:
@ echo Checking that OCaml is recent enough...
@ rm -rf _versioncheck
@$(OCAMLBUILD) -build-dir _versioncheck checkOCamlVersion.byte
@ $(OCAMLBUILD) -build-dir _versioncheck checkOCamlVersion.byte
@ _versioncheck/checkOCamlVersion.byte --verbose --gt "4.02"
@ rm -rf _versioncheck
@ touch $@
......@@ -48,7 +48,7 @@ bootstrap: .versioncheck
# Build Menhir using ocamlyacc.
stage1:
@$(OCAMLBUILD) -build-dir _stage1 menhir.$(TARGET)
@ $(OCAMLBUILD) -build-dir _stage1 menhir.$(TARGET)
# ----------------------------------------------------------------------------
# Stage 2.
......@@ -65,27 +65,27 @@ SRC := ..
FLAGS := -v -lg 1 -la 1 -lc 1 --table --infer --stdlib $(SRC) --strict --fixed-exception --canonical
stage2:
@$(OCAMLBUILD) -build-dir _stage2 -tag fancy_parser \
-use-menhir -menhir "$(SRC)/_stage1/menhir.$(TARGET) $(FLAGS)" \
menhir.$(TARGET)
@ $(OCAMLBUILD) -build-dir _stage2 -tag fancy_parser \
-use-menhir -menhir "$(SRC)/_stage1/menhir.$(TARGET) $(FLAGS)" \
menhir.$(TARGET)
# ----------------------------------------------------------------------------
# Stage 3 (optional).
# Re-generate Menhir's parser using Menhir (from stage 2) and check that it
# is identical to the stage 2 parser.
stage3:
@$(OCAMLBUILD) -build-dir _stage3 -tag fancy_parser \
-use-menhir -menhir "$(SRC)/_stage2/menhir.$(TARGET) $(FLAGS)" \
parser.ml parser.mli
@for i in parser.ml parser.mli ; do \
if ! diff _stage2/$$i _stage3/$$i 2>&1 >/dev/null ; then \
echo "Bootstrap FAILED: $$i did not reach a fixed point."; exit 1 ; \
fi ; \
done; \
echo "Bootstrap successful."
@ $(OCAMLBUILD) -build-dir _stage3 -tag fancy_parser \
-use-menhir -menhir "$(SRC)/_stage2/menhir.$(TARGET) $(FLAGS)" \
parser.ml parser.mli
@ for i in parser.ml parser.mli ; do \
if ! diff _stage2/$$i _stage3/$$i 2>&1 >/dev/null ; then \
echo "Bootstrap FAILED: $$i did not reach a fixed point."; exit 1 ; \
fi ; \
done; \
echo "Bootstrap successful."
# ----------------------------------------------------------------------------
# Cleaning up.
clean::
rm -rf .versioncheck _build _stage1 _stage2 _stage3
rm -rf .versioncheck _stage1 _stage2 _stage3
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment