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: check Makefile.am...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9c73ca3ab5a1
branches:  trunk
changeset: 412794:9c73ca3ab5a1
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Mar 12 08:44:15 2020 +0000

description:
mk/check/check-portability: check Makefile.am and Makefile.in as well

Up to now, these files had been skipped because they didn't start with a
#! line. Still, they contain shell programs, therefore it makes sense to
check them.

diffstat:

 mk/check/check-portability.sh |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 68f786db2194 -r 9c73ca3ab5a1 mk/check/check-portability.sh
--- a/mk/check/check-portability.sh     Thu Mar 12 08:42:44 2020 +0000
+++ b/mk/check/check-portability.sh     Thu Mar 12 08:44:15 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.sh,v 1.13 2020/03/11 23:59:27 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.14 2020/03/12 08:44:15 rillig Exp $
 #
 # This program checks all files in the current directory and any
 # subdirectories for portability issues that are likely to result in
@@ -43,12 +43,13 @@
                eval "case \"\$fname\" in $SKIP_FILTER *.orig) skip=yes;; esac"
                [ $skip = no ] || continue
 
+               skip_shebang_test=no
                ext="${fname##*.}"
                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)                                                 ;;
+               (am|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 ;;
@@ -57,6 +58,11 @@
                (c|C|cc|cxx|f|go|pl|py|in|ac|m4)                        continue ;;
                esac
 
+               if [ $skip_shebang_test = yes ]; then
+                       check_shell "$fname"
+                       continue
+               fi
+
                case "$opsys" in
                SunOS-5.9)
                        # See also (if you can):



Home | Main Index | Thread Index | Old Index