summaryrefslogtreecommitdiffstats
path: root/ffi
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-06-18 14:52:35 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-06-18 15:58:36 +0200
commitc99514eba879b318c25e0736064a5412ecc8fd28 (patch)
tree22a63aa0b82548249bfa0124debb9da6e10ed69f /ffi
parent022521a0f24143eb124ba4e1ec2f98bea04d170c (diff)
Improve install target.
- Add explicit build-release and install targets. - Explicitly build the crates. - Move installation to the crate's Makefile. - This allows building of Sequoia's individual parts, e.g. by using 'make -Copenpgp-ffi install'.
Diffstat (limited to 'ffi')
-rw-r--r--ffi/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/ffi/Makefile b/ffi/Makefile
index f35c2238..3dddfcd4 100644
--- a/ffi/Makefile
+++ b/ffi/Makefile
@@ -58,11 +58,14 @@ examples:
# Installation.
.PHONY: build-release
build-release:
+ CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
+ $(CARGO) build $(CARGO_FLAGS) --release --package sequoia-ffi
$(MAKE) -Clang/python build-release
$(call sequoia_pc,$(CARGO_TARGET_DIR)/release,true)
+ $(MAKE) -C../store install
.PHONY: install
-install:
+install: build-release
$(INSTALL) -d $(DESTDIR)$(PREFIX)/share/pkgconfig
$(call sequoia_pc,$(DESTDIR)$(PREFIX)/share/pkgconfig,)
$(INSTALL) -d $(DESTDIR)$(PREFIX)/include
@@ -79,6 +82,7 @@ install:
$(DESTDIR)$(PREFIX)/lib/libsequoia_ffi.$(_SEQ_LIB_EXT)
$(INSTALL) $(CARGO_TARGET_DIR)/release/libsequoia_ffi.a \
$(DESTDIR)$(PREFIX)/lib/libsequoia_ffi.a
+ $(MAKE) -C../store install
# Now the bindings.
$(MAKE) -Clang/python install