Skip to content
Snippets Groups Projects
Makefile 5.16 KiB
Newer Older
Erwan Jahier's avatar
Erwan Jahier committed

Pascal Raymond's avatar
Pascal Raymond committed
all: doit

include ./Makefile.common
Pascal Raymond's avatar
Pascal Raymond committed

SOC_SOURCES = \
	$(OBJDIR)/data.mli \
	$(OBJDIR)/data.ml \
	$(OBJDIR)/soc.ml \
	$(OBJDIR)/socUtils.mli \
	$(OBJDIR)/socUtils.ml \
	$(OBJDIR)/socPredef.mli \
	$(OBJDIR)/socPredef.ml \
	$(OBJDIR)/toposort.mli \
	$(OBJDIR)/toposort.ml \
	$(OBJDIR)/actionsDeps.mli \
	$(OBJDIR)/actionsDeps.ml \
	$(OBJDIR)/lic2soc.mli \
	$(OBJDIR)/lic2soc.ml \
	$(OBJDIR)/socExecValue.mli \
	$(OBJDIR)/socExecValue.ml \
	$(OBJDIR)/rif_base.mli \
	$(OBJDIR)/rif_base.ml \
	$(OBJDIR)/socExecEvalPredef.mli \
	$(OBJDIR)/socExecEvalPredef.ml \
	$(OBJDIR)/socExec.mli \
	$(OBJDIR)/socExec.ml
Pascal Raymond's avatar
Pascal Raymond committed
	$(OBJDIR)/version.ml \
	$(OBJDIR)/verbose.mli \
	$(OBJDIR)/genlex.mli \
	$(OBJDIR)/genlex.ml \
Pascal Raymond's avatar
Pascal Raymond committed
	$(OBJDIR)/verbose.ml \
	$(OBJDIR)/filenameExtras.mli \
	$(OBJDIR)/filenameExtras.ml \
	$(OBJDIR)/mainArgs.ml \
	$(OBJDIR)/mainArgs.mli \
Pascal Raymond's avatar
Pascal Raymond committed
	$(OBJDIR)/ident.mli \
	$(OBJDIR)/ident.ml \
	$(OBJDIR)/lxm.mli \
	$(OBJDIR)/lxm.ml \
	$(OBJDIR)/errors.ml \
	$(OBJDIR)/astPredef.ml \
	$(OBJDIR)/astCore.ml \
	$(OBJDIR)/astV6.ml \
	$(OBJDIR)/astV6Dump.mli \
	$(OBJDIR)/astV6Dump.ml \
	$(OBJDIR)/astRecognizePredef.mli \
	$(OBJDIR)/astRecognizePredef.ml \
Pascal Raymond's avatar
Pascal Raymond committed
	$(OBJDIR)/parserUtils.ml \
	$(OBJDIR)/parser.mly \
	$(OBJDIR)/lexer.mll \
	$(OBJDIR)/astInstanciateModel.mli \
	$(OBJDIR)/astInstanciateModel.ml \
	$(OBJDIR)/astTabSymbol.mli \
	$(OBJDIR)/astTabSymbol.ml \
	$(OBJDIR)/astTab.mli \
	$(OBJDIR)/astTab.ml \
	$(OBJDIR)/lic.ml \
	$(OBJDIR)/idSolver.ml \
	$(OBJDIR)/licName.mli \
	$(OBJDIR)/licName.ml \
Pascal Raymond's avatar
Pascal Raymond committed
	$(OBJDIR)/licDump.ml \
	$(OBJDIR)/licPrg.mli \
	$(OBJDIR)/licPrg.ml \
	$(SOC_SOURCES) \
Pascal Raymond's avatar
Pascal Raymond committed
	$(OBJDIR)/unifyType.mli \
	$(OBJDIR)/unifyType.ml \
	$(OBJDIR)/unifyClock.mli \
	$(OBJDIR)/unifyClock.ml \
	$(OBJDIR)/licEvalType.mli \
	$(OBJDIR)/licEvalType.ml \
	$(OBJDIR)/licEvalConst.mli \
	$(OBJDIR)/licEvalConst.ml \
	$(OBJDIR)/licEvalClock.mli \
	$(OBJDIR)/licEvalClock.ml \
Pascal Raymond's avatar
Pascal Raymond committed
	$(OBJDIR)/evalConst.mli \
	$(OBJDIR)/evalConst.ml \
	$(OBJDIR)/evalType.mli \
	$(OBJDIR)/evalType.ml \
	$(OBJDIR)/evalClock.mli \
	$(OBJDIR)/evalClock.ml \
	$(OBJDIR)/licMetaOp.mli \
	$(OBJDIR)/licMetaOp.ml \
	$(OBJDIR)/ast2lic.mli \
	$(OBJDIR)/ast2lic.ml \
	$(OBJDIR)/misc.ml \
	$(OBJDIR)/l2lCheckLoops.mli \
	$(OBJDIR)/l2lCheckLoops.ml \
	$(OBJDIR)/l2lCheckOutputs.mli \
	$(OBJDIR)/l2lCheckOutputs.ml \
	$(OBJDIR)/l2lExpandArrays.mli \
	$(OBJDIR)/l2lExpandArrays.ml \
	$(OBJDIR)/l2lExpandNodes.mli \
	$(OBJDIR)/l2lExpandNodes.ml \
	$(OBJDIR)/l2lExpandMetaOp.ml \
	$(OBJDIR)/l2lExpandMetaOp.mli \
	$(OBJDIR)/l2lRmPoly.mli \
	$(OBJDIR)/l2lRmPoly.ml \
	$(OBJDIR)/l2lAliasType.mli \
	$(OBJDIR)/l2lAliasType.ml \
	$(OBJDIR)/l2lSplit.mli \
	$(OBJDIR)/l2lSplit.ml \
	$(OBJDIR)/licTab.ml \
	$(OBJDIR)/licTab.mli \
