mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 14:40:56 +00:00
makedep: Output source dependency for bison files needed for parallel makes.
This commit is contained in:
parent
5eb4b094a3
commit
133d4cde26
@ -261,6 +261,18 @@ static INCL_FILE *find_src_file( const char *name )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* find_include_file
|
||||
*/
|
||||
static INCL_FILE *find_include_file( const char *name )
|
||||
{
|
||||
INCL_FILE *file;
|
||||
|
||||
LIST_FOR_EACH_ENTRY( file, &includes, INCL_FILE, entry )
|
||||
if (!strcmp( name, file->name )) return file;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* add_include
|
||||
*
|
||||
@ -829,6 +841,10 @@ static int output_src( FILE *file, INCL_FILE *pFile, int *column )
|
||||
*ext++ = 0;
|
||||
if (!strcmp( ext, "y" )) /* yacc file */
|
||||
{
|
||||
/* add source file dependency for parallel makes */
|
||||
char *header = strmake( "%s.tab.h", obj );
|
||||
if (find_include_file( header )) fprintf( file, "%s.tab.c: %s\n", obj, header );
|
||||
free( header );
|
||||
*column += fprintf( file, "%s.tab.o: %s.tab.c", obj, obj );
|
||||
}
|
||||
else if (!strcmp( ext, "l" )) /* lex file */
|
||||
|
Loading…
Reference in New Issue
Block a user