forked from coreos/coreos-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (39 loc) · 1.17 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
RELEASE ?= 0
RDCORE ?= 1
ifeq ($(RELEASE),1)
PROFILE ?= release
CARGO_ARGS = --release
else
PROFILE ?= debug
CARGO_ARGS =
endif
ifeq ($(RDCORE),1)
CARGO_ARGS := $(CARGO_ARGS) --features rdcore
endif
.PHONY: all
all:
cargo build ${CARGO_ARGS}
.PHONY: docs
docs: all
PROFILE=$(PROFILE) docs/_cmd.sh
.PHONY: install
install: install-bin install-scripts install-systemd install-dracut
.PHONY: install-bin
install-bin: all
install -D -t ${DESTDIR}/usr/bin target/${PROFILE}/coreos-installer
.PHONY: install-scripts
install-scripts: all
install -D -t $(DESTDIR)/usr/libexec scripts/coreos-installer-disable-device-auto-activation scripts/coreos-installer-service
.PHONY: install-systemd
install-systemd: all
install -D -m 644 -t $(DESTDIR)/usr/lib/systemd/system systemd/*.{service,target}
install -D -t $(DESTDIR)/usr/lib/systemd/system-generators systemd/coreos-installer-generator
.PHONY: install-dracut
install-dracut: all
if [ "${RDCORE}" = "1" ]; then \
for x in dracut/*; do \
bn=$$(basename $$x); \
install -D -t $(DESTDIR)/usr/lib/dracut/modules.d/$${bn} $$x/*; \
done; \
install -D -t ${DESTDIR}/usr/lib/dracut/modules.d/50rdcore target/${PROFILE}/rdcore; \
fi