Module: wine Branch: master Commit: aea0d88ae54462689fb03f0a5dc22a2921bdad54 URL: https://gitlab.winehq.org/wine/wine/-/commit/aea0d88ae54462689fb03f0a5dc22a2...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Nov 14 13:04:36 2023 +0100
makefiles: Avoid generating the .tab.c file twice with bison.
---
tools/makedep.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/tools/makedep.c b/tools/makedep.c index 7b76a3283f0..640b4e63ece 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -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 ); }