summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
blob: 1592c02cb956115c6341f09b350867445acf7f90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From 081385f4d4bba367afad3bff1fa034f5263305e6 Mon Sep 17 00:00:00 2001
From: Serhii Popovych <spopovyc@cisco.com>
Date: Wed, 10 Feb 2016 17:07:32 +0000
Subject: [PATCH] perl: Replace -w option in shebangs with modern "use
 warnings" In some builds we might provide ac_cv_path_PERL as /usr/bin/env
 perl to use newer version of the perl from users PATH rather than older from
 standard system path.

However using /usr/bin/env perl -w from shebang line isn't
possible because it translates to something like
/usr/bin/env -w perl and env complains about illegal option.

To address this we can remove -w option from perl shebang
line and add "use warnings" statement.

Upstream-Status: Pending
Signed-off-by: Serhii Popovych <spopovyc@cisco.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>

---
 bin/aclocal.in  | 3 ++-
 bin/automake.in | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/aclocal.in b/bin/aclocal.in
index b3715d9..461d453 100644
--- a/bin/aclocal.in
+++ b/bin/aclocal.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
 # -*- perl -*-
 # @configure_input@
 
@@ -32,6 +32,7 @@ BEGIN
 }
 
 use strict;
+use warnings;
 
 use Automake::Config;
 use Automake::General;
diff --git a/bin/automake.in b/bin/automake.in
index 8377d20..3a66965 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
 # -*- perl -*-
 # @configure_input@
 
@@ -28,6 +28,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 package Automake;
 
 use strict;
+use warnings;
 
 BEGIN
 {
OpenPOWER on IntegriCloud