Newer
Older
Erwan Jahier
committed
LIBS = str unix
OCAMLC=ocamlc
#OCAMLNCFLAGS=-inline 100 -unsafe -noassert -ccopt -O9
SOURCES = \
./version.ml \
./verbose.mli \
./verbose.ml \
Erwan Jahier
committed
./global.ml \
./ident.mli \
./ident.ml \
./predef.ml \
./solveIdent.mli \
./solveIdent.ml \
./parserUtils.ml \
Erwan Jahier
committed
./syntaxTabUtils.mli \
./syntaxTabUtils.ml \
./instanciateModel.mli \
./instanciateModel.ml \
./name.mli \
./name.ml \
./polymorphism.ml \
./unifyType.mli \
./unifyType.ml \
./unifyClock.mli \
./unifyClock.ml \
Erwan Jahier
committed
./syntaxTab.mli \
./syntaxTab.ml \
./predefEvalType.mli \
./predefEvalType.ml \
./predefEvalConst.mli \
./predefEvalConst.ml \
./predefEvalClock.mli \
./predefEvalClock.ml \
./evalType.mli \
./evalType.ml \
./evalClock.mli \
./evalClock.ml \
./structArrayExpand.mli \
./structArrayExpand.ml \
./uniqueOutput.mli \
./uniqueOutput.ml \
./split.mli \
./split.ml \
./inline.mli \
./inline.ml \
./getEff.mli \
./getEff.ml \
./lazyCompiler.ml \
./lazyCompiler.mli \
./compile.ml \
./main.ml
# Be sure to build those files before doing something else
# since they are needed by $(RESULT)
PRE_TARGETS=./version.ml
##############################################################################
# searching for untested code
prof: test/ocamlprof.dump
mkdir prof || rm prof/*
for d in ${SOURCES}; do \
ocamlprof -F "ocamlprof: " -f test/ocamlprof.dump $$d > prof/$$d ;\
done
Erwan Jahier
committed
rm test/ocamlprof.dump || true
make clean
make prof
grep -n -e "(\* ocamlprof: 0 \*)" prof/*.ml | grep -v "assert false" > dead.grep
grep -n -e "(\* ocamlprof: " prof/*.ml | grep -v "assert false" > all.grep
DEAD_HITS=`wc -l dead.grep | cut -f 1 -d " "`;\
ALL_HITS=`wc -l all.grep | cut -f 1 -d " "`;\
SOL=`echo "scale=2 ; $$DEAD_HITS * 100 / $$ALL_HITS " | bc ` ;\
echo "$$DEAD_HITS / $$ALL_HITS = $$SOL %" > untested_line_counter
cat untested_line_counter
##############################################################################"
mkdir -p mli
mv *.mli mli/
make MLONLY=yes SOURCES="$(MLONLY_SOURCES)" dc || true
# cf ../release-lv6/Makefile pour une install complete.
verimag:
cp lus2lic /usr/local/tools/lustre-v6/current/bin
.PHONY: test
cd test; make test
utest: $(RESULT)
cd test; make utest
diff:
cd ..; make diff
cia:
cd ..; make cia
ci:
cd ..; make ci
wc:
wc $(SOURCES)
dot2ps:
dot -Tps lus2lic.dot > lus2lic.dot.ps
# Specific rule (version)
Erwan Jahier
committed
.PRECIOUS: version.ml
version.ml:
echo "(* Automatically generated from src/Makefile *) " > version.ml
echo "let tool = \"lus2lic\"" >> version.ml
echo "let branch = \"$(shell utils/get_branch_name)\"" >> version.ml
echo "let commit = \"$(shell utils/get_commit_number)\"" >> version.ml
echo "let sha_1 = \"$(shell utils/get_sha_1)"\">> version.ml
echo "let str = (branch ^ \".\" ^ commit)">> version.ml