Commit aea0d88a authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Avoid generating the .tab.c file twice with bison.

parent 9b26ea16
......@@ -2680,20 +2680,17 @@ static void output_po_files( struct makefile *make )
*/
static void output_source_y( struct makefile *make, struct incl_file *source, const char *obj )
{
/* add source file dependency for parallel makes */
char *header = strmake( "%s.tab.h", obj );
if (find_include_file( make, header ))
{
output( "%s: %s\n", obj_dir_path( make, header ), source->filename );
output( "\t%s%s -o %s.tab.c -d %s\n",
cmd_prefix( "BISON" ), bison, obj_dir_path( make, obj ), source->filename );
output( "%s.tab.c: %s %s\n", obj_dir_path( make, obj ),
source->filename, obj_dir_path( make, header ));
output( "\t%s%s -o %s.tab.$$$$.c --header=$@ %s && rm -f %s.tab.$$$$.c\n",
cmd_prefix( "BISON" ), bison, obj_dir_path( make, obj ),
source->filename, obj_dir_path( make, obj ));
strarray_add( &make->clean_files, header );
}
else output( "%s.tab.c: %s\n", obj_dir_path( make, obj ), source->filename );
output( "%s.tab.c: %s\n", obj_dir_path( make, obj ), source->filename );
output( "\t%s%s -o $@ %s\n", cmd_prefix( "BISON" ), bison, source->filename );
}
......
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