diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-04-04 12:40:49 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-04-04 13:01:05 +0200 |
commit | 34973a1457730eb96d42d5f0718875fcef7fedd5 (patch) | |
tree | 489d9d3176335953d1a5419af707a035073a546d /Makefile | |
parent | 96b0bd3955dcc6a359d5a53ebc2782bbd7d97c7a (diff) |
Honor CARGO_FLAGS.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -3,6 +3,7 @@ # Configuration. PREFIX ?= /usr/local DESTDIR ?= +CARGO_FLAGS ?= # Signing source distributions. SIGN_WITH ?= XXXXXXXXXXXXXXXX @@ -25,30 +26,32 @@ VERSION ?= $(shell grep '^version = ' Cargo.toml | cut -d'"' -f2) # Make sure subprocesses pick these up. export PREFIX export DESTDIR +export CARGO_FLAGS all: build ffi/examples .PHONY: build build: - $(CARGO) build --all + $(CARGO) build $(CARGO_FLAGS) --all $(MAKE) -Cffi build # Testing and examples. .PHONY: test check test check: - $(CARGO) test --all + $(CARGO) test $(CARGO_FLAGS) --all $(MAKE) -Cffi test $(MAKE) examples .PHONY: examples examples: - $(CARGO) build --examples + $(CARGO) build $(CARGO_FLAGS) --examples $(MAKE) -Cffi examples # Documentation. .PHONY: doc doc: - $(CARGO) doc --no-deps --all + $(CARGO) doc $(CARGO_FLAGS) --no-deps --all + $(CARGO) doc $(CARGO_FLAGS) --no-deps --package nettle .PHONY: deploy-doc deploy-doc: doc @@ -57,7 +60,7 @@ deploy-doc: doc # Installation. .PHONY: build-release build-release: - $(CARGO) build --release --all + $(CARGO) build $(CARGO_FLAGS) --release --all $(MAKE) -Cffi build-release .PHONY: install @@ -76,7 +79,7 @@ target/dist/sequoia-$(VERSION): $(GIT) clone . target/dist/sequoia-$(VERSION) cd target/dist/sequoia-$(VERSION) && \ mkdir .cargo && \ - $(CARGO) vendor \ + $(CARGO) vendor $(CARGO_FLAGS) \ | sed 's/^directory = ".*"$$/directory = "vendor"/' \ > .cargo/config && \ rm -rf .git |