Commit bb45a93d authored by Alexandre Julliard's avatar Alexandre Julliard

makedep: Generate correct dependencies for testlist.c.

parent c3aa4952
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
# C_SRCS : C sources for the module # C_SRCS : C sources for the module
# OBJC_SRCS : Objective-C sources for the module # OBJC_SRCS : Objective-C sources for the module
# RC_SRCS : resource source files # RC_SRCS : resource source files
# EXTRA_SRCS : extra source files for make depend
# EXTRA_OBJS : extra object files # EXTRA_OBJS : extra object files
# IMPORTS : dlls to import # IMPORTS : dlls to import
# DELAYIMPORTS : dlls to import in delayed mode # DELAYIMPORTS : dlls to import in delayed mode
...@@ -147,7 +146,7 @@ $(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o) ...@@ -147,7 +146,7 @@ $(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o)
DEPEND_SRCS = $(C_SRCS) $(OBJC_SRCS) $(RC_SRCS) $(MC_SRCS) \ DEPEND_SRCS = $(C_SRCS) $(OBJC_SRCS) $(RC_SRCS) $(MC_SRCS) \
$(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) \ $(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) \
$(IDL_GEN_C_SRCS) $(IDL_R_SRCS:.idl=_r.res) $(IDL_TLB_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) \ $(IDL_GEN_C_SRCS) $(IDL_R_SRCS:.idl=_r.res) $(IDL_TLB_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) \
$(BISON_SRCS) $(LEX_SRCS) $(EXTRA_SRCS) $(BISON_SRCS) $(LEX_SRCS) $(EXTRA_OBJS)
depend: dummy depend: dummy
$(MAKEDEP) $(MAKEDEPFLAGS) -C$(srcdir) -S$(top_srcdir) -T$(top_builddir) $(EXTRAINCL) $(DEPEND_SRCS) $(MAKEDEP) $(MAKEDEPFLAGS) -C$(srcdir) -S$(top_srcdir) -T$(top_builddir) $(EXTRAINCL) $(DEPEND_SRCS)
...@@ -171,8 +170,6 @@ $(WINETEST_RES): $(TESTMODULE_STRIPPED) ...@@ -171,8 +170,6 @@ $(WINETEST_RES): $(TESTMODULE_STRIPPED)
testlist.c: Makefile.in $(MAKECTESTS) testlist.c: Makefile.in $(MAKECTESTS)
$(MAKECTESTS) -o $@ $(C_SRCS) $(MAKECTESTS) -o $@ $(C_SRCS)
testlist.o testlist.cross.o: testlist.c $(top_srcdir)/include/wine/test.h
testclean:: testclean::
$(RM) *.ok $(RM) *.ok
......
...@@ -810,11 +810,6 @@ static void parse_generated_idl( struct incl_file *source ) ...@@ -810,11 +810,6 @@ static void parse_generated_idl( struct incl_file *source )
add_include( source, "wine/exception.h", 1 ); add_include( source, "wine/exception.h", 1 );
add_include( source, header, 0 ); add_include( source, header, 0 );
} }
else if (!strcmp( source->name, "dlldata.c" ))
{
add_include( source, "objbase.h", 1 );
add_include( source, "rpcproxy.h", 1 );
}
free( header ); free( header );
free( basename ); free( basename );
...@@ -823,46 +818,68 @@ static void parse_generated_idl( struct incl_file *source ) ...@@ -823,46 +818,68 @@ static void parse_generated_idl( struct incl_file *source )
/******************************************************************* /*******************************************************************
* parse_file * parse_file
*/ */
static void parse_file( struct incl_file *pFile, int src ) static void parse_file( struct incl_file *source, int src )
{ {
FILE *file; FILE *file;
/* special case for source files generated from idl */ /* special case for source files generated from idl */
if (strendswith( pFile->name, "_c.c" ) || if (strendswith( source->name, "_c.c" ) ||
strendswith( pFile->name, "_i.c" ) || strendswith( source->name, "_i.c" ) ||
strendswith( pFile->name, "_p.c" ) || strendswith( source->name, "_p.c" ) ||
strendswith( pFile->name, "_s.c" ) || strendswith( source->name, "_s.c" ))
!strcmp( pFile->name, "dlldata.c" )) {
parse_generated_idl( source );
return;
}
if (!strcmp( source->name, "dlldata.o" ))
{
source->filename = xstrdup( "dlldata.c" );
add_include( source, "objbase.h", 1 );
add_include( source, "rpcproxy.h", 1 );
return;
}
if (!strcmp( source->name, "testlist.o" ))
{ {
parse_generated_idl( pFile ); source->filename = xstrdup( "testlist.c" );
add_include( source, "wine/test.h", 1 );
return;
}
if (strendswith( source->name, ".o" ))
{
/* default to .c for unknown extra object files */
source->filename = xstrdup( source->name );
source->filename[strlen(source->filename) - 1] = 'c';
return; return;
} }
/* don't try to open certain types of files */ /* don't try to open certain types of files */
if (strendswith( pFile->name, ".tlb" ) || if (strendswith( source->name, ".tlb" ) ||
strendswith( pFile->name, ".res" ) || strendswith( source->name, ".res" ) ||
strendswith( pFile->name, ".x" )) strendswith( source->name, ".x" ))
{ {
pFile->filename = xstrdup( pFile->name ); source->filename = xstrdup( source->name );
return; return;
} }
file = src ? open_src_file( pFile ) : open_include_file( pFile ); file = src ? open_src_file( source ) : open_include_file( source );
if (!file) return; if (!file) return;
input_file_name = pFile->filename; input_file_name = source->filename;
if (pFile->sourcename && strendswith( pFile->sourcename, ".idl" )) if (source->sourcename && strendswith( source->sourcename, ".idl" ))
parse_idl_file( pFile, file, 1 ); parse_idl_file( source, file, 1 );
else if (strendswith( pFile->filename, ".idl" )) else if (strendswith( source->filename, ".idl" ))
parse_idl_file( pFile, file, 0 ); parse_idl_file( source, file, 0 );
else if (strendswith( pFile->filename, ".c" ) || else if (strendswith( source->filename, ".c" ) ||
strendswith( pFile->filename, ".m" ) || strendswith( source->filename, ".m" ) ||
strendswith( pFile->filename, ".h" ) || strendswith( source->filename, ".h" ) ||
strendswith( pFile->filename, ".l" ) || strendswith( source->filename, ".l" ) ||
strendswith( pFile->filename, ".y" )) strendswith( source->filename, ".y" ))
parse_c_file( pFile, file ); parse_c_file( source, file );
else if (strendswith( pFile->filename, ".rc" )) else if (strendswith( source->filename, ".rc" ))
parse_rc_file( pFile, file ); parse_rc_file( source, file );
fclose(file); fclose(file);
input_file_name = NULL; input_file_name = NULL;
} }
...@@ -1151,11 +1168,8 @@ int main( int argc, char *argv[] ) ...@@ -1151,11 +1168,8 @@ int main( int argc, char *argv[] )
free( path ); free( path );
} }
for (i = 1; i < argc; i++) for (i = 1; i < argc; i++) add_src_file( argv[i] );
{
add_src_file( argv[i] );
if (strendswith( argv[i], "_p.c" )) add_src_file( "dlldata.c" );
}
LIST_FOR_EACH_ENTRY( pFile, &includes, struct incl_file, entry ) parse_file( pFile, 0 ); LIST_FOR_EACH_ENTRY( pFile, &includes, struct incl_file, entry ) parse_file( pFile, 0 );
output_dependencies(); output_dependencies();
return 0; return 0;
......
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