Commit b9966054 authored by Alexandre Julliard's avatar Alexandre Julliard

makedep: Added support for dlldata.c dependencies.

parent b0585bf1
...@@ -242,24 +242,6 @@ static INCL_FILE *find_src_file( const char *name ) ...@@ -242,24 +242,6 @@ static INCL_FILE *find_src_file( const char *name )
} }
/******************************************************************* /*******************************************************************
* add_src_file
*
* Add a source file to the list.
*/
static INCL_FILE *add_src_file( const char *name )
{
INCL_FILE *file;
if (find_src_file( name )) return NULL; /* we already have it */
file = xmalloc( sizeof(*file) );
memset( file, 0, sizeof(*file) );
file->name = xstrdup(name);
list_add_tail( &sources, &file->entry );
return file;
}
/*******************************************************************
* add_include * add_include
* *
* Add an include file if it doesn't already exists. * Add an include file if it doesn't already exists.
...@@ -717,6 +699,11 @@ static void parse_generated_idl( INCL_FILE *source ) ...@@ -717,6 +699,11 @@ static void parse_generated_idl( INCL_FILE *source )
{ {
add_include( source, header, 0, 0 ); add_include( source, header, 0, 0 );
} }
else if (!strcmp( source->name, "dlldata.c" ))
{
add_include( source, "objbase.h", 0, 1 );
add_include( source, "rpcproxy.h", 0, 1 );
}
free( header ); free( header );
free( basename ); free( basename );
...@@ -733,7 +720,8 @@ static void parse_file( INCL_FILE *pFile, int src ) ...@@ -733,7 +720,8 @@ static void parse_file( INCL_FILE *pFile, int src )
if (strendswith( pFile->name, "_c.c" ) || if (strendswith( pFile->name, "_c.c" ) ||
strendswith( pFile->name, "_i.c" ) || strendswith( pFile->name, "_i.c" ) ||
strendswith( pFile->name, "_p.c" ) || strendswith( pFile->name, "_p.c" ) ||
strendswith( pFile->name, "_s.c" )) strendswith( pFile->name, "_s.c" ) ||
!strcmp( pFile->name, "dlldata.c" ))
{ {
parse_generated_idl( pFile ); parse_generated_idl( pFile );
return; return;
...@@ -758,6 +746,25 @@ static void parse_file( INCL_FILE *pFile, int src ) ...@@ -758,6 +746,25 @@ static void parse_file( INCL_FILE *pFile, int src )
/******************************************************************* /*******************************************************************
* add_src_file
*
* Add a source file to the list.
*/
static INCL_FILE *add_src_file( const char *name )
{
INCL_FILE *file;
if (find_src_file( name )) return NULL; /* we already have it */
file = xmalloc( sizeof(*file) );
memset( file, 0, sizeof(*file) );
file->name = xstrdup(name);
list_add_tail( &sources, &file->entry );
parse_file( file, 1 );
return file;
}
/*******************************************************************
* output_include * output_include
*/ */
static void output_include( FILE *file, INCL_FILE *pFile, static void output_include( FILE *file, INCL_FILE *pFile,
...@@ -954,7 +961,8 @@ int main( int argc, char *argv[] ) ...@@ -954,7 +961,8 @@ int main( int argc, char *argv[] )
for (i = 1; i < argc; i++) for (i = 1; i < argc; i++)
{ {
if ((pFile = add_src_file( argv[i] ))) parse_file( pFile, 1 ); add_src_file( argv[i] );
if (strendswith( argv[i], "_p.c" )) add_src_file( "dlldata.c" );
} }
LIST_FOR_EACH_ENTRY( pFile, &includes, INCL_FILE, entry ) parse_file( pFile, 0 ); LIST_FOR_EACH_ENTRY( pFile, &includes, INCL_FILE, entry ) parse_file( pFile, 0 );
output_dependencies(); output_dependencies();
......
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