diff --git a/Makefile b/Makefile index 25309e1..fa12202 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,10 @@ BUG_REPORTS="https://github.com/afiniate/afin/issues" DESC_FILE=$(CURDIR)/description +# This has to be overridable as packaging tools usually work on an exported +# source directory, not on a git repo +SEMVER ?= $(shell vrt build semver) + BUILD_DEPS=vrt oUnit DEPS=core async sexplib core_extended @@ -82,22 +86,23 @@ build: $(BUILD) $(NAME).cma $(NAME).cmx \ $(NAME).cmxa $(NAME).a $(NAME).cmxs -test:0 +test: $(BUILD) $(NAME)_unit_tests_run.byte $(BUILD_DIR)/lib/$(NAME)_unit_tests_run.byte metadata: - vrt prj make-meta \ + vrt build make-meta \ --target-dir $(LIB_DIR) \ --name $(NAME) \ $(MOD_DEPS) \ - --description-file $(DESC_FILE) + --description-file $(DESC_FILE) \ + --semver $(SEMVER) -install: +install: build metadata cd $(LIB_DIR); ocamlfind install $(NAME) META \ - `find ./ -name "*.cmi" -o -name "*.cmo" -o -name "*.o" \ + $$(find ./ -name "*.cmi" -o -name "*.cmo" -o -name "*.o" \ -o -name "*.cmx" -o -name "*.cmxa" -o -name "*.cmxs" -o \ - -name "*.a" -o -name "*.cma" -o -name "*.mli"` + -name "*.a" -o -name "*.cma" -o -name "*.mli" -o -name "*.cmt") remove: