Commit 3e1c6132 authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Small cleanups to match current build process.

parent d4fcfa85
DEFS = -DNO_LIBWINE -DLEX_OUTPUT_ROOT="\"@LEX_OUTPUT_ROOT@\"" -DINCLUDEDIR="\"$(includedir)\"" DEFS = -DNO_LIBWINE -DLEX_OUTPUT_ROOT="\"@LEX_OUTPUT_ROOT@\"" -DINCLUDEDIR="\"$(includedir)\"" -DBINDIR="\"$(bindir)\""
TOPSRCDIR = @top_srcdir@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = .. TOPOBJDIR = ..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
......
...@@ -120,10 +120,10 @@ void spawn(char *const argv[]) ...@@ -120,10 +120,10 @@ void spawn(char *const argv[])
} }
if ((pid = fork()) == 0) execvp(argv[0], argv); if ((pid = fork()) == 0) execvp(argv[0], argv);
else if (wait(&status) > 0) else if (waitpid(pid, &status, 0) > 0)
{ {
if (WEXITSTATUS(status) == 0) return; if (WIFEXITED(status) && WEXITSTATUS(status) == 0) return;
else error("%s failed.", argv[0]); error("%s failed.", argv[0]);
} }
perror("Error:"); perror("Error:");
exit(1); exit(1);
...@@ -168,7 +168,6 @@ int main(int argc, char **argv) ...@@ -168,7 +168,6 @@ int main(int argc, char **argv)
if (argv[i][2]) library = argv[i]+ 2; if (argv[i][2]) library = argv[i]+ 2;
else if (i + 1 < argc) library = argv[++i]; else if (i + 1 < argc) library = argv[++i];
else error("The -l switch takes an argument\n."); else error("The -l switch takes an argument\n.");
if (strcmp(library, "winspool") == 0) library = "winspool.drv";
lib_files = realloc( lib_files, (nb_lib_files+1) * sizeof(*lib_files) ); lib_files = realloc( lib_files, (nb_lib_files+1) * sizeof(*lib_files) );
lib_files[nb_lib_files++] = strdup(library); lib_files[nb_lib_files++] = strdup(library);
break; break;
...@@ -197,7 +196,7 @@ int main(int argc, char **argv) ...@@ -197,7 +196,7 @@ int main(int argc, char **argv)
/* build winebuild's argument list */ /* build winebuild's argument list */
spec_args = malloc( (nb_lib_files + nb_obj_files + 20) * sizeof (char *) ); spec_args = malloc( (nb_lib_files + nb_obj_files + 20) * sizeof (char *) );
j = 0; j = 0;
spec_args[j++] = "winebuild"; spec_args[j++] = BINDIR "/winebuild";
spec_args[j++] = "-fPIC"; spec_args[j++] = "-fPIC";
spec_args[j++] = "-o"; spec_args[j++] = "-o";
spec_args[j++] = strmake("%s.c", spec_name); spec_args[j++] = strmake("%s.c", spec_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment