blob: ff468cfb8341f0f2cf84fdd4d5e874f758bb91af (
plain) (
blame)
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
|
# src: https://github.com/redlab-i/pps-tools/commit/b3eae485a8c759d1ce1727076b2c287deb5f24e1.patch
From b3eae485a8c759d1ce1727076b2c287deb5f24e1 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Mon, 3 Dec 2018 13:55:02 +0100
Subject: [PATCH] Makefile: fix installation to empty DESTDIR
When DESTDIR is empty, or at least does not contain usr/bin or
usr/include, the installation fails, because install does not create
those intermediate directories:
$ make DESTDIR=/tmp/koin install
install -m 755 -t /tmp/koin/usr/bin ppsfind ppstest ppsctl ppswatch ppsldisc
install: failed to access '/tmp/koin/usr/bin': No such file or directory
Using the -D option of install fixes this:
$ make DESTDIR=/tmp/koin install
install -D -m 755 -t /tmp/koin/usr/bin ppsfind ppstest ppsctl ppswatch ppsldisc
install -D -m 644 -t /tmp/koin/usr/include/sys timepps.h
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 9394668..30672f7 100644
--- a/Makefile
+++ b/Makefile
@@ -19,8 +19,8 @@ include .depend
endif
install : all
- install -m 755 -t $(DESTDIR)/usr/bin ppsfind $(TARGETS)
- install -m 644 -t $(DESTDIR)/usr/include/sys timepps.h
+ install -D -m 755 -t $(DESTDIR)/usr/bin ppsfind $(TARGETS)
+ install -D -m 644 -t $(DESTDIR)/usr/include/sys timepps.h
uninstall :
for f in $(TARGETS); do rm $(DESTDIR)/usr/bin/$$f; done
|