Pascal Raymond's avatar
Pascal Raymond committed
	$(OBJDIR)/compile.ml \

SOURCES =  \
	$(COMPILER_SOURCES) \
Pascal Raymond's avatar
Pascal Raymond committed
	$(OBJDIR)/main.ml

LDBG_SOURCES =  \
	$(COMPILER_SOURCES) \
	$(OBJDIR)/failure.ml \
	$(OBJDIR)/expr.ml \
	$(OBJDIR)/event.ml \
	$(OBJDIR)/lus2licRun.mli \
	$(OBJDIR)/lus2licRun.ml


ln_ldbg: $(OBJDIR) $(LDBG_SOURCES)
ldbg : ln_ldbg
	make -f Makefile.lib4lurette ncl
	make -f Makefile.lib4lurette bcl
Pascal Raymond's avatar
Pascal Raymond committed
# Be sure to build those files before doing something else
# since they are needed by $(RESULT)
PRE_TARGETS=$(OBJDIR)/version.ml

NOMLI_SOURCES=$(filter %.ml %.mll %.mly, $(SOURCES))

NOMLY_SOURCES=$(SOURCES:.mly=.ml)
MLONLY_SOURCES=$(NOMLY_SOURCES:.mll=.ml)

dot:
	ocamldoc -I  $(OBJDIR) $(MLONLY_SOURCES) -d ocamldoc -dot -dot-reduce
	dot -Tpdf ocamldoc.out > lus2lic.pdf
	ocamldoc -I  $(OBJDIR) $(MLONLY_SOURCES) -d ocamldoc -dot -dot-reduce -dot-types
	dot -Tpdf ocamldoc.out > lus2lic-types.pdf
	xpdf lus2lic.pdf
	xpdf lus2lic-types.pdf

html:
	ocamldoc -I  $(OBJDIR) $(MLONLY_SOURCES) -d ocamldoc -html -keep-code

nomli:
	rm $(OBJDIR)/*.mli

debug: nomli dc
Pascal Raymond's avatar
Pascal Raymond committed

ln: $(OBJDIR) $(SOURCES)

doit: ln
	make nc

include $(OCAMLMAKEFILE)

# Specific rule (version)

.PRECIOUS: $(OBJDIR)/version.ml

$(OBJDIR)/version.ml: Makefile
	echo "(** Automatically gen	erated from Makefile *) " > $@
Pascal Raymond's avatar
Pascal Raymond committed
	echo "let tool = \"lus2lic\"" >> $@
	echo "let branch = \"$(shell utils/get_branch_name)\"" >> $@
	echo "let commit = \"$(shell utils/get_commit_number)\"" >> $@
	echo "let sha_1 = \"$(shell utils/get_sha_1)"\">> $@
	echo "let str = (branch ^ \".\" ^ commit ^ \" (\" ^ sha_1 ^ \")\")">> $@
	echo "let maintainer = \"jahier@imag.fr\"">> $@

Pascal Raymond's avatar
Pascal Raymond committed
	make all
	make test

Pascal Raymond's avatar
Pascal Raymond committed
# TEST, NON REGR. ETC...
Erwan Jahier's avatar
Erwan Jahier committed

.PHONY: diff test log
Erwan Jahier's avatar
Erwan Jahier committed

diff:
	rm -f diff_lv6.diff; git diff --ignore-all-space > diff_lv6.diff ; ls -l diff_lv6.diff
Erwan Jahier's avatar
Erwan Jahier committed

OTAGS=$(HOME)/bin/otags
tags:
	$(OTAGS) -v $(shell $(OCAMLC) -where)/*.mli   $(OBJDIR)/*.ml

Erwan Jahier's avatar
Erwan Jahier committed
log:
	rm -f lv6.log; git log > lv6.log

	cd $(TESTDIR) ; make test ; cd $(curdir)
Pascal Raymond's avatar
Pascal Raymond committed

Clean:
	rm -rf $(OBJDIR)

Pascal Raymond's avatar
Pascal Raymond committed

Erwan Jahier's avatar
Erwan Jahier committed

Pascal Raymond's avatar
Pascal Raymond committed
ci: $(OBJDIR)/version.ml
	make test && git commit -F log && rm -f $(OBJDIR)/version.ml
Erwan Jahier's avatar
Erwan Jahier committed

Pascal Raymond's avatar
Pascal Raymond committed
cia: $(OBJDIR)/version.ml
	git commit -a -F log && rm -f $(OBJDIR)/version.ml
Erwan Jahier's avatar
Erwan Jahier committed

	git commit -a -F log --amend  && rm -f $(OBJDIR)/version.ml
	git push git+ssh://jahier@scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/git/lustre/lus2lic.git
pull:
	git pull git+ssh://jahier@scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/git/lustre/lus2lic.git