Modified the way scripts are handled (forcing use of getopt)

This commit is contained in:
Pierre Pronchery 2010-12-31 15:10:25 +00:00
parent 87bc953075
commit e695e7e37b

View File

@ -1162,7 +1162,7 @@ static int _target_script(Configure * configure, FILE * fp,
fprintf(fp, "\n%s:", target); fprintf(fp, "\n%s:", target);
_script_depends(configure->config, fp, target); _script_depends(configure->config, fp, target);
fputc('\n', fp); fputc('\n', fp);
fprintf(fp, "\t%s \"%s\"\n", script, target); fprintf(fp, "\t%s -P \"$(PREFIX)\" -- \"%s\"\n", script, target);
return 0; return 0;
} }
@ -1720,8 +1720,8 @@ static void _install_target_script(Config * config, FILE * fp,
return; return;
if((script = config_get(config, target, "script")) == NULL) if((script = config_get(config, target, "script")) == NULL)
return; return;
fprintf(fp, "\t%s%s%s%s%s%s%s", script, " -p \"$(DESTDIR)$(PREFIX)", fprintf(fp, "\t%s%s%s%s%s%s%s", script, " -P \"$(DESTDIR)$(PREFIX)",
*path ? "/" : "", *path ? path : "", "\" install \"", *path ? "/" : "", *path ? path : "", "\" -i -- \"",
target, "\"\n"); target, "\"\n");
} }
@ -1994,8 +1994,8 @@ static void _uninstall_target_script(Config * config, FILE * fp,
if((script = config_get(config, target, "script")) == NULL) if((script = config_get(config, target, "script")) == NULL)
return; return;
fprintf(fp, "\t%s%s%s%s%s%s%s", script, " -p \"$(DESTDIR)$(PREFIX)", fprintf(fp, "\t%s%s%s%s%s%s%s", script, " -P \"$(DESTDIR)$(PREFIX)",
*path ? "/" : "", *path ? path : "", "\" uninstall \"", *path ? "/" : "", *path ? path : "", "\" -u -- \"",
target, "\"\n"); target, "\"\n");
} }