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

4
5
6
7
8
9
10
11
INSTALL_FILES=$(wildcard archiso/initcpio/install/*)
HOOKS_FILES=$(wildcard archiso/initcpio/hooks/*)
SCRIPT_FILES=$(wildcard archiso/initcpio/script/*)

INSTALL_DIR=$(DESTDIR)/usr/lib/initcpio/install
HOOKS_DIR=$(DESTDIR)/usr/lib/initcpio/hooks
SCRIPT_DIR=$(DESTDIR)/usr/lib/initcpio

12
DOC_FILES=$(wildcard docs/*) $(wildcard *.rst)
13
14
15
16

DOC_DIR=$(DESTDIR)/usr/share/doc/archiso


17
18
all:

19
20
21
check: lint

lint:
nl6720's avatar
nl6720 committed
22
23
24
25
	shellcheck -s bash archiso/mkarchiso \
	                   scripts/run_archiso.sh \
	                   $(INSTALL_FILES) \
	                   $(wildcard configs/*/build.sh) \
26
	                   $(wildcard configs/*/profiledef.sh) \
nl6720's avatar
nl6720 committed
27
	                   configs/releng/airootfs/root/.automated_script.sh \
28
29
	                   configs/releng/airootfs/usr/local/bin/choose-mirror \
	                   configs/releng/airootfs/usr/local/bin/livecd-sound
nl6720's avatar
nl6720 committed
30
31
	shellcheck -s dash $(HOOKS_FILES) $(SCRIPT_FILES)

32
install: install-program install-examples install-doc
33
34

install-program:
35
36
	install -vDm 755 archiso/mkarchiso -t "$(DESTDIR)/usr/bin/"
	install -vDm 755 scripts/run_archiso.sh "$(DESTDIR)/usr/bin/run_archiso"
37

38
39
40
41
42
install-initcpio:
	install -d $(SCRIPT_DIR) $(HOOKS_DIR) $(INSTALL_DIR)
	install -m 755 -t $(SCRIPT_DIR) $(SCRIPT_FILES)
	install -m 644 -t $(HOOKS_DIR) $(HOOKS_FILES)
	install -m 644 -t $(INSTALL_DIR) $(INSTALL_FILES)
43
44
45

install-examples:
	install -d -m 755 $(DESTDIR)/usr/share/archiso/
46
	cp -a --no-preserve=ownership configs $(DESTDIR)/usr/share/archiso/
47
48

install-doc:
49
	install -vDm 644 $(DOC_FILES) -t $(DOC_DIR)
50

51
.PHONY: check install install-program install-initcpio install-examples install-doc lint