From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> While testing: make DESTDIR=/tmp/install/ O=/tmp/build/ install I found that the dependencies of the install were not correct. Add the libraries to the install path, and also fix the creation of the directories itself. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 02b3d25..035f4de 100644 --- a/Makefile +++ b/Makefile @@ -180,7 +180,7 @@ all_cmd: $(TARGETS) $(PKG_CONFIG_FILE) libtracefs.a: $(LIBTRACEFS_STATIC) libtracefs.so: $(LIBTRACEFS_SHARED) -libs: +libs: libtracefs.a libtracefs.so test: force $(LIBTRACEFS_STATIC) ifneq ($(CUNIT_INSTALLED),1) @@ -204,6 +204,17 @@ endef $(PKG_CONFIG_FILE) : ${PKG_CONFIG_SOURCE_FILE}.template $(Q) $(call do_make_pkgconfig_file,$(prefix)) +define do_install_mkdir + if [ ! -d '$(DESTDIR_SQ)$1' ]; then \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$1'; \ + fi +endef + +define do_install + $(call do_install_mkdir,$2); \ + $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2' +endef + define do_install_pkgconfig_file if [ -n "${pkgconfig_dir}" ]; then \ $(call do_install,$(PKG_CONFIG_FILE),$(pkgconfig_dir),644); \ -- 2.25.4