Alexandre Julliard : makefiles: Remove support for generating a single makefile.
Alexandre Julliard
julliard at winehq.org
Fri Sep 11 14:51:44 CDT 2020
Module: wine
Branch: master
Commit: 9a542f9ddadf769541b9592205e0aadf288cbca1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9a542f9ddadf769541b9592205e0aadf288cbca1
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Sep 11 10:00:31 2020 +0200
makefiles: Remove support for generating a single makefile.
We need to handle all makefiles at once for proper import lib
dependencies.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/makedep.c | 44 ++++++++++++++++----------------------------
1 file changed, 16 insertions(+), 28 deletions(-)
diff --git a/tools/makedep.c b/tools/makedep.c
index 7b12f1b8ac..e675b800a8 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -1841,12 +1841,7 @@ static struct makefile *parse_makefile( const char *path )
struct makefile *make = xmalloc( sizeof(*make) );
memset( make, 0, sizeof(*make) );
- if (path)
- {
- make->top_obj_dir = get_relative_path( path, "" );
- make->base_dir = path;
- if (!strcmp( make->base_dir, "." )) make->base_dir = NULL;
- }
+ make->base_dir = path;
file = open_input_makefile( make );
while ((buffer = get_line( file )))
@@ -4286,6 +4281,8 @@ static void load_sources( struct makefile *make )
struct strarray value;
struct incl_file *file;
+ if (make->base_dir) make->top_obj_dir = get_relative_path( make->base_dir, "" );
+
if (root_src_dir)
{
make->top_src_dir = concat_paths( make->top_obj_dir, root_src_dir );
@@ -4488,6 +4485,8 @@ int main( int argc, char *argv[] )
exit( 0 );
}
+ if (argc > 1) fatal_error( "Directory arguments not supported in this mode\n" );
+
atexit( cleanup_files );
signal( SIGTERM, exit_on_signal );
signal( SIGINT, exit_on_signal );
@@ -4539,31 +4538,20 @@ int main( int argc, char *argv[] )
if (!tools_ext) tools_ext = "";
if (!man_ext) man_ext = "3w";
- if (argc == 1)
- {
- disabled_dirs = get_expanded_make_var_array( top_makefile, "DISABLED_SUBDIRS" );
- top_makefile->subdirs = get_expanded_make_var_array( top_makefile, "SUBDIRS" );
- top_makefile->submakes = xmalloc( top_makefile->subdirs.count * sizeof(*top_makefile->submakes) );
-
- for (i = 0; i < top_makefile->subdirs.count; i++)
- top_makefile->submakes[i] = parse_makefile( top_makefile->subdirs.str[i] );
+ disabled_dirs = get_expanded_make_var_array( top_makefile, "DISABLED_SUBDIRS" );
+ top_makefile->subdirs = get_expanded_make_var_array( top_makefile, "SUBDIRS" );
+ top_makefile->submakes = xmalloc( top_makefile->subdirs.count * sizeof(*top_makefile->submakes) );
- load_sources( top_makefile );
- for (i = 0; i < top_makefile->subdirs.count; i++)
- load_sources( top_makefile->submakes[i] );
+ for (i = 0; i < top_makefile->subdirs.count; i++)
+ top_makefile->submakes[i] = parse_makefile( top_makefile->subdirs.str[i] );
- for (i = 0; i < top_makefile->subdirs.count; i++)
- output_dependencies( top_makefile->submakes[i] );
+ load_sources( top_makefile );
+ for (i = 0; i < top_makefile->subdirs.count; i++)
+ load_sources( top_makefile->submakes[i] );
- output_dependencies( top_makefile );
- return 0;
- }
+ for (i = 0; i < top_makefile->subdirs.count; i++)
+ output_dependencies( top_makefile->submakes[i] );
- for (i = 1; i < argc; i++)
- {
- struct makefile *make = parse_makefile( argv[i] );
- load_sources( make );
- output_dependencies( make );
- }
+ output_dependencies( top_makefile );
return 0;
}
More information about the wine-cvs
mailing list