summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-03-11 17:26:45 +0300
committerAnup Patel <anup@brainfault.org>2020-03-13 09:52:34 +0300
commit9aabba2665f0e58df97d4fbf85d1b5a1b29a2e29 (patch)
tree3ace51ce20f1092e1f81fccbd28a3ee04d2d0b27 /Makefile
parent823345ecaed0deb7770d9bac1c881004a6410e91 (diff)
downloadopensbi-9aabba2665f0e58df97d4fbf85d1b5a1b29a2e29.tar.xz
Makefile: Fix distclean make target
The default install directory is not being removed correctly by distclean make target due to recent changes. This patch fixes distclean make target to fix default install directory removal. Fixes: 82ae8e8fe2a3 ("makefile: Do setup of the install target more flexible") Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 58a2807..fe44ceb 100644
--- a/Makefile
+++ b/Makefile
@@ -29,10 +29,11 @@ endif
ifeq ($(build_dir),$(CURDIR))
$(error Build directory is same as source directory.)
endif
+install_root_dir_default=$(CURDIR)/install
ifdef I
install_root_dir=$(shell $(READLINK) -f $(I))
else
- install_root_dir=$(CURDIR)/install/usr
+ install_root_dir=$(install_root_dir_default)/usr
endif
ifeq ($(install_root_dir),$(CURDIR))
$(error Install root directory is same as source directory.)
@@ -456,7 +457,7 @@ ifeq ($(build_dir),$(CURDIR)/build)
$(if $(V), @echo " RM $(build_dir)")
$(CMD_PREFIX)rm -rf $(build_dir)
endif
-ifeq ($(install_root_dir),$(CURDIR)/install)
- $(if $(V), @echo " RM $(install_root_dir)")
- $(CMD_PREFIX)rm -rf $(install_root_dir)
+ifeq ($(install_root_dir),$(install_root_dir_default)/usr)
+ $(if $(V), @echo " RM $(install_root_dir_default)")
+ $(CMD_PREFIX)rm -rf $(install_root_dir_default)
endif