From d6fa0583abee1a1030a3faef0169cebbbebafced Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Wed, 25 Nov 2015 11:02:59 +0000 Subject: [PATCH] Fix bug in ``ExeComponent.mk_uninstall()`` in the build system which would try to uninstall components that were never installed. This bug would cause the following line to be emitted in the ``Makefile`` under the ``uninstall`` rule even though there was no corresponding rule to install the file under the ``install`` rule. ``` @rm -f $(DESTDIR)$(PREFIX)/bin/test-z3$(EXE_EXT) ``` --- scripts/mk_util.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/mk_util.py b/scripts/mk_util.py index 7bc68e193..8b75761fe 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -1094,8 +1094,9 @@ class ExeComponent(Component): MakeRuleCmd.install_files(out, exefile, os.path.join('bin', exefile)) def mk_uninstall(self, out): - exefile = '%s$(EXE_EXT)' % self.exe_name - MakeRuleCmd.remove_installed_files(out, os.path.join('bin', exefile)) + if self.install: + exefile = '%s$(EXE_EXT)' % self.exe_name + MakeRuleCmd.remove_installed_files(out, os.path.join('bin', exefile)) def mk_win_dist(self, build_path, dist_path): if self.install: