diff --git a/Changes b/Changes index 755695398..47f9a76f1 100644 --- a/Changes +++ b/Changes @@ -38,6 +38,8 @@ The contributors that suggested a given feature are shown in []. Thanks! **** Fix %{number}s with strings. #2093. [agrobman] +**** Fix shebang breaking some shells. Closes #2067. [zdave] + * Verilator 4.024 2019-12-08 diff --git a/bin/verilator b/bin/verilator index 105b346a2..922c7b365 100755 --- a/bin/verilator +++ b/bin/verilator @@ -1,6 +1,4 @@ -: # -*-Mode: perl;-*- use perl, wherever it is -eval 'exec perl -wS $0 ${1+"$@"}' - if 0; +#!/usr/bin/env perl ###################################################################### # # Copyright 2003-2020 by Wilson Snyder. This program is free software; you diff --git a/bin/verilator_coverage b/bin/verilator_coverage index 9242d9eb8..13701b660 100755 --- a/bin/verilator_coverage +++ b/bin/verilator_coverage @@ -1,6 +1,4 @@ -: # -*-Mode: perl;-*- use perl, wherever it is -eval 'exec perl -wS $0 ${1+"$@"}' - if 0; +#!/usr/bin/env perl ###################################################################### # # Copyright 2003-2020 by Wilson Snyder. This program is free software; you diff --git a/bin/verilator_difftree b/bin/verilator_difftree index fd40cf037..a7aab372b 100755 --- a/bin/verilator_difftree +++ b/bin/verilator_difftree @@ -1,10 +1,7 @@ -: # -*-Mode: perl;-*- use perl, wherever it is -eval 'exec perl -wS $0 ${1+"$@"}' - if 0; +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -require 5.006_001; use warnings; use Getopt::Long; use IO::File; diff --git a/bin/verilator_gantt b/bin/verilator_gantt index 7e93d324c..252b98c9a 100755 --- a/bin/verilator_gantt +++ b/bin/verilator_gantt @@ -1,11 +1,9 @@ -: # -*-Mode: perl;-*- use perl, wherever it is -eval 'exec perl -wS $0 ${1+"$@"}' - if 0; +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -use strict; use warnings; +use strict; use Getopt::Long; use IO::File; use Pod::Usage; diff --git a/bin/verilator_includer b/bin/verilator_includer index 0fe436e1f..83e05f2ed 100755 --- a/bin/verilator_includer +++ b/bin/verilator_includer @@ -1,6 +1,4 @@ -: # -*-Mode: perl;-*- use perl, wherever it is -eval 'exec perl -wS $0 ${1+"$@"}' - if 0; +#!/usr/bin/env perl # DESCRIPTION: Print include statements for each ARGV # # Copyright 2003-2020 by Wilson Snyder. This package is free software; you can diff --git a/bin/verilator_profcfunc b/bin/verilator_profcfunc index d8323a857..85523163d 100755 --- a/bin/verilator_profcfunc +++ b/bin/verilator_profcfunc @@ -1,6 +1,4 @@ -: # -*-Mode: perl;-*- use perl, wherever it is -eval 'exec perl -wS $0 ${1+"$@"}' - if 0; +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### diff --git a/nodist/bisondiff b/nodist/bisondiff index a22a5c2d7..71120ee22 100755 --- a/nodist/bisondiff +++ b/nodist/bisondiff @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl ###################################################################### # # Copyright 2007-2020 by Wilson Snyder. This package is free software; you @@ -15,6 +15,7 @@ # DESCRIPTION: Diff bison files +use warnings; use Getopt::Long; use IO::File; use strict; diff --git a/nodist/bisonreader b/nodist/bisonreader index 78197adee..0ada7c788 100755 --- a/nodist/bisonreader +++ b/nodist/bisonreader @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl ###################################################################### # # Copyright 2007-2020 by Wilson Snyder. This package is free software; you @@ -15,6 +15,7 @@ # DESCRIPTION: Debugging of bison output +use warnings; use strict; my $Debug; diff --git a/nodist/code_coverage b/nodist/code_coverage index 37343eccf..8a2b2b2c8 100755 --- a/nodist/code_coverage +++ b/nodist/code_coverage @@ -1,7 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### +use warnings; use Cwd; use File::Copy qw(cp); use File::Path qw(mkpath); diff --git a/nodist/dot_importer b/nodist/dot_importer index c5cd5a3ed..a63c2831c 100755 --- a/nodist/dot_importer +++ b/nodist/dot_importer @@ -1,8 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -require 5.006_001; +use warnings; use Getopt::Long; use IO::File; use Pod::Usage; diff --git a/nodist/dot_pruner b/nodist/dot_pruner index 8136b7f28..9022b017f 100755 --- a/nodist/dot_pruner +++ b/nodist/dot_pruner @@ -1,8 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -require 5.006_001; +use warnings; use Getopt::Long; use IO::File; use Pod::Usage; diff --git a/nodist/flexdiff b/nodist/flexdiff index 0c29d4380..963c8fdf8 100755 --- a/nodist/flexdiff +++ b/nodist/flexdiff @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl ###################################################################### # # Copyright 2007-2020 by Wilson Snyder. This package is free software; you @@ -15,6 +15,7 @@ # DESCRIPTION: Diff flex files +use warnings; use IO::File; use strict; diff --git a/nodist/git_untabify b/nodist/git_untabify index debb20ca6..fc355b00b 100755 --- a/nodist/git_untabify +++ b/nodist/git_untabify @@ -1,7 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### +use warnings; use Getopt::Long; #use Data::Dumper; $Data::Dumper::Indent=1; $Data::Dumper::Sortkeys=1; #Debug use IO::File; diff --git a/nodist/install_test b/nodist/install_test index 8c6ac7db2..4b4025219 100755 --- a/nodist/install_test +++ b/nodist/install_test @@ -1,7 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### +use warnings; use Getopt::Long; use Cwd; use IO::File; diff --git a/nodist/invoke_atsim b/nodist/invoke_atsim index b2bfea83c..41490042c 100755 --- a/nodist/invoke_atsim +++ b/nodist/invoke_atsim @@ -1,8 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -require 5.006_001; +use warnings; use strict; #====================================================================== diff --git a/nodist/invoke_iccr b/nodist/invoke_iccr index 5a007be64..580dc7a72 100755 --- a/nodist/invoke_iccr +++ b/nodist/invoke_iccr @@ -1,8 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -require 5.006_001; +use warnings; use strict; #====================================================================== diff --git a/nodist/invoke_ncverilog b/nodist/invoke_ncverilog index 8e5a1f2d3..ef2809c71 100755 --- a/nodist/invoke_ncverilog +++ b/nodist/invoke_ncverilog @@ -1,8 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -require 5.006_001; +use warnings; use strict; #====================================================================== diff --git a/nodist/invoke_vcs b/nodist/invoke_vcs index b53602b99..ceeaf25af 100755 --- a/nodist/invoke_vcs +++ b/nodist/invoke_vcs @@ -1,8 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -require 5.006_001; +use warnings; use strict; #====================================================================== diff --git a/nodist/vtree_importer b/nodist/vtree_importer index d7b72a2a0..652c114bd 100755 --- a/nodist/vtree_importer +++ b/nodist/vtree_importer @@ -1,8 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -require 5.006_001; +use warnings; use Getopt::Long; use IO::File; use Pod::Usage; diff --git a/src/astgen b/src/astgen index 84bca8188..863a05621 100644 --- a/src/astgen +++ b/src/astgen @@ -1,8 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -#require 5.006_001; +use warnings; use Getopt::Long; use IO::File; use Pod::Usage; diff --git a/src/bisonpre b/src/bisonpre index cda66747c..b6c1f9322 100755 --- a/src/bisonpre +++ b/src/bisonpre @@ -1,8 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -require 5.006_001; +use warnings; use Getopt::Long; use IO::File; use Pod::Usage; diff --git a/src/config_rev.pl b/src/config_rev.pl index da141daf6..cee6695f0 100755 --- a/src/config_rev.pl +++ b/src/config_rev.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl ###################################################################### # # Copyright 2005-2020 by Wilson Snyder. Verilator is free software; you @@ -12,9 +12,10 @@ # GNU General Public License for more details. # ###################################################################### - # DESCRIPTION: Query's subversion to get version number +use warnings; + my $dir = $ARGV[0]; defined $dir or die "%Error: No directory argument,"; chdir $dir; diff --git a/src/cppcheck_filtered b/src/cppcheck_filtered index b6fbf5f76..6bc699092 100755 --- a/src/cppcheck_filtered +++ b/src/cppcheck_filtered @@ -1,8 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -require 5.006_001; +use warnings; use Getopt::Long; use IO::File; use Pod::Usage; diff --git a/src/flexfix b/src/flexfix index 7fbc5d905..ac916d9a6 100755 --- a/src/flexfix +++ b/src/flexfix @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl ###################################################################### # # Copyright 2002-2020 by Wilson Snyder. Verilator is free software; you @@ -12,9 +12,10 @@ # GNU General Public License for more details. # ###################################################################### - # DESCRIPTION: Edits flex output to get around various broken flex issues. +use warnings; + my $Opt_Prefix = $ARGV[0] or die "%Error: No prefix specified,"; foreach my $line () { diff --git a/src/pod2latexfix b/src/pod2latexfix index 70e577fb1..ce6ecaab5 100755 --- a/src/pod2latexfix +++ b/src/pod2latexfix @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl ###################################################################### # # Copyright 2002-2020 by Wilson Snyder. Verilator is free software; you @@ -12,9 +12,10 @@ # GNU General Public License for more details. # ###################################################################### - # DESCRIPTION: Edits pod2latex output +use warnings; + my $Opt_DistTitle = $ARGV[0] or die "%Error: No disttitle specified,"; my $Opt_DistDate = $ARGV[1] or die "%Error: No distdate specified,"; diff --git a/src/vlcovgen b/src/vlcovgen index aa52b215d..135f80293 100755 --- a/src/vlcovgen +++ b/src/vlcovgen @@ -1,8 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### -#require 5.006_001; +use warnings; use Getopt::Long; use IO::File; use Pod::Usage; diff --git a/test_regress/driver.pl b/test_regress/driver.pl index ba52ef469..c65327582 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -1,10 +1,9 @@ -: # -*-Mode: perl;-*- use perl, wherever it is -eval 'exec perl -wS $0 ${1+"$@"}' - if 0; +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### require 5.006_001; +use warnings; use Cwd; BEGIN { if (!$ENV{VERILATOR_ROOT} && -x "../bin/verilator") { diff --git a/test_regress/t/bootstrap.pl b/test_regress/t/bootstrap.pl index a057f813c..418e56d58 100755 --- a/test_regress/t/bootstrap.pl +++ b/test_regress/t/bootstrap.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # DESCRIPTION: Verilator: Verilog Test driver bootstrapper # # Copyright 2008 by Wilson Snyder. This program is free software; you can diff --git a/test_regress/vgen.pl b/test_regress/vgen.pl index eff31ed45..dd9955f82 100755 --- a/test_regress/vgen.pl +++ b/test_regress/vgen.pl @@ -1,8 +1,10 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # See copyright, etc in below POD section. ###################################################################### require 5.006_001; +use warnings; + use Getopt::Long; use IO::File; use Pod::Usage;