diff mbox series

Makefile: Fix install with out-of-tree build

Message ID 20200626141431.34074-1-JPEWhacker@gmail.com
State Accepted
Headers show
Series Makefile: Fix install with out-of-tree build | expand

Commit Message

Joshua Watt June 26, 2020, 2:14 p.m. UTC
Installs headers from the source directory instead of the build
directory when O=<PATH> is passed on the command line to do an
out-of-tree build

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index b4da3d6..a94c50d 100644
--- a/Makefile
+++ b/Makefile
@@ -456,9 +456,9 @@  install: all
 	for i in ${tools-bins};do \
 		install -m 755 $$i ${DESTDIR}/${BINDIR}; \
 	done
-	install -m 0644 include/network_ipc.h ${DESTDIR}/${INCLUDEDIR}
-	install -m 0644 include/swupdate_status.h ${DESTDIR}/${INCLUDEDIR}
-	install -m 0644 include/progress_ipc.h ${DESTDIR}/${INCLUDEDIR}
+	install -m 0644 $(srctree)/include/network_ipc.h ${DESTDIR}/${INCLUDEDIR}
+	install -m 0644 $(srctree)/include/swupdate_status.h ${DESTDIR}/${INCLUDEDIR}
+	install -m 0644 $(srctree)/include/progress_ipc.h ${DESTDIR}/${INCLUDEDIR}
 	install -m 0755 ipc/lib.a ${DESTDIR}/${LIBDIR}/libswupdate.a
 	if [ $(HAVE_LUA) = y ]; then \
 		install -d ${DESTDIR}/${LIBDIR}/lua/$(LUAVER); \