Verified Commit 874166ec authored by David Runge's avatar David Runge
Browse files

Makefile: Remove mkinitcpio-archiso specific targets

Remove all code specific to mkinitcpio-archiso.
Allow overriding PREFIX (defaults to /usr/local).
Gather scripts to check more generically.
Add abstractions for installation directories.
parent 571ea810
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
INSTALL_FILES=$(wildcard archiso/initcpio/install/*) PREFIX ?= /usr/local
HOOKS_FILES=$(wildcard archiso/initcpio/hooks/*) BIN_DIR=$(DESTDIR)$(PREFIX)/bin
SCRIPT_FILES=$(wildcard archiso/initcpio/script/*) DOC_DIR=$(DESTDIR)$(PREFIX)/share/doc/archiso
DOC_FILES=$(wildcard docs/*) $(wildcard *.rst) DOC_FILES=$(wildcard docs/*) $(wildcard *.rst)
SCRIPT_FILES=$(wildcard archiso/*) $(wildcard scripts/*.sh) $(wildcard .gitlab/ci/*.sh) \
DOC_DIR=$(DESTDIR)/usr/share/doc/archiso $(wildcard configs/*/ $(wildcard configs/*/airootfs/usr/local/bin/*)
all: all:
check: lint check: shellcheck
shellcheck -s bash archiso/mkarchiso \
$(wildcard scripts/*.sh) \
$(wildcard .gitlab/ci/*.sh) \
$(wildcard configs/*/ \
$(wildcard configs/*/ \
configs/releng/airootfs/root/ \
configs/releng/airootfs/usr/local/bin/choose-mirror \
shellcheck -s dash $(HOOKS_FILES) $(SCRIPT_FILES)
install: install-program install-examples install-doc shellcheck:
shellcheck -s bash $(SCRIPT_FILES)
install-program: install: install-scripts install-profiles install-doc
install -vDm 755 archiso/mkarchiso -t "$(DESTDIR)/usr/bin/"
install -vDm 755 scripts/ "$(DESTDIR)/usr/bin/run_archiso"
install-initcpio: install-scripts:
install -d $(SCRIPT_DIR) $(HOOKS_DIR) $(INSTALL_DIR) install -vDm 755 archiso/mkarchiso -t "$(BIN_DIR)/"
install -m 755 -t $(SCRIPT_DIR) $(SCRIPT_FILES) install -vDm 755 scripts/ "$(BIN_DIR)/run_archiso"
install -m 644 -t $(HOOKS_DIR) $(HOOKS_FILES)
install -m 644 -t $(INSTALL_DIR) $(INSTALL_FILES)
install-examples: install-profiles:
install -d -m 755 $(DESTDIR)/usr/share/archiso/ install -d -m 755 $(PROFILE_DIR)
cp -a --no-preserve=ownership configs $(DESTDIR)/usr/share/archiso/ cp -a --no-preserve=ownership configs $(PROFILE_DIR)/
install-doc: install-doc:
install -vDm 644 $(DOC_FILES) -t $(DOC_DIR) install -vDm 644 $(DOC_FILES) -t $(DOC_DIR)
.PHONY: check install install-program install-initcpio install-examples install-doc lint .PHONY: check install install-doc install-profiles install-scripts shellcheck
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment