widl: Fix handling of output_name in option parsing.

Do not overwrite explicitly stated paths, such as header_name or
proxy_name. Instead, use output_name when specified as a fallback.

Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Andrew Boyarshin 2021-02-09 13:38:50 +01:00 committed by Alexandre Julliard
parent 02edba0f9d
commit 5423e0d9e6
1 changed files with 9 additions and 11 deletions

View File

@ -831,19 +831,17 @@ int main(int argc,char *argv[])
set_everything(TRUE);
}
if (!output_name) output_name = dup_basename(input_name, ".idl");
if (do_header + do_typelib + do_proxies + do_client +
do_server + do_regscript + do_idfile + do_dlldata == 1)
do_server + do_regscript + do_idfile + do_dlldata == 1 && output_name)
{
if (do_header) header_name = output_name;
else if (do_typelib) typelib_name = output_name;
else if (do_proxies) proxy_name = output_name;
else if (do_client) client_name = output_name;
else if (do_server) server_name = output_name;
else if (do_regscript) regscript_name = output_name;
else if (do_idfile) idfile_name = output_name;
else if (do_dlldata) dlldata_name = output_name;
if (do_header && !header_name) header_name = output_name;
else if (do_typelib && !typelib_name) typelib_name = output_name;
else if (do_proxies && !proxy_name) proxy_name = output_name;
else if (do_client && !client_name) client_name = output_name;
else if (do_server && !server_name) server_name = output_name;
else if (do_regscript && !regscript_name) regscript_name = output_name;
else if (do_idfile && !idfile_name) idfile_name = output_name;
else if (do_dlldata && !dlldata_name) dlldata_name = output_name;
}
if (!dlldata_name && do_dlldata)