[PATCH 1/3] bench: make it easy to edit the generated files

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.patches
Message-ID <[email protected]>
* etc/bench.pl.in (&compile): Generate rules that compile the
generated files.
---
 etc/bench.pl.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/etc/bench.pl.in b/etc/bench.pl.in
index 036bf52e..2f669091 100755
--- a/etc/bench.pl.in
+++ b/etc/bench.pl.in
@@ -842,16 +842,20 @@ sub compile ($$)
   if ($gbench)
     {
       print $makefile <<EOF;
-$base.o: $base.y
+$base.$ext: $base.y
 \t@{[length $my_bison ? $my_bison : $bison]} $base.y -o $base.$ext
+
+$base.o: $base.$ext
 \t$compiler -c -o $base.o $cflags $base.$ext
 EOF
     }
   else
     {
       print $makefile <<EOF;
-$base: $base.y
+$base.$ext: $base.y
 \t@{[length $my_bison ? $my_bison : $bison]} $base.y -o $base.$ext
+
+$base: $base.$ext
 \t$compiler -o $base $cflags $base.$ext
 EOF
     }
-- 
2.27.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.