From 0274ac704ed22e922e3e8bf48d6cc9f8305c32a8 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Tue, 12 Apr 2016 11:48:54 +0200 Subject: [PATCH] install[i]=- will work for .uninstall rules. --- build.zsh.in | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/build.zsh.in b/build.zsh.in index 3a05d2e..7975d45 100644 --- a/build.zsh.in +++ b/build.zsh.in @@ -314,13 +314,18 @@ function main { write fi - if exists "${type[$target]}.uninstall"; then - ${type[$target]}.uninstall - else + if [[ "${installdir}" == "-" ]]; then write "${target}.uninstall:" - write "\t@echo '$(RM "${installdir}/${target}")'" - write "\t${Q}rm -f '\$(DESTDIR)${installdir}/${target}'" - write + write "" + else + if exists "${type[$target]}.uninstall"; then + ${type[$target]}.uninstall + else + write "${target}.uninstall:" + write "\t@echo '$(RM "${installdir}/${target}")'" + write "\t${Q}rm -f '\$(DESTDIR)${installdir}/${target}'" + write + fi fi if exists "${type[$target]}.test"; then