automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 857c843d4bcf576467b505eb05a47f3e7d32caaa 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. However using /usr/bin/env perl -w from shebang line isn't
  9. possible because it translates to something like
  10. /usr/bin/env -w perl and env complains about illegal option.
  11. To address this we can remove -w option from perl shebang
  12. line and add "use warnings" statement.
  13. Upstream-Status: Pending
  14. Signed-off-by: Serhii Popovych <spopovyc@cisco.com>
  15. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
  16. ---
  17. bin/aclocal.in | 3 ++-
  18. bin/automake.in | 3 ++-
  19. 2 files changed, 4 insertions(+), 2 deletions(-)
  20. diff --git a/bin/aclocal.in b/bin/aclocal.in
  21. index 9a20325..bd185d4 100644
  22. --- a/bin/aclocal.in
  23. +++ b/bin/aclocal.in
  24. @@ -1,4 +1,4 @@
  25. -#!@PERL@ -w
  26. +#!@PERL@
  27. # aclocal - create aclocal.m4 by scanning configure.ac -*- perl -*-
  28. # @configure_input@
  29. # Copyright (C) 1996-2020 Free Software Foundation, Inc.
  30. @@ -26,6 +26,7 @@ BEGIN
  31. }
  32. use strict;
  33. +use warnings;
  34. use Automake::Config;
  35. use Automake::General;
  36. diff --git a/bin/automake.in b/bin/automake.in
  37. index 5ed404a..d387b8e 100644
  38. --- a/bin/automake.in
  39. +++ b/bin/automake.in
  40. @@ -1,4 +1,4 @@
  41. -#!@PERL@ -w
  42. +#!@PERL@
  43. # automake - create Makefile.in from Makefile.am -*- perl -*-
  44. # @configure_input@
  45. # Copyright (C) 1994-2020 Free Software Foundation, Inc.
  46. @@ -23,6 +23,7 @@
  47. package Automake;
  48. use strict;
  49. +use warnings;
  50. BEGIN
  51. {