diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -13,6 +13,7 @@ RUST_IN_DOCKER := \ advancedtelematic/rust:latest CARGO := $(RUST_IN_DOCKER) cargo +TARGET := x86_64-unknown-linux-gnu # function for building new packages define make-pkg @@ -30,7 +31,7 @@ define make-pkg endef -.PHONY: help run clean test doc client image deb rpm version for-meta-rust +.PHONY: help run clean test doc client image deb rpm version .DEFAULT_GOAL := help help: @@ -58,7 +59,7 @@ clean: ## Remove all compiled libraries, builds and temporary files. @rm -rf rust-openssl .cargo test: rust-openssl ## Run all cargo tests. - $(CARGO) test + $(CARGO) test --target=$(TARGET) doc: ## Generate documentation for the sota crate. $(CARGO) doc --lib --no-deps --release @@ -68,8 +69,8 @@ clippy: ## Run clippy lint checks using the nightly compiler. rustup run nightly cargo clippy -- -Dclippy client: rust-openssl src/ ## Compile a new release build of the client. - $(CARGO) build --release - @cp target/release/sota_client run/ + $(CARGO) build --release --target=$(TARGET) + @cp target/$(TARGET)/release/sota_client run/ image: client ## Build a Docker image for running the client. @docker build --tag advancedtelematic/sota-client run @@ -83,12 +84,6 @@ rpm: client ## Create a new RPM package of the client. version: ## Print the version that will be used for building packages. @echo $(PACKAGE_VERSION) -for-meta-rust: - $(RUST_IN_DOCKER) /bin/bash -c "\ - /root/.cargo/bin/rustup override set 1.7.0 && \ - cargo clean && \ - cargo test" - rust-openssl: @git clone https://github.com/sfackler/rust-openssl $@ @cd $@ && git checkout df30e9e700225fb981d8a3cdfaf0b359722a4c9a |