ifdef FLEX
$(FLEX) $(if $(FLEX_NO_BACKUP),-b) $(FLEXFLAGS) -o'$@' $<
@$(if $(FLEX_NO_BACKUP),if [ `wc -l <lex.backup` -eq 1 ]; then rm lex.backup; else echo "Scanner requires backup; see lex.backup." 1>&2; exit 1; fi)
- $(if $(FLEX_FIX_WARNING),$(PERL) $(top_srcdir)/src/tools/fix-flex-warning.pl '$@')
+ $(if $(FLEX_FIX_WARNING),$(PERL) $(top_srcdir)/src/tools/fix-old-flex-code.pl '$@')
else
@$(missing) flex $< '$@'
endif
#!/usr/bin/perl -w
#----------------------------------------------------------------------
#
-# fix-flex-warning.pl
+# fix-old-flex-code.pl
#
# flex versions before 2.5.36, with certain option combinations, produce
# code that causes an "unused variable" warning. That's annoying, so
# Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# src/tools/fix-flex-warning.pl
+# src/tools/fix-old-flex-code.pl
#
#----------------------------------------------------------------------
sub usage
{
die <<EOM;
-Usage: fix-flex-warning.pl c-file-name
+Usage: fix-old-flex-code.pl c-file-name
-fix-flex-warning.pl modifies a flex output file to suppress
+fix-old-flex-code.pl modifies a flex output file to suppress
an unused-variable warning that occurs with older flex versions.
Report bugs to <pgsql-bugs\@postgresql.org>.
{
# Reentrant scanners usually need a fix to prevent
# "unused variable" warnings with older flex versions.
- system("perl src\\tools\\fix-flex-warning.pl $output");
+ system("perl src\\tools\\fix-old-flex-code.pl $output");
}
else
{