]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/disable-scan.pl: also scan all m4 files
authorDaniel Stenberg <daniel@haxx.se>
Thu, 15 Apr 2021 10:11:41 +0000 (12:11 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 22 Apr 2021 21:19:47 +0000 (23:19 +0200)
Fixes test 1165 when functions are moved from configure.ac to files in
m4/

tests/disable-scan.pl

index 64a181aca18eb401e0be608302ba1dbf9471c43b..65f5b03cb6984e6fb8042be12d9d1e2b607244de 100755 (executable)
@@ -36,8 +36,9 @@ my %docs;
 my $root=$ARGV[0] || ".";
 my $DOCS="CURL-DISABLE.md";
 
-sub scan_configure {
-    open S, "<$root/configure.ac";
+sub scanconf {
+    my ($f)=@_;
+    open S, "<$f";
     while(<S>) {
         if(/(CURL_DISABLE_[A-Z_]+)/g) {
             my ($sym)=($1);
@@ -47,6 +48,17 @@ sub scan_configure {
     close S;
 }
 
+sub scan_configure {
+    opendir(my $m, "$root/m4") || die "Can't opendir $root/m4: $!";
+    my @m4 = grep { /\.m4$/ } readdir($m);
+    closedir $m;
+    scanconf("$root/configure.ac");
+    # scan all m4 files too
+    for my $e (@m4) {
+        scanconf("$root/m4/$e");
+    }
+}
+
 sub scan_file {
     my ($source)=@_;
     open F, "<$source";