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

# oasis entry points
all:build
build: setup.data src/lv6version.ml
	ocaml setup.ml -build          
setup.ml:_oasis
	oasis setup
PROF=--enable-profile
PROF=--disable-profile
	ocaml setup.ml -configure $(PROF)  --prefix $(LUSTREV6_PATH) --exec-prefix $(LUSTREV6_PATH)/$(HOSTTYPE)
install:
	ocaml setup.ml -install
Pascal Raymond's avatar
Pascal Raymond committed

uninstall:
	ocaml setup.ml -uninstall
Pascal Raymond's avatar
Pascal Raymond committed

reinstall:
	ocaml setup.ml -reinstall
Pascal Raymond's avatar
Pascal Raymond committed

clean:
	ocaml setup.ml -clean
	rm setup.data
Pascal Raymond's avatar
Pascal Raymond committed

distclean:
	ocaml setup.ml -distclean
Pascal Raymond's avatar
Pascal Raymond committed

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


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

.PHONY: diff test log

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

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

Erwan Jahier's avatar
Erwan Jahier committed
jenkins-test: 
	cd $(TESTDIR) ; make jenkins
	cd $(curdir)


# Make sure lurettetop is compiled with a fresh version of the lus2lic lib
	cp ~/lurette/_build/ltop/src/lurettetop.native  test/lurettetop
# copy (lus2lic -> lurette) the shared source to the lurette directory
	chmod u+w ../lurette/source/lus2lic/*
	cp src/*.ml ../lurette/source/lus2lic/
	cp src/*.mli ../lurette/source/lus2lic/
	cp src/*.mly ../lurette/source/lus2lic/
	cp src/*.mll ../lurette/source/lus2lic/
	chmod u-w ../lurette/source/lus2lic/*

# Keep those files in sync as they are shared with lurette
# and prevent their modification
cp_comon_file:
	chmod u+w src/verbose.ml 
	chmod u+w src/verbose.mli 
	cp $(LURETTEDIR)/source/Lutin/verbose.ml src/
	cp $(LURETTEDIR)/source/Lutin/verbose.mli src/
	chmod u-w src/verbose.ml 
	chmod u-w src/verbose.mli 
labo:
	cp lus2lic /usr/local/tools/lustre/v6/current/bin

#######################################################################################
# git entry points

ci: 
	git commit -F log && rm -f src/lv6version.ml

cia: src/lv6version.ml
	git commit -a -F log && rm -f src/lv6version.ml


amend:
	git commit  -F log --amend  && rm -f src/lv6version.ml

amend-a:
	git commit -a -F log --amend  && rm -f src/lv6version.ml

push:
	git push git+ssh://$(USER)@scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/git/lustre/lus2lic.git
	git pull git+ssh://$(USER)@scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/git/lustre/lus2lic.git

#######################################################################################
# misc

show:
	git  log --reverse --pretty=oneline  | nl  

dot:
Erwan Jahier's avatar
Erwan Jahier committed
	ocamldoc   src/*.ml  -d ocamldoc -dot -dot-reduce  || true
	dot -Tpdf ocamldoc.out > lus2lic.pdf
Erwan Jahier's avatar
Erwan Jahier committed
	ocamldoc  _build/src/*.ml -d ocamldoc -dot -dot-reduce -dot-types
	dot -Tpdf ocamldoc.out > lus2lic-types.pdf
	xpdf lus2lic.pdf
	xpdf lus2lic-types.pdf

html:
Erwan Jahier's avatar
Erwan Jahier committed
	ocamldoc -I  _build/src/ -I ~/rdbg/_build/src/ src/*.ml _build/src/*.ml -d ocamldoc -html -keep-code
debug:
	@echo "just type \"rundbg <args>\""

dif:
	git --no-pager diff  --color-words

diff:
	rm -f diff_lv6.diff; git diff --ignore-all-space > diff_lv6.diff ; ls -l diff_lv6.diff

OTAGS=otags
tags:
	$(OTAGS) -v  src/*.ml $(shell ocamlc -where)/*.mli 

log:
	rm -f lv6.log; git log > lv6.log