Skip to content
Snippets Groups Projects
Makefile.dev 3.18 KiB
Newer Older



#######################################################################################
# TEST, NON REGR. ETC...
TESTDIR=./test

.PHONY: diff test log

test_nc: 
	cd $(TESTDIR) ; make test ; cd $(curdir)

test: 
	cd $(TESTDIR) ; make ; make time
	cd $(curdir)

qtest: 
	cd $(TESTDIR) ; make test ; make time
	cd $(curdir)

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

#######################################################################################
# Workflow:
# C=git commit ;  A=git amend ; U=update_version ; P=opam pack
# to make sure the sha and the version are good, one should never
# do U and then A.
# to avoid such problems, legal trace are defined by this automata:
# 0 -C-> 1
# 1 -P-> 1
# 1 -A-> 1
# 1 -U-> 0
# to implement such a workflow, C puts a lock (state 1) and U removes it (state 0)

update_version: 
	rm -f src/lv6version.ml
	make src/lv6version.ml
	cp _oasis _oasis.save
	cat _oasis.save | sed "s/^Version:.*/Version:     $(VERSION)/" > _oasis
	rm committed
	git add _oasis
	git add src/lv6version.ml
	test -f committed && \
   echo "*** I won't commit!\n*** until you 'make update_version'!" \
      || (git commit -a -F log && touch committed)
	test -f committed  && \
   echo "*** I won't commit!\n*** until you 'make update_version'!" \
      || (git commit  -F log && touch committed)

amend:
	test -f committed && git commit -a -F log --amend 

###############################
# forge

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

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


###############################
# opam-ing

NAME=lustre-v6
WWW=/import/www/DIST-TOOLS/SYNCHRONE
HTTP=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE

# for testing opam packages before publishing
WWWTEST=/import/www/DIST-TOOLS/SYNCHRONE/test
HTTPTEST=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/test

$(PACKNAME).tgz:
	git archive --prefix=$(PACKNAME)/ -o $(PACKNAME).tgz HEAD

$(WWW)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz
	mv $^ $@ 

$(WWWTEST)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz
	mv $^ $@ 
opam : $(WWW)/pool/$(PACKNAME).tgz
	test -f committed && ( \
     cd $(WWW)/opam-repository/packages && \
	  oasis2opam   $(HTTP)/pool/$(PACKNAME).tgz && \
	  cd .. ; opam-admin check  && opam-admin make -g \
     ) || echo "*** I won't make an opam package\n*** until you commit something!"
opam-test : $(WWWTEST)/pool/$(PACKNAME).tgz
	cd $(WWWTEST)/opam-repository/packages && \
	oasis2opam  $(HTTPTEST)/pool/$(PACKNAME).tgz && \
	cd .. ; opam-admin check  && opam-admin make -g

Erwan Jahier's avatar
Erwan Jahier committed
verimag:
	echo "su synchron + opam update + opam upgrade "

#
# nb : pour installer la derniere version dans /usr/local/tools/lustre/v6
# il suffit de faire
# make opam + su synchron + opam update + opam upgrade

###############################
# tags

OTAGS=otags
# otags don't manage to parse gnuplotRif.ml
NO_TAGS=gnuplotRif.ml
tags:
	$(OTAGS) -v $(shell ocamlc -where)/*.mli  $(shell ls src/*.ml | grep -v $(NO_TAGS))
tags2:
	$(OTAGS) -v  $(shell ls src/*.ml | grep -v $(NO_TAGS))