aboutsummaryrefslogtreecommitdiffstats
path: root/testing/coreboot-ectool/fix-makefile.patch
blob: f0ac8a22f5e18bd8b5134f7500246721f11a98c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/Makefile b/Makefile
index 1ef74d2..94cf3c0 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ CC = gcc
 WERROR=-Werror
 CFLAGS = -O2 -Wall -Wextra -Wshadow $(WERROR)
 PROGRAM = ectool
-INSTALL = /usr/bin/env install
+INSTALL = /usr/bin/env install -D
 PREFIX  = /usr/local
 OS_ARCH = $(shell uname)
 
@@ -22,7 +22,7 @@ $(PROGRAM): ec.o ectool.o
 	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
 
 install: $(PROGRAM)
-	$(INSTALL) $(PROGRAM) $(PREFIX)/sbin
+	$(INSTALL) $(PROGRAM) $(DESTDIR)$(PREFIX)/sbin/$(PROGRAM)
 
 clean:
 	rm -f *.o $(PROGRAM) junit.xml