-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (34 loc) · 1.03 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
PRJNAME = untouchable
BUGADDR = Kr1ss X <[email protected]>
DESTDIR ?=
ifeq ($(LOCAL), true)
PREFIX ?= /usr/local
else
PREFIX ?= /usr
endif
ifdef DIST
INITCPIODIR ?= $(PREFIX)/lib/initcpio
else
INITCPIODIR ?= $(SYSCONFDIR)/initcpio
endif
SYSCONFDIR ?= /etc
MKINITCONF ?= $(SYSCONFDIR)/mkinitcpio.conf
MKINITTDIR ?= $(SYSCONFDIR)/mkinitcpio.d
INSTALL_EXE ?= $(shell which install) -vDm755 -t
INSTALL_DATA ?= $(shell which install) -vDm644 -t
RM ?= $(shell which rm) -vf
RMDIR ?= $(shell which rmdir) -vp --ignore-fail-on-non-empty
.PHONY: install
install:
@echo 'Installing the initcpio hook ...'; \
for folder in hooks install; do \
$(INSTALL_DATA) $(DESTDIR)$(INITCPIODIR)/$$folder/ $$folder/$(PRJNAME); \
done
.PHONY: uninstall
uninstall:
@echo 'Removing the initcpio hook ...'; \
for folder in hooks install; do \
$(RM) $(DESTDIR)$(INITCPIODIR)/$$folder/$(PRJNAME); \
$(RMDIR) $(DESTDIR)$(INITCPIODIR)/$$folder | head -n -1; \
done
# vim: ts=2 sw=2 noet ft=make: