Skip to content
Snippets Groups Projects
Commit 5ba6fb5c authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[Doc] update devman Makefile w.r.t. dune

parent 0ef11b99
No related branches found
No related tags found
No related merge requests found
......@@ -32,58 +32,23 @@ SRC = developer \
SRC := $(addsuffix .tex, $(SRC))
SRC += macros.sty
GENERATED= \
examples/generated/callstack.ml \
examples/generated/use_callstack.ml \
examples/generated/syntactic_check.ml
DEPENDENCIES= $(FRAMAC_MODERN) $(GENERATED) frama-c-book.cls
.PHONY: all check check-hello
all: developer.pdf # check << restore check later
# This variable does not exist anymore.
# FC_BINDIR:=$(FRAMAC_ROOT_SRCDIR)/bin
# Thus TODO: use `dune exec -- frama-c` for the following commands
# local plugin.cmi (if any) is in conflict with the one of Frama-C
check: $(GENERATED) check-hello check-examples
$(ECHO) Checking compilation of example scripts
$(FC_BINDIR)/frama-c \
-load-script ./examples/syntactic_check \
-load-script ./examples/callstack \
-load-script ./examples/use_callstack \
-load-script ./examples/acsl_extension_foo \
-load-script ./examples/acsl_extension_ext_types \
-load-script ./hello_world/hello_world.ml \
| tee check.log
if grep -e "User Error" check.log; then \
echo "Examples script do not compile with current Frama-C."; \
echo "Please examine check.log and make appropriate changes"; \
exit 1; \
fi
for i in value value_gui_options visitor ; \
do $(FC_BINDIR)/frama-c -load-script ./tutorial/viewcfg/generated/$$i/cfg_print.ml ; \
done
for i in with_options with_log with_registration ; \
do $(FC_BINDIR)/frama-c -load-script ./tutorial/hello/generated/$$i/hello_world.ml ; \
done
$(ECHO) compilation ok
$(MAKE) clean-tuto
PATH=$(FC_BINDIR):$$PATH; $(MAKE) DEVELOPMENT=no PTESTS_OPTS=-error-code -C tutorial/hello/generated/with_test byte opt tests
$(MAKE) clean-tuto
PATH=$(FC_BINDIR):$$PATH; $(MAKE) DEVELOPMENT=no PTESTS_OPTS=-error-code -C tutorial/hello/generated/makefile_multiple opt
$(MAKE) clean-tuto
PATH=$(FC_BINDIR):$$PATH; $(MAKE) DEVELOPMENT=no PTESTS_OPTS=-error-code -C tutorial/hello/generated/makefile_single opt
$(MAKE) clean-tuto
PATH=$(FC_BINDIR):$$PATH; $(MAKE) DEVELOPMENT=no PTESTS_OPTS=-error-code -C tutorial/viewcfg/generated/split opt
$(MAKE) clean-tuto
DEPENDENCIES= $(FRAMAC_MODERN) frama-c-book.cls
check-hello: check-hello-v1 check-hello-v2 check-hello-v3 check-hello-v4 check-hello-v5 check-hello-v6 check-hello-v7
.PHONY: all check
all: developer.pdf
# Note: 'check' is not run by default (with make all) because it always
# takes time, and because it requires the 'bogue' opam package
# aliases used when compiling checks
duneb := dune build --root .
dunee := dune exec --root .
check: check-hello check-examples check-viewcfg
check-hello: check-hello-v1 check-hello-v2 check-hello-v3 check-hello-v4 check-hello-v5 check-hello-v6 check-hello-v7
check-hello-clean:
$(ECHO) Cleaning Hello tutorial files...
rm -rf tutorial/hello/v*/_build
......@@ -154,22 +119,29 @@ install:
rm -f ../manuals/plugin-development-guide.pdf
cp developer.pdf ../manuals/plugin-development-guide.pdf
viewcfg: viewcfg-clean viewcfg-v1
check-viewcfg: check-viewcfg-clean check-viewcfg-v1 check-viewcfg-v2 check-viewcfg-v3 check-viewcfg-v4 check-viewcfg-v5 check-viewcfg-v6
viewcfg-clean:
check-viewcfg-clean:
$(ECHO) Cleaning ViewCfg files...
rm -rf tutorial/viewcfg/v*/_build
viewcfg-v1:
cd tutorial/viewcfg/v1 && $(duneb) @install && $(duneb) @ptests
check-viewcfg-v1:
cd tutorial/viewcfg/v1-* && $(duneb) @install && $(duneb) @ptests
check-viewcfg-v2:
cd tutorial/viewcfg/v2-* && $(duneb) @install
check-viewcfg-v3:
cd tutorial/viewcfg/v2-* && $(duneb) @install && $(duneb) @ptests
tutorial/viewcfg/generated:
cd tutorial/viewcfg && make
check-viewcfg-v4:
cd tutorial/viewcfg/v2-* && $(duneb) @install
examples/generated/%.ml: examples/%.ml
mkdir -p examples/generated
cp $^ $@
headache -r $@
check-viewcfg-v5:
cd tutorial/viewcfg/v2-* && $(duneb) @install
check-viewcfg-v6:
cd tutorial/viewcfg/v2-* && $(duneb) @install
archives: FILES=$(shell cd tutorial/hello/v7-doc && git ls-files)
......@@ -186,15 +158,12 @@ archives:
gzip -9 -n > ../../hello-$$VERSION.tar.gz && \
rm -rf hello-$$VERSION
.PHONY: tutorial/hello/generated tutorial/viewcfg/generated
###########
clean:
rm -f *.aux *~ *.log *.blg *.bbl *.toc *.lof *.idx *.ilg *.ind
rm -rf _whizzy* *.raux *.wdvi *.out
rm -f *.haux *.htoc
rm -rf $(GENERATED)
distclean dist-clean: clean
rm -f $(filter-out mecanism.pdf, $(wildcard *.pdf))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment