From f019e6315d8955573afe3a37d3ea231b2b58b60d Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 17 Oct 2014 20:42:17 +0200 Subject: [PATCH] No longer automatically add $(PREFIX) when (un)installing script targets --- src/makefile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/makefile.c b/src/makefile.c index 57ee677..daa5daa 100644 --- a/src/makefile.c +++ b/src/makefile.c @@ -1941,8 +1941,8 @@ static void _install_target_script(Configure * configure, FILE * fp, return; if((script = config_get(configure->config, target, "script")) == NULL) return; - fprintf(fp, "\t%s%s%s%s%s%s%s", script, " -P \"$(DESTDIR)$(PREFIX)", - *path ? "/" : "", *path ? path : "", "\" -i -- \"", + fprintf(fp, "\t%s%s%s%s%s%s", script, " -P \"$(DESTDIR)", + (path[0] != '\0') ? path : "$(PREFIX)", "\" -i -- \"", target, "\"\n"); } @@ -2244,8 +2244,8 @@ static void _uninstall_target_script(Configure * configure, FILE * fp, if((script = config_get(configure->config, target, "script")) == NULL) return; - fprintf(fp, "\t%s%s%s%s%s%s%s", script, " -P \"$(DESTDIR)$(PREFIX)", - *path ? "/" : "", *path ? path : "", "\" -u -- \"", + fprintf(fp, "\t%s%s%s%s%s%s", script, " -P \"$(DESTDIR)", + (path[0] != '\0') ? path : "$(PREFIX)", "\" -u -- \"", target, "\"\n"); }