[PATCH] makedep: avoid bison rules with implicit file generation
Marcus Meissner
marcus at jet.franken.de
Mon Mar 6 02:16:14 CST 2017
The rules for bison we generated would be regenerating the same file twice,
and due to a bison "feature" having different content.
Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
---
tools/makedep.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tools/makedep.c b/tools/makedep.c
index add722f80a..01603075c7 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -2386,16 +2386,17 @@ static struct strarray output_sources( const struct makefile *make )
if (find_include_file( make, header ))
{
- output( "%s: %s\n", obj_dir_path( make, header ), source->filename );
+ /* create a rule for both C and Header file */
+ output( "%s %s.tab.c: %s\n", obj_dir_path( make, header ), obj_dir_path( make, obj ), source->filename );
output( "\t$(BISON) -p %s_ -o %s.tab.c -d %s\n",
obj, 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 ));
strarray_add( &clean_files, header );
}
- else output( "%s.tab.c: %s\n", obj, source->filename );
-
- output( "\t$(BISON) -p %s_ -o $@ %s\n", obj, source->filename );
+ else
+ {
+ output( "%s.tab.c: %s\n", obj, source->filename );
+ output( "\t$(BISON) -p %s_ -o $@ %s\n", obj, source->filename );
+ }
}
else if (!strcmp( ext, "x" )) /* template file */
{
--
2.12.0
More information about the wine-patches
mailing list