Pass the Windows binary test

This commit is contained in:
Pierre Pronchery 2014-11-12 00:42:19 +01:00
parent a0d55812f3
commit b603113261
2 changed files with 9 additions and 4 deletions

View File

@ -1933,12 +1933,14 @@ static void _install_target_binary(Configure * configure, FILE * fp,
String const * target) String const * target)
{ {
String const * path; String const * path;
String const * exeext;
if((path = config_get(configure->config, target, "install")) == NULL) if((path = config_get(configure->config, target, "install")) == NULL)
return; return;
exeext = (configure->os == HO_WIN32) ? "$(EXEEXT)" : "";
fprintf(fp, "%s%s\n", "\t$(MKDIR) $(DESTDIR)", path); fprintf(fp, "%s%s\n", "\t$(MKDIR) $(DESTDIR)", path);
fprintf(fp, "%s%s%s%s/%s\n", "\t$(INSTALL) -m 0755 $(OBJDIR)", target, fprintf(fp, "%s%s%s%s%s/%s%s\n", "\t$(INSTALL) -m 0755 $(OBJDIR)",
" $(DESTDIR)", path, target); target, exeext, " $(DESTDIR)", path, target, exeext);
} }
static int _install_target_library(Configure * configure, FILE * fp, static int _install_target_library(Configure * configure, FILE * fp,
@ -2279,6 +2281,7 @@ static int _uninstall_target(Configure * configure, FILE * fp,
{ {
String const * type; String const * type;
String const * path; String const * path;
String const * exeext;
String const * soext; String const * soext;
TargetType tt; TargetType tt;
const String * rm_destdir = "$(RM) -- $(DESTDIR)"; const String * rm_destdir = "$(RM) -- $(DESTDIR)";
@ -2287,12 +2290,14 @@ static int _uninstall_target(Configure * configure, FILE * fp,
return 1; return 1;
if((path = config_get(configure->config, target, "install")) == NULL) if((path = config_get(configure->config, target, "install")) == NULL)
return 0; return 0;
exeext = (configure->os == HO_WIN32) ? "$(EXEEXT)" : "";
soext = configure_get_soext(configure); soext = configure_get_soext(configure);
tt = enum_string(TT_LAST, sTargetType, type); tt = enum_string(TT_LAST, sTargetType, type);
switch(tt) switch(tt)
{ {
case TT_BINARY: case TT_BINARY:
fprintf(fp, "\t%s%s/%s\n", rm_destdir, path, target); fprintf(fp, "\t%s%s/%s%s\n", rm_destdir, path, target,
exeext);
break; break;
case TT_LIBRARY: case TT_LIBRARY:
if(_uninstall_target_library(configure, fp, target, if(_uninstall_target_library(configure, fp, target,

View File

@ -102,4 +102,4 @@ _test "Darwin" "plugin"
_test "NetBSD" "binary" _test "NetBSD" "binary"
_test "NetBSD" "library" _test "NetBSD" "library"
_test "NetBSD" "plugin" _test "NetBSD" "plugin"
_fail "Windows" "binary") > "$target" _test "Windows" "binary") > "$target"