Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix package #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down