pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/check mk/check/check-portability: don't check Makef...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4caf64eb4b1b
branches:  trunk
changeset: 424603:4caf64eb4b1b
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Mar 12 18:54:59 2020 +0000

description:
mk/check/check-portability: don't check Makefile.am

These files typically come with a corresponding Makefile.in file, and the
same portability issue is in the .in file as well. For building the
package it is only necessary to patch the .in file. Patching the .am file
as well would mean additional work for the pkgsrc package maintainer.

Nevertheless, such fixes should be reported upstream. The upstream
maintainer is more interested in a patch for Makefile.am, since the .in
file is only generated.

Suggested by wiz via private mail.

diffstat:

 mk/check/check-portability.sh |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 8f01605b1d0b -r 4caf64eb4b1b mk/check/check-portability.sh
--- a/mk/check/check-portability.sh     Thu Mar 12 18:52:57 2020 +0000
+++ b/mk/check/check-portability.sh     Thu Mar 12 18:54:59 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.sh,v 1.15 2020/03/12 18:40:06 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.16 2020/03/12 18:54:59 rillig Exp $
 #
 # This program checks all files in the current directory and any
 # subdirectories for portability issues that are likely to result in
@@ -47,18 +47,21 @@
                [ $skip = no ] || continue
 
                skip_shebang_test=no
-               ext="${fname##*.}"
+               base="${fname##*/}"
+               ext="${base##*.}"
                case "$ext" in
                # A few file extensions cannot be skipped since the Makefiles
                # will be generated from these, in the configure stage, which
                # is run later.
-               (am|in)                                                 skip_shebang_test=yes;;
+               (in) skip_shebang_test=yes;;
+
                # echo */*/PLIST | xargs cat | sed s,'.*\.',, | sort | uniq -c | sort -nr | sed 40q
                (png|html|svg|py|h|mo|php|js|xml|rb|go|txt|3|hpp)       continue ;;
                (tfm|gif|dtd|properties|json|ogg|gz|test|result|xpm|po) continue ;;
                (page|1|kicad_mod|hxx|jpg|css|el|htm|a|docbook|vf|inc)  continue ;;
+
                # other source files:
-               (c|C|cc|cxx|f|go|pl|py|in|ac|m4)                        continue ;;
+               (c|C|cc|cxx|f|go|pl|py|ac|m4)                           continue ;;
                esac
 
                if [ $skip_shebang_test = yes ]; then



Home | Main Index | Thread Index | Old Index