-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGNUmakefile
60 lines (38 loc) · 920 Bytes
/
GNUmakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.DEFAULT_GOAL := all
prefix ?= /usr/local
bindir ?= $(prefix)/bin
INSTALL = install
INSTALL_PROGRAM = $(INSTALL)
bdir = _build
.PHONY: all
all: build check
.PHONY: build
build: $(bdir)/git-branch-backup.1
.PHONY: install
install:
$(INSTALL_PROGRAM) bin/git-branch-backup $(DESTDIR)$(bindir)
.PHONY: install-home
install-home:
$(MAKE) install prefix=$(HOME)/.local
.PHONY: test
test: check
.PHONY: check
check:
PATH="$$PWD/bin:$$PATH" dram -t .dram -s zsh tests
.PHONY: clean
clean:
$(RM) -r $(bdir)
$(bdir):
mkdir -p $@
$(bdir)/%.1: doc/%.1.rst | $(bdir)
rst2man $< $@
.PHONY: image
image:
buildah bud --layers -t git-branch-backup-debian11 -f build/Containerfile ./
.PHONY: image-list
image-list:
buildah images | grep git-branch-backup
.PHONY: image-run
image-run:
buildah from --name git-branch-backup-debian11 git-branch-backup-debian11
buildah run -t git-branch-backup-debian11 bash