mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
package: install the examples
Currently, we do not install the various examples extracted from the documentation. Let's do it, as they are useful starting points. * configure.ac: When --enable-gcc-warnings is set, enable ENABLE_GCC_WARNINGS. * examples/extexi: No longer issue synclines by default. * examples/local.mk: Except if ENABLE_GCC_WARNINGS. * examples/calc++/local.mk, examples/mfcalc/local.mk, * examples/rpcalc/local.mk: Install the example files.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Usage: extexi input-file.texi ... -- [FILES to extract]
|
||||
# Usage: extexi [OPTION...] input-file.texi ... -- [FILES to extract]
|
||||
|
||||
# Look for @example environments preceded with lines such as:
|
||||
#
|
||||
@@ -35,6 +35,9 @@
|
||||
|
||||
use strict;
|
||||
|
||||
# Whether we generate synclines.
|
||||
my $synclines = 0;
|
||||
|
||||
# normalize($block)
|
||||
# -----------------
|
||||
# Remove Texinfo mark up.
|
||||
@@ -102,7 +105,7 @@ sub process ($)
|
||||
{
|
||||
# Bison supports synclines, but not Flex.
|
||||
$input .= sprintf ("#line %s \"$in\"\n", $. + 1)
|
||||
if $file =~ /\.[chy]*$/;
|
||||
if $synclines && $file =~ /\.[chy]*$/;
|
||||
next;
|
||||
}
|
||||
elsif (/^\@end (small)?example$/)
|
||||
@@ -136,15 +139,19 @@ my @input;
|
||||
my $seen_dash = 0;
|
||||
for my $arg (@ARGV)
|
||||
{
|
||||
if ($arg eq '--')
|
||||
{
|
||||
$seen_dash = 1;
|
||||
}
|
||||
elsif ($seen_dash)
|
||||
if ($seen_dash)
|
||||
{
|
||||
use File::Basename;
|
||||
$file_wanted{basename($arg)} = $arg;
|
||||
}
|
||||
elsif ($arg eq '--')
|
||||
{
|
||||
$seen_dash = 1;
|
||||
}
|
||||
elsif ($arg eq '--synclines')
|
||||
{
|
||||
$synclines = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
push @input, $arg;
|
||||
|
||||
Reference in New Issue
Block a user