sector-f-linux

Sector F Linux
git clone https://git.sectorflabs.com/sector-f-linux.git
Log | Files | Refs | README | LICENSE

Makefile (2111B)


      1 APP_NAME := patina-greeter
      2 VERSION := $(shell awk -F\" '/^version = / { print $$2; exit }' Cargo.toml)
      3 
      4 # Shots of the screens, from the mock backend (no greetd needed). They open a window, so they
      5 # need a desktop; in the VM, the greeter runs under cage instead (see ../README.md).
      6 SHOTS := docs
      7 
      8 .DEFAULT_GOAL := help
      9 
     10 .PHONY: help run run-setup build test check screenshot clean
     11 
     12 help: ## Show this help
     13 	@echo "Usage: make <target>"
     14 	@echo
     15 	@awk 'BEGIN { FS = ":.*## " } /^[a-z-]+:.*## / { printf "  \033[1m%-14s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
     16 
     17 run: ## Run the login on the mock, in a window (the password is "sectorf")
     18 	PATINA_GREETER_MOCK=login PATINA_GREETER_SIZE=1280x800 cargo run
     19 
     20 run-setup: ## Run the first-run setup on the mock, in a window
     21 	PATINA_GREETER_MOCK=setup PATINA_GREETER_SIZE=1280x800 cargo run
     22 
     23 build: ## Build a release binary
     24 	cargo build --release
     25 
     26 test: ## Run the tests (and the first-run polkit rules against a stand-in for polkit, if node is there)
     27 	cargo test
     28 	@if command -v node >/dev/null 2>&1; then node tests/first-run-rules.js; else echo "node is not installed: the polkit rules were not tested"; fi
     29 
     30 check: test ## Run the tests and clippy, as before a commit
     31 	cargo clippy --all-targets -- -D warnings
     32 
     33 screenshot: ## Regenerate docs/screenshot-*.png from the mock (needs a desktop)
     34 	@mkdir -p $(SHOTS)
     35 	PATINA_GREETER_MOCK=login PATINA_GREETER_SIZE=1280x800 PATINA_GREETER_SCREENSHOT=$(SHOTS)/screenshot-login.png cargo run
     36 	PATINA_GREETER_MOCK=login PATINA_GREETER_SIZE=1280x800 PATINA_GREETER_DEMO=typing PATINA_GREETER_SCREENSHOT=$(SHOTS)/screenshot-login-typing.png cargo run
     37 	PATINA_GREETER_MOCK=login PATINA_GREETER_SIZE=1280x800 PATINA_GREETER_DEMO=wrong PATINA_GREETER_SCREENSHOT=$(SHOTS)/screenshot-login-wrong.png cargo run
     38 	PATINA_GREETER_MOCK=setup PATINA_GREETER_SIZE=1280x800 PATINA_GREETER_SCREENSHOT=$(SHOTS)/screenshot-setup.png cargo run
     39 	PATINA_GREETER_MOCK=setup PATINA_GREETER_SIZE=1280x800 PATINA_GREETER_DEMO=filled PATINA_GREETER_SCREENSHOT=$(SHOTS)/screenshot-setup-filled.png cargo run
     40 
     41 clean: ## Remove build output
     42 	cargo clean