Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From 41e06b7a354774913dcd2e32a35440e407843357 Mon Sep 17 00:00:00 2001 |
| 2 | From: Serhii Popovych <spopovyc@cisco.com> |
| 3 | Date: Wed, 10 Feb 2016 17:07:32 +0000 |
| 4 | Subject: [PATCH] perl: Replace -w option in shebangs with modern "use |
| 5 | warnings" In some builds we might provide ac_cv_path_PERL as /usr/bin/env |
| 6 | perl to use newer version of the perl from users PATH rather than older from |
| 7 | standard system path. |
| 8 | |
| 9 | However using /usr/bin/env perl -w from shebang line isn't |
| 10 | possible because it translates to something like |
| 11 | /usr/bin/env -w perl and env complains about illegal option. |
| 12 | |
| 13 | To address this we can remove -w option from perl shebang |
| 14 | line and add "use warnings" statement. |
| 15 | |
| 16 | Upstream-Status: Pending |
| 17 | Signed-off-by: Serhii Popovych <spopovyc@cisco.com> |
| 18 | --- |
| 19 | bin/aclocal.in | 3 ++- |
| 20 | bin/automake.in | 3 ++- |
| 21 | t/wrap/aclocal.in | 3 ++- |
| 22 | t/wrap/automake.in | 3 ++- |
| 23 | 4 files changed, 8 insertions(+), 4 deletions(-) |
| 24 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 25 | Index: automake-1.15.1/bin/aclocal.in |
| 26 | =================================================================== |
| 27 | --- automake-1.15.1.orig/bin/aclocal.in |
| 28 | +++ automake-1.15.1/bin/aclocal.in |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 29 | @@ -1,4 +1,4 @@ |
| 30 | -#!@PERL@ -w |
| 31 | +#!@PERL@ |
| 32 | # -*- perl -*- |
| 33 | # @configure_input@ |
| 34 | |
| 35 | @@ -33,6 +33,7 @@ BEGIN |
| 36 | } |
| 37 | |
| 38 | use strict; |
| 39 | +use warnings; |
| 40 | |
| 41 | use Automake::Config; |
| 42 | use Automake::General; |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 43 | Index: automake-1.15.1/bin/automake.in |
| 44 | =================================================================== |
| 45 | --- automake-1.15.1.orig/bin/automake.in |
| 46 | +++ automake-1.15.1/bin/automake.in |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 47 | @@ -1,4 +1,4 @@ |
| 48 | -#!@PERL@ -w |
| 49 | +#!@PERL@ |
| 50 | # -*- perl -*- |
| 51 | # @configure_input@ |
| 52 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 53 | @@ -28,6 +28,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0"; |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 54 | package Automake; |
| 55 | |
| 56 | use strict; |
| 57 | +use warnings; |
| 58 | |
| 59 | BEGIN |
| 60 | { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 61 | Index: automake-1.15.1/t/wrap/aclocal.in |
| 62 | =================================================================== |
| 63 | --- automake-1.15.1.orig/t/wrap/aclocal.in |
| 64 | +++ automake-1.15.1/t/wrap/aclocal.in |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 65 | @@ -1,4 +1,4 @@ |
| 66 | -#!@PERL@ -w |
| 67 | +#!@PERL@ |
| 68 | # @configure_input@ |
| 69 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 70 | # Copyright (C) 2012-2017 Free Software Foundation, Inc. |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 71 | @@ -19,6 +19,7 @@ |
| 72 | BEGIN |
| 73 | { |
| 74 | use strict; |
| 75 | + use warnings; |
| 76 | @Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib'); |
| 77 | unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib' |
| 78 | if '@srcdir@' ne '.'; |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 79 | Index: automake-1.15.1/t/wrap/automake.in |
| 80 | =================================================================== |
| 81 | --- automake-1.15.1.orig/t/wrap/automake.in |
| 82 | +++ automake-1.15.1/t/wrap/automake.in |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 83 | @@ -1,4 +1,4 @@ |
| 84 | -#!@PERL@ -w |
| 85 | +#!@PERL@ |
| 86 | # @configure_input@ |
| 87 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 88 | # Copyright (C) 2012-2017 Free Software Foundation, Inc. |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 89 | @@ -19,6 +19,7 @@ |
| 90 | BEGIN |
| 91 | { |
| 92 | use strict; |
| 93 | + use warnings; |
| 94 | @Automake::perl_libdirs = ('@abs_top_srcdir@/lib'); |
| 95 | unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib' |
| 96 | if '@srcdir@' ne '.'; |