]> git.draconx.ca Git - dxcommon.git/commitdiff
fix-gnulib: Restore compatibility with perl 5.8.
authorNick Bowler <nbowler@draconx.ca>
Sat, 18 Nov 2023 20:54:56 +0000 (15:54 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sat, 18 Nov 2023 21:39:56 +0000 (16:39 -0500)
The //= operator was added in perl 5.10.  The benefit of using it in
this script is way too slight to be worth losing compatibility.

scripts/fix-gnulib.pl

index ce27521b007b86b3a22bb446c2bf24242836812d..640f1cd66897b031a769560f40349eb23b8e5c43 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env perl
 #
-# Copyright © 2011-2014, 2020-2022 Nick Bowler
+# Copyright © 2011-2014, 2020-2023 Nick Bowler
 #
 # Prepare the Gnulib tree for inclusion into a non-recursive automake build.
 # While the output of gnulib-tool is "include"-able if the --makefile-name
@@ -169,12 +169,12 @@ EOF
        # something actually depends on it (which is typically the case).
        if (/^noinst_LIBRARIES.*libgnu.a/) {
                s/^noinst/EXTRA/;
-               $for_library //= 0;
+               $for_library = 0 unless defined $for_library;
                $use_libtool = 0;
        }
        if (/^noinst_LTLIBRARIES.*libgnu.la/) {
                s/^noinst/EXTRA/;
-               $for_library //= 1;
+               $for_library = 1 unless defined $for_library;
                $use_libtool = 1;
        }