-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
61 lines (56 loc) · 2.17 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Configuration.
CARGO_TARGET_DIR ?= $(shell pwd)/../target
# We currently only support absolute paths.
CARGO_TARGET_DIR := $(abspath $(CARGO_TARGET_DIR))
SQ ?= $(CARGO_TARGET_DIR)/debug/sq
# Tools.
CARGO ?= cargo
ifneq ($(filter Darwin %BSD,$(shell uname -s)),)
INSTALL ?= ginstall
else
INSTALL ?= install
endif
# Installation.
.PHONY: build-release
build-release:
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
$(CARGO) build $(CARGO_FLAGS) --release --package sequoia-sq
$(MAKE) -C../store build-release
.PHONY: install
install: build-release
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
$(INSTALL) -t $(DESTDIR)$(PREFIX)/bin $(CARGO_TARGET_DIR)/release/sq
$(INSTALL) -d $(DESTDIR)$(PREFIX)/share/zsh/site-functions
$(INSTALL) -t $(DESTDIR)$(PREFIX)/share/zsh/site-functions \
$(CARGO_TARGET_DIR)/_sq
$(INSTALL) -d $(DESTDIR)$(PREFIX)/share/bash-completion/completions
$(INSTALL) $(CARGO_TARGET_DIR)/sq.bash \
$(DESTDIR)$(PREFIX)/share/bash-completion/completions/sq
$(INSTALL) -d $(DESTDIR)$(PREFIX)/share/fish/completions
$(INSTALL) -t $(DESTDIR)$(PREFIX)/share/fish/completions \
$(CARGO_TARGET_DIR)/sq.fish
$(MAKE) -C../store install
test-dsm:
cargo run -- --version
./tests/dsm/key_expiration.sh -c rsa2k
./tests/dsm/key_expiration.sh -c rsa3k
./tests/dsm/key_expiration.sh -c rsa4k
./tests/dsm/key_expiration.sh -c nistp256
./tests/dsm/key_expiration.sh -c nistp384
./tests/dsm/key_expiration.sh -c nistp521
./tests/dsm/key_expiration.sh -c cv25519
./tests/dsm/extract_dsm_import_gpg_auto.tcl -c rsa2k
./tests/dsm/extract_dsm_import_gpg_auto.tcl -c rsa3k
./tests/dsm/extract_dsm_import_gpg_auto.tcl -c rsa4k
./tests/dsm/extract_dsm_import_gpg_auto.tcl -c nistp256
./tests/dsm/extract_dsm_import_gpg_auto.tcl -c nistp384
./tests/dsm/extract_dsm_import_gpg_auto.tcl -c nistp521
./tests/dsm/extract_dsm_import_gpg_auto.tcl -c cv25519
./tests/dsm/sq_roundtrips.sh -x -c cv25519 # Passing api-key
./tests/dsm/sq_roundtrips.sh -c rsa2k
./tests/dsm/sq_roundtrips.sh -c rsa3k
./tests/dsm/sq_roundtrips.sh -c rsa4k
./tests/dsm/sq_roundtrips.sh -c nistp256
./tests/dsm/sq_roundtrips.sh -c nistp384
./tests/dsm/sq_roundtrips.sh -c nistp521
./tests/dsm/sq_roundtrips.sh -c cv25519