-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (38 loc) · 1.52 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
.POSIX:
include config.mk
all:
install:
mkdir -p ${DESTDIR}${PREFIX}/sbin
mkdir -p ${DESTDIR}${MANPREFIX}/man8
mkdir -p ${DESTDIR}${MANPREFIX}/man7
mkdir -p ${DESTDIR}${MANPREFIX}/man5
mkdir -p ${DESTDIR}${DATADIR}
sed "s/@VERSION@/${VERSION}/" mkinitramfs \
> ${DESTDIR}${PREFIX}/sbin/mkinitramfs
cp -f mkinitramfs.config.5 ${DESTDIR}${MANPREFIX}/man5/
cp -f mkinitramfs.cmdline.7 ${DESTDIR}${MANPREFIX}/man7/
cp -f mkinitramfs.hooks.7 ${DESTDIR}${MANPREFIX}/man7/
cp -f mkinitramfs.8 ${DESTDIR}${MANPREFIX}/man8/
cp -R hooks device-helper init ${DESTDIR}${DATADIR}/
chmod 0755 ${DESTDIR}${PREFIX}/sbin/mkinitramfs
chmod 0644 ${DESTDIR}${MANPREFIX}/man5/mkinitramfs.config.5
chmod 0644 ${DESTDIR}${MANPREFIX}/man7/mkinitramfs.cmdline.7
chmod 0644 ${DESTDIR}${MANPREFIX}/man7/mkinitramfs.hooks.7
chmod 0644 ${DESTDIR}${MANPREFIX}/man8/mkinitramfs.8
uninstall:
rm -f ${DESTDIR}${PREFIX}/sbin/mkinitramfs
rm -f ${DESTDIR}${MANPREFIX}/man5/mkinitramfs.config.5
rm -f ${DESTDIR}${MANPREFIX}/man7/mkinitramfs.cmdline.7
rm -f ${DESTDIR}${MANPREFIX}/man7/mkinitramfs.hooks.7
rm -f ${DESTDIR}${MANPREFIX}/man8/mkinitramfs.8
rm -rf ${DESTDIR}${DATADIR}
install_bashcomp:
mkdir -p ${DESTDIR}${BASHCOMPDIR}
cp -f bash_completion ${DESTDIR}${BASHCOMPDIR}/mkinitramfs
uninstall_bashcomp:
rm -f ${DESTDIR}${BASHCOMPDIR}/mkinitramfs
clean:
rm -f ${DIST}.tar.gz
dist: clean
git archive --format=tar.gz -o ${DIST}.tar.gz --prefix=${DIST}/ HEAD
.PHONY: all install uninstall install_bashcomp uninstall_bashcomp clean dist