gst-client 0.2.1

Provides bindings for the main functionalities of the GStreamer Daemon
Documentation
###############################
# Common defaults/definitions #
###############################

comma := ,

# Checks two given strings for equality.
eq = $(if $(or $(1),$(2)),$(and $(findstring $(1),$(2)),\
                                $(findstring $(2),$(1))),1)

OS_NAME := $(shell uname -s)




###########
# Aliases #
###########

check: fmt lint doc

fmt: cargo.fmt

lint: cargo.lint

doc: cargo.doc

test: cargo.test


##################
# Cargo commands #
##################

# Format Rust sources with rustfmt.
#
# Usage:
#	make cargo.fmt [check=(no|yes)]

cargo.fmt:
	cargo +nightly fmt --all $(if $(call eq,$(check),yes),-- --check,)


# Lint Rust sources with Clippy.
#
# Usage:
#	make cargo.lint

cargo.lint:
	cargo clippy --all -- -D clippy::pedantic -D warnings



# Generate Rust docs.
#
# Usage:
#	make cargo.doc

cargo.doc:
	cargo doc --all-features

# Run tests
#
# Usage:
#	make cargo.test

cargo.test:
	cargo nextest run


##################
# .PHONY section #
##################

.PHONY: fmt lint test\
        cargo.fmt cargo.lint cargo.test