Skip to content

Commit 03467d7

Browse files
committed
Add Makefile to install system deps
Signed-off-by: Miroslav Vadkerti <[email protected]>
1 parent 1b6acd2 commit 03467d7

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

Makefile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.DEFAULT_GOAL := help
2+
3+
# Use force targets instead of listing all the targets we have via .PHONY
4+
# https://www.gnu.org/software/make/manual/html_node/Force-Targets.html#Force-Targets
5+
.FORCE:
6+
7+
# Help prelude
8+
define PRELUDE
9+
Newa project makefile help.
10+
11+
Usage:
12+
make [target]
13+
14+
endef
15+
16+
##@ Utils
17+
18+
system/fedora: .FORCE ## Install Fedora system requirements (needs sudo)
19+
sudo dnf -y install krb5-devel
20+
21+
# See https://www.thapaliya.com/en/writings/well-documented-makefiles/ for details.
22+
reverse = $(if $(1),$(call reverse,$(wordlist 2,$(words $(1)),$(1)))) $(firstword $(1))
23+
24+
help: .FORCE ## Show this help
25+
@awk 'BEGIN {FS = ":.*##"; printf "$(info $(PRELUDE))"} /^[a-zA-Z_/-]+:.*?##/ { printf " \033[36m%-35s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(call reverse, $(MAKEFILE_LIST))

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
## Contribute
44

5+
Currently the code expects a stable Fedora release.
6+
57
```shell
8+
$ make system/fedora
69
$ hatch env create dev
710
$ hatch -e dev shell
811
$ newa

0 commit comments

Comments
 (0)