Skip to content

Commit ed97371

Browse files
davide125marcan
authored andcommitted
makefile: install first-boot and update-grub only for arch
Signed-off-by: Davide Cavalca <[email protected]>
1 parent b4d23ab commit ed97371

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

Makefile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
PREFIX=/usr/local
22
CONFIG_DIR=/etc/default
3-
SCRIPTS=update-vendor-firmware update-grub first-boot update-m1n1
3+
SCRIPTS=update-vendor-firmware update-m1n1
4+
ARCH_SCRIPTS=update-grub first-boot
45
UNITS=first-boot.service
56
MULTI_USER_WANTS=first-boot.service
67
DRACUT_CONF_DIR=$(PREFIX)/lib/dracut/dracut.conf.d
78
BUILD_SCRIPTS=$(addprefix build/,$(SCRIPTS))
9+
BUILD_ARCH_SCRIPTS=$(addprefix build/,$(ARCH_SCRIPTS))
810

9-
all: $(BUILD_SCRIPTS)
11+
all: $(BUILD_SCRIPTS) $(BUILD_ARCH_SCRIPTS)
1012

1113
build/%: %
1214
@[ ! -e build ] && mkdir -p build || true
@@ -16,17 +18,18 @@ build/%: %
1618
install: all
1719
install -d $(DESTDIR)$(PREFIX)/bin/
1820
install -m0755 -t $(DESTDIR)$(PREFIX)/bin/ $(BUILD_SCRIPTS)
19-
install -dD $(DESTDIR)$(PREFIX)/lib/systemd/system
20-
install -dD $(DESTDIR)$(PREFIX)/lib/systemd/system/{multi-user,sysinit}.target.wants
21-
install -m0644 -t $(DESTDIR)$(PREFIX)/lib/systemd/system $(addprefix systemd/,$(UNITS))
22-
ln -sf $(addprefix $(PREFIX)/lib/systemd/system/,$(MULTI_USER_WANTS)) \
23-
$(DESTDIR)$(PREFIX)/lib/systemd/system/multi-user.target.wants/
2421
install -dD $(DESTDIR)/etc
2522
install -m0644 -t $(DESTDIR)/etc etc/m1n1.conf
2623
install -dD $(DESTDIR)$(PREFIX)/share/asahi-scripts
2724
install -m0644 -t $(DESTDIR)$(PREFIX)/share/asahi-scripts functions.sh
2825

2926
install-arch: install
27+
install -m0755 -t $(DESTDIR)$(PREFIX)/bin/ $(BUILD_ARCH_SCRIPTS)
28+
install -dD $(DESTDIR)$(PREFIX)/lib/systemd/system
29+
install -dD $(DESTDIR)$(PREFIX)/lib/systemd/system/{multi-user,sysinit}.target.wants
30+
install -m0644 -t $(DESTDIR)$(PREFIX)/lib/systemd/system $(addprefix systemd/,$(UNITS))
31+
ln -sf $(addprefix $(PREFIX)/lib/systemd/system/,$(MULTI_USER_WANTS)) \
32+
$(DESTDIR)$(PREFIX)/lib/systemd/system/multi-user.target.wants/
3033
install -dD $(DESTDIR)$(PREFIX)/lib/initcpio/install
3134
install -m0644 -t $(DESTDIR)$(PREFIX)/lib/initcpio/install initcpio/install/asahi
3235
install -dD $(DESTDIR)$(PREFIX)/lib/initcpio/hooks

0 commit comments

Comments
 (0)