blob: 62e370afb8bb78a80b08dcc3baf3e6862cbb7b18 (
plain)
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
|
#
# SPDX-License-Identifier: GPL-3.0-or-later
PREFIX ?= /usr/local
INSTALL_DIR=$(DESTDIR)$(PREFIX)/lib/initcpio/install
HOOKS_DIR=$(DESTDIR)$(PREFIX)/lib/initcpio/hooks
DOC_DIR=$(DESTDIR)$(PREFIX)/share/doc/mkinitcpio-archiso
INSTALL_FILES=$(wildcard install/*)
HOOKS_FILES=$(wildcard hooks/*)
DOC_FILES=$(wildcard docs/*) $(wildcard *.rst)
all:
check: shellcheck shfmt
shellcheck:
shellcheck -s bash $(INSTALL_FILES)
shellcheck -s dash $(HOOKS_FILES)
shfmt:
shfmt -i 4 -d $(HOOKS_FILES) $(INSTALL_FILES)
install: install-initcpio install-doc
install-initcpio:
install -vDm 644 $(HOOKS_FILES) -t $(HOOKS_DIR)
install -vDm 644 $(INSTALL_FILES) -t $(INSTALL_DIR)
install-doc:
install -vDm 644 $(DOC_FILES) -t $(DOC_DIR)
.PHONY: check install install-initcpio install-doc shellcheck shfmt
|