File: Makefile

package info (click to toggle)
image-garden 0.4.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 564 kB
  • sloc: sh: 515; python: 305; makefile: 189
file content (38 lines) | stat: -rw-r--r-- 940 bytes parent folder | download
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
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Zygmunt Krynicki
DESTDIR ?=

prefix ?= /usr/local
exec_prefix ?= $(prefix)

sysconfdir ?= $(prefix)/etc
bindir ?= $(exec_prefix)/bin

.PHONY: all
all::

.PHONY: clean
clean::

.PHONY: install
install:: image-garden-proxy acng.conf $(if $(DESTDIR),| $(DESTDIR))
	install -m 755 -d $(DESTDIR)$(bindir)
	install -m 755 -t $(DESTDIR)$(bindir) image-garden-proxy
	install -m 755 -d $(DESTDIR)$(sysconfdir)
	install -m 755 -d $(DESTDIR)$(sysconfdir)/apt-cacher-ng
	install -m 644 -t $(DESTDIR)$(sysconfdir)/apt-cacher-ng acng.conf

ifneq (,$(DESTDIR))
$(DESTDIR):
	mkdir -p $(DESTDIR)
endif

.PHONY: check
check: SHELLCHECK ?= $(or $(shell command -v shellcheck),$(error program shellcheck is required))
check: image-garden-proxy
	$(SHELLCHECK) $^

.PHONY: fmt
fmt: SHFMT ?= $(or $(shell command -v shfmt),$(error program shfmt is required))
fmt: image-garden-proxy
	$(SHFMT) -w $^