Skip to content
Snippets Groups Projects
Makefile.dev 1.52 KiB

###############################
# a few git shortcuts

uv:update_version
update_version:
	git pull # to get the release tags!
	rm -f src/lutilsVersion.ml
	make src/lutilsVersion.ml
	cp _oasis _oasis.save
ifneq (,$(findstring -,$(VERSION)))
	echo "won't update _oasis"
else
	cat _oasis.save | sed "s/^Version:.*/Version:     $(VERSION)/" > _oasis
endif
	make clean && make

cia: test
	git commit -a -F log

ci:
	git commit  -F log

push: opam-test
	git push  && \
   echo "https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/lutils/pipelines"\
   && echo "if the CI is fine, consider issuing a 'make opam-rel'"


merge: merge_work_into_master
merge_work_into_master:
	echo "git checkout master && \
         git merge work && make opam && \
         git push "

amend:
	git commit -a -F log --amend 


###############################
# test

.PHONY: test
test:
	cd test ; make test

test-batch:
	cd test ; make test-batch

#############################
# 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))

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

NAME=lutils

opam-rel :
	./sh/make-opam-pack $(NAME)

opam-test :
	./sh/make-opam-pack $(NAME) -test

opam-pr:
	cp $(OPAM_DIR) /home/jahier/local/opam-repository/packages/

OPAM_FILE=$(shell find  $(WWW)/opam-repository/packages -name opam | head -1 | sed -e 's/^./\U&/')
OPAM_DIR=`dirname $(OPAM_FILE)`
opam-pr:
	cp $(OPAM_DIR) /home/jahier/local/opam-repository/packages/