Makefile 938 Bytes
Newer Older
1
2
3
#
# SPDX-License-Identifier: GPL-3.0-or-later

4
5
6
7
PREFIX ?= /usr/local
BIN_DIR=$(DESTDIR)$(PREFIX)/bin
DOC_DIR=$(DESTDIR)$(PREFIX)/share/doc/archiso
PROFILE_DIR=$(DESTDIR)$(PREFIX)/share/archiso
8

9
DOC_FILES=$(wildcard docs/*) $(wildcard *.rst)
10
11
SCRIPT_FILES=$(wildcard archiso/*) $(wildcard scripts/*.sh) $(wildcard .gitlab/ci/*.sh) \
             $(wildcard configs/*/profiledef.sh) $(wildcard configs/*/airootfs/usr/local/bin/*)
12

13
14
all:

15
check: shellcheck
nl6720's avatar
nl6720 committed
16

17
18
shellcheck:
	shellcheck -s bash $(SCRIPT_FILES)
19

20
install: install-scripts install-profiles install-doc
21

22
23
24
install-scripts:
	install -vDm 755 archiso/mkarchiso -t "$(BIN_DIR)/"
	install -vDm 755 scripts/run_archiso.sh "$(BIN_DIR)/run_archiso"
25

26
27
28
install-profiles:
	install -d -m 755 $(PROFILE_DIR)
	cp -a --no-preserve=ownership configs $(PROFILE_DIR)/
29
30

install-doc:
31
	install -vDm 644 $(DOC_FILES) -t $(DOC_DIR)
32

33
.PHONY: check install install-doc install-profiles install-scripts shellcheck