]> The Tcpdump Group git mirrors - tcpdump/commitdiff
if CC=*gcc* is found in Makefile, then set USING_GCC
authorMichael Richardson <[email protected]>
Mon, 3 Feb 2020 02:52:15 +0000 (03:52 +0100)
committerDenis Ovsienko <[email protected]>
Tue, 4 Feb 2020 22:19:17 +0000 (22:19 +0000)
tests/TESTrun

index 3267acbb9ca03e0837726f074ce56c44217d4fc3..a6a3c6a592487a6f63aaef7a84b604d2dd1884fa 100755 (executable)
@@ -92,6 +92,19 @@ sub loadconfighash {
     }
     close(CONFIG_H);
     #print Dumper($main::confighhash);
+
+    # also grovel Makefile for some things and pretend they are config options.
+    open(MAKEFILE, "Makefile") || die "can not open Makefile: $!\n";
+    while(<MAKEFILE>) {
+        chomp;
+        #print "Processing $_\n";
+        if(/^CC\s*=.*gcc.*/) {
+            #print "GCC FOUND\n";
+            $main::confighhash->{'USING_GCC'} = 1;
+        }
+    }
+    close(MAKEFILE);
+
     return $main::confighhash;
 }
 
@@ -195,14 +208,14 @@ sub runSimpleTests {
                      input=> $input,
                      output=>$output,
                      args => $options };
-                         
+
         runOneComplexTest($hash);
     }
 }
 
 if(scalar(@ARGV) == 0) {
-    runShellTests();
-    runSimpleTests();
+    #runShellTests();
+    #runSimpleTests();
     runComplexTests();
 } else {
     runSimpleTests($ARGV[0]);