2020-05-30 00:01:28 +02:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2021-07-31 17:27:17 +02:00
|
|
|
PREFIX ?= /usr/local
|
|
|
|
BIN_DIR=$(DESTDIR)$(PREFIX)/bin
|
|
|
|
DOC_DIR=$(DESTDIR)$(PREFIX)/share/doc/archiso
|
|
|
|
PROFILE_DIR=$(DESTDIR)$(PREFIX)/share/archiso
|
2012-08-25 20:14:51 +02:00
|
|
|
|
2020-05-30 00:01:28 +02:00
|
|
|
DOC_FILES=$(wildcard docs/*) $(wildcard *.rst)
|
2021-07-31 17:27:17 +02:00
|
|
|
SCRIPT_FILES=$(wildcard archiso/*) $(wildcard scripts/*.sh) $(wildcard .gitlab/ci/*.sh) \
|
|
|
|
$(wildcard configs/*/profiledef.sh) $(wildcard configs/*/airootfs/usr/local/bin/*)
|
2012-10-13 19:40:41 +02:00
|
|
|
|
2012-08-03 22:35:08 +02:00
|
|
|
all:
|
|
|
|
|
2021-07-31 17:27:17 +02:00
|
|
|
check: shellcheck
|
2020-07-16 13:40:27 +02:00
|
|
|
|
2021-07-31 17:27:17 +02:00
|
|
|
shellcheck:
|
|
|
|
shellcheck -s bash $(SCRIPT_FILES)
|
2012-08-03 22:35:08 +02:00
|
|
|
|
2021-07-31 17:27:17 +02:00
|
|
|
install: install-scripts install-profiles install-doc
|
2012-08-03 22:35:08 +02:00
|
|
|
|
2021-07-31 17:27:17 +02:00
|
|
|
install-scripts:
|
|
|
|
install -vDm 755 archiso/mkarchiso -t "$(BIN_DIR)/"
|
|
|
|
install -vDm 755 scripts/run_archiso.sh "$(BIN_DIR)/run_archiso"
|
2012-08-03 22:35:08 +02:00
|
|
|
|
2021-07-31 17:27:17 +02:00
|
|
|
install-profiles:
|
|
|
|
install -d -m 755 $(PROFILE_DIR)
|
|
|
|
cp -a --no-preserve=ownership configs $(PROFILE_DIR)/
|
2012-08-03 22:35:08 +02:00
|
|
|
|
|
|
|
install-doc:
|
2020-05-30 00:01:28 +02:00
|
|
|
install -vDm 644 $(DOC_FILES) -t $(DOC_DIR)
|
2012-08-03 22:35:08 +02:00
|
|
|
|
2021-07-31 17:27:17 +02:00
|
|
|
.PHONY: check install install-doc install-profiles install-scripts shellcheck
|