Commit 2faca505 authored by POTTIER Francois's avatar POTTIER Francois

Allow building the demos to 'succeed' even if dune is absent.

parent 847850c0
......@@ -128,7 +128,7 @@ package: clean
@ grep -v my_warnings src/_tags > $(PACKAGE)/src/_tags
# Clean up the demos, including those that are not built by default
# because they require dune.
@ $(MAKE) -C $(PACKAGE)/demos realclean
@ $(MAKE) -C $(PACKAGE)/demos clean
# Set the version number into the files that mention it. These
# include version.ml, StaticVersion.{ml,mli}, version.tex, META.
@ echo "-> Setting version to $(DATE)."
......
# The following demos require menhirLib:
# calc-incremental
# calc-inspection
# The following demos require menhirSdk:
# generate-printers
# The following demos require dune (a.k.a. jbuilder)
# and assume that Menhir is already installed:
# calc-dune
# calc-incremental-dune
# The demos whose name ends in -dune require dune (a.k.a. jbuilder)
# and assume that Menhir is installed.
DEMOS := \
calc \
......@@ -15,8 +15,10 @@ DEMOS := \
calc-incremental \
calc-inspection \
generate-printers \
calc-dune \
calc-incremental-dune \
.PHONY: all clean realclean
.PHONY: all clean
all clean::
@for i in $(DEMOS) ; do \
......@@ -25,7 +27,3 @@ all clean::
clean::
/bin/rm -f *~ .*~
realclean: clean
make -C calc-dune clean
make -C calc-incremental-dune clean
......@@ -4,11 +4,15 @@ DUNE := jbuilder
EXECUTABLE := calc.exe
all:
$(DUNE) build $(EXECUTABLE)
@ if command -v $(DUNE) > /dev/null ; then \
$(DUNE) build $(EXECUTABLE) ; \
else \
echo "Error: $(DUNE) is required." ; \
fi
clean:
$(DUNE) clean
rm -f *~ .*~
rm -rf `cat .gitignore`
rm -f *~
test: all
@echo "The following command should print 42:"
......
......@@ -4,11 +4,15 @@ DUNE := jbuilder
EXECUTABLE := calc.exe
all:
$(DUNE) build $(EXECUTABLE)
@ if command -v $(DUNE) > /dev/null ; then \
$(DUNE) build $(EXECUTABLE) ; \
else \
echo "Error: $(DUNE) is required." ; \
fi
clean:
$(DUNE) clean
rm -f *~ .*~
rm -rf `cat .gitignore`
rm -f *~
test: all
@echo "The following command should print 42:"
......
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