mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-23 19:23:02 +00:00
bench: make it easy to edit the generated files
* etc/bench.pl.in (&compile): Generate rules that compile the generated files independently of the source files.
This commit is contained in:
@@ -842,16 +842,20 @@ sub compile ($$)
|
|||||||
if ($gbench)
|
if ($gbench)
|
||||||
{
|
{
|
||||||
print $makefile <<EOF;
|
print $makefile <<EOF;
|
||||||
$base.o: $base.y
|
$base.$ext: $base.y
|
||||||
\t@{[length $my_bison ? $my_bison : $bison]} $base.y -o $base.$ext
|
\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
|
\t$compiler -c -o $base.o $cflags $base.$ext
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $makefile <<EOF;
|
print $makefile <<EOF;
|
||||||
$base: $base.y
|
$base.$ext: $base.y
|
||||||
\t@{[length $my_bison ? $my_bison : $bison]} $base.y -o $base.$ext
|
\t@{[length $my_bison ? $my_bison : $bison]} $base.y -o $base.$ext
|
||||||
|
|
||||||
|
$base: $base.$ext
|
||||||
\t$compiler -o $base $cflags $base.$ext
|
\t$compiler -o $base $cflags $base.$ext
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